I am running both, MAMP and Zend Server CE. I just installed the Zend Server because I read here: http://www.jesusomar.com/2011/07/22/mamp-php-and-mssql that it supports SQL Server out of the box. I did have to enable the extension and restart PHP of course.
I have been looking into compiling the necessary driver for MAMP. I hit a roadblock here (directions I have for this: http://www.tumblr.com/tagged/mssql+mamp+php+mac+osx) where the compile fails for PHP 5.3.5 and 5.3.6. You can see that issue here: https://stackoverflow.com/questions/9675906/compile-error-for-php-mssql. I have not tried other versions yet.
Anyway, no matter what, I get an error:
could not find driver
Here is the offending line in my code:
new PDO( "sqlsrv:server=".$myServer.";Database=FormScript");
You can see I am using the sqlsrv driver. I took another look at MAMP and Zend and realized that neither of them contain the driver. In my Zend instance, I do have MSSQL Support enabled. I checked in phpinfo()
. I thought perhaps I could simply change my driver then:
new PDO( "mssql:server=".$myServer.";Database=FormScript");
I still get the same error:
could not find driver
I find this a bit odd. Anyway, any ideas on what I'm missing?
I addressed this by using Zend Server CE and enabling the driver