Jump to content

Archived

This topic is now archived and is closed to further replies.

mimo

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.

mimo

Share this post


Link to post
Share on other sites

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

 

http://www.microsoft.com/sqlserver/2005/en/us/php-driver.aspx

 

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.

Share this post


Link to post
Share on other sites

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:

 

http://blogs.msdn.com/b/brian_swan/...nce-part-1.aspx

 

http://blogs.msdn.com/b/brian_swan/...nce-part-2.aspx

 

Thanks.

 

-Brian

Share this post


Link to post
Share on other sites

Hey Brian.

 

I noticed your links are down. Any chance to get them working again? I'm interested in reading more about the differences between the drivers as I am migrating an existing app to PHP 5.3

Share this post


Link to post
Share on other sites

×
×
  • 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.