Jump to content

MSSQL on PHP 5.3 and later


Recommended Posts

Hi all,


is it true that PHP 5.3 and later doesn't support access to MSSQL server?


On PHP site (http://www.php.net/manual/en/intro.mssql.php), there is manual, how to run php with mssql server, but there is mentioned: "This extension is not available anymore on Windows with PHP 5.3 or later."


It is just hard to believe for me, so I am asking, to be shure.


If the extension is not avaliable, is there any workaround how to access MSSQL servers databases?


Thank you in advance for your answers.


Link to comment
Share on other sites

Yes it is true. Microsoft have gone ahead and made there own extension for this.




I believe what has happened is that because MS went ahead and started developing there own, work stopped on the open source version.


I had to jump through many hoops at work to get MSSQL working with PHP. Mostly because we used the Zend framework which at the time didn't support MS's new driver.

Link to comment
Share on other sites

  • 3 weeks later...

Full disclosure: I work at Microsoft.


I wouldn't say the PHP 5.3 "doesn't support MSSQL"...it's just that the php_mssql extension isn't shipped with PHP 5.3. You CAN get the php_mssql.dll file, enable it in your php.ini and you will have access to SQL Server (if you are running on Linux). If you are on Windows, then the recommended extension is the php_sqlsrv extension (which also comes in a PDO flavor), available here: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=80e44913-24b4-4113-8807-caae6cf2ca05. I've written some blog posts about the difference between these drivers:









Link to comment
Share on other sites

  • 2 years later...
This thread is more than a year old.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.