Link to home
Start Free TrialLog in
Avatar of MrBaseball9
MrBaseball9

asked on

MSSQL Not loading in phpinfo

I am using PHP to connect to a MSSQL server 2005 on an IIS7 Server 2008 box. I've downloaded and installed php 5.2.10 several times. I've used the installer and configured it manually. When I uncomment out the php_mssql.dll file in php.ini, it will not show in phpinfo().

I've done iisreset and other things and it is just not showing. Does anyone have any ideas?
ASKER CERTIFIED SOLUTION
Avatar of Hube02
Hube02
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MrBaseball9
MrBaseball9

ASKER

I actually downgraded php and was able to get a little farther. MSSQL is now showing up in phpinfo.  
I was reading somewhere where 5.3 doesn't play well with 64-bit architecture.

I'm now getting the following error:
Named Pipes Provider: Could not open a connection to SQL Server [53].
Can you supply some code from where you make your connection?
I took out the username/password and it allowed me to connect. I now only have 1 error to fix and hopefully my program will be functional!

Here's the connection string that is successful:

$serverName = ("SERVERNAME");

$connectionInfo = array( "Database"=>"db_name");


$conn = sqlsrv_connect( $serverName, $connectionInfo);
if( $conn === false )
{
     echo "Unable to connect.</br>";
     die( print_r( sqlsrv_errors(), true));
}