Connecting to a MSSQL on OS X running MAMP PRO

Versions: PHP5.6, MSSQL 2008, OS x El Capitan

I’m trying to query a MSSQL database to compare results with a MySQL database. I can query the MySQL db without issue, I cannot query the MSSQL db. I’ve installed freetds, odbc, autoconf, followed multiple tutorials including:

I’ve also tried using Propelorm without success.

– is in the extensions folder and is being called in my php.ini.
– I’ve tried running a try/catch on my 500 error, no good.
– apache and php logs don’t show anything in regards to the page I’m loading or the service in general.
– show the correct extensions file and the correct directory to call the extension, a search in the page did not spit back anything with “mssql” or “pdo_dblib”.

My next course of action is to create a virtual machine running Ubuntu to test the script but I would like to be able to develop on my host machine.

Looking at the php.ini for php5.6.31 (version being used by MAMP PRO):


 421 ; Directory in which the loadable extensions (modules) reside.
 422 extension_dir = "/Applications/MAMP/bin/php/php5.6.31/lib/php/extensions/no-debug-non-zts-20131226/"

 531 ; Extensions
 533 ;
 542 ;
 543 ;

Taking a look in the extensions folder, we can see the file:


I’m not sure what else to include, let me know in the comments and I will update the questions.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s