I've recently installed PHP4 on an IIS6/Win2K3 environment and that is working well. I can run any php script and it will output with no problem except for the ones that require to connect to MS SQL. The following is how I configured for MS SQL:
php.ini settings are as follows...
extension_dir = "C:\php4\extensions"
extension = php_mssql.dlladded "C:\php4" and "C:\php4\extensions" to windows environment settings
moved "ntwdblib.dll" to "C:\Windows\system32"
created ODBC sources
I've created an index.php to test the connection with the following content:
<?
if (mssql_connect(<dsn>, <username>, <password>))
echo "connected to db...";
else
echo "unable to connect to db: " . mssql_get_last_message();
?>
So far when I go to that page, the code seems to hang on the mssql_connect() line.
We have another PHP server running on Apache/Linux and it can connect without any problem using FreeTDS. And I've tested connecting to the db via other ways (i.e. testing ODBC, using excel, telnet to port 1433 of db) and they've all been successful. So I have to think that it's the PHP configuration issue or that I forgot to install something necessary.
Anyone have any idea what I should be looking for? I've been trying to solve this for a while now and it's starting to drive me crazy. I'd prefer we stick with the Linux/Apache setup (if it ain't broke why fix it) but the powers that be wanted me to test and evaluate the possibility of moving to IIS/Win setup.
Thanks in advance for any help you can provide.