I have a PHP app running happily on the following system:
I'm trying to get the same thing running on the following:
After doing the install and setup I usually do, phpinfo() is running but there is no MSSQL section. I've looked around and found some MS documentation to set up the system using a php_sqlsrv.dll and tried that but it seems to use a different interface to connect to the database (no more mssql_connect(), now it's sqlsrv_connect()). Is this the only way to connect php to SQL Server 2008 or do I just have the setup wrong? If I can go back to PHP 5.2.3 and have it work, that will be fine but I didn't want to undo what I have if it won't help.
Thanks,
There is an extensive tutorial on MSDN on how to do this.
http://msdn.microsoft.com/en-us/library/cc793139%28SQL.90%29.aspx
The extension named php_mssql.dll is linked with an old Microsoft library (ntwdblib.dll). This library was last updated with MS SQL Server 6.5. It's a 32 bit library and does not support many of the new features introduced in newer versions of the database. It is possible to compile a version of the extension using FreeTDS. That will give access to the latest version of the TDS protocol. This also allows you to access SQL Server from a Linux/Unix based system.
The extension named php_sqlsrv.dll is developed and maintained by Microsoft gives much better support for the newer versions of SQL server and it should work in both the environments you describe.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With