I got problem about IIS auto-load php_sqlsrv.dll, please help.
Environment:
Windows 7 Release Candidate
Microsoft Web Platform Installer 2.0 Beta
php.ini: added extension=php_sqlsrv.dll.
script:
<?php
$serverName = "xxx\SQLEXPRESS";
$connectionOptions = array(....);
$conn = sqlsrv_connect($serverName, $connectionOptions);
if ($conn === false) {
echo "Unable to connect.";
}
else {
echo "connected.";
sqlsrv_close($conn);
}
?>
When I ran the script, I got the error message:
PHP Fatal error: Call to undefined function sqlsrv_connect() in C:\inetpub\wwwroot\dbtest.php on line 4.
I placed dl('php_sqlsrv.dll'); at line 2 and ran the script again, "connected" message was printed, so I can sure that php_sqlsrv.dll not loaded after IIS started.
Is there anyone can help me to let php_sqlsrv.dll autoload when IIS started.