Just an idea, is the pdo driver for MSSQL enabled for CLI ? Or is its configuration ok ? (because I think that if it was a driver problem, you won’t have a such error message)
I don’t know for windows, but on several Linux distributions, the php.ini for command line is different than the one for apache/web server
This machine had AppServ, with php 5.2.6, and there was kind of a bug in that php version, so I changed AppServ for Wamp, which is using 5.3.10. Also using sqlsrv now, instead of mssql.
the original error is gone, but a new one (wierder) has arisen again when runnign from CLI. (the webapp still works though)
CDbConnection failed to open the DB connection: could not find driver
And well, the driver is there… or the webapp wouldnt be running. Ive ensured that the php.ini file is the same for both, webapp and phpcli.
You are right, php -i doesnt show the extension enabled, even though its using the same php.ini
a phpinfo(); in the browser does show the extension, how can I enable the extension for CLI as well? I though that was what php.ini was for, and its alredy pointing to the same place. also forced it by running
Yesterday, you had AppServ, today Wamp. Seems that Wamp is now separating ini files for web and cli.
Me too, but often, you don’t have the choice. But fortunately, my employeer let me do what I want . So, Linux is install on my dev workstation, with a windows virtual box (needed Outlook 2010 on hosted Exchange, and also, to test website with this f***ing IE)