mallen1 Posted April 5, 2011 Share Posted April 5, 2011 I am trying to get sqlsrv to work in php. I am running Windows Server 2008, PHP 5.3, IIS 7, AND MSSQL Server 2008. I have php5.dll. I downloaded and installed the latest php_sqlsrv_53_nts_vc6.dll and php_pdo_sqlsrv_53_nts_vc6.dll package by extracting all the 6 .dll to the C:\PHP\ext folder. I modified my php.ini to include extension=php_sqlsrv_53_nts_vc6.dll and extension=php_pdo_sqlsrv_53_nts_vc6.dll and then restarted the IIS server. As far as I can tell these are the correct .dll for my system? I have also double checked that it is the only php.ini on the machine. When I run php -v I get the error: PHP Warning: PHP Startup: Unable to load dynamic libarary 'C:\php\php_sqlsrv_53_nts_vc6.dll' - The specified module could not be found. in Unknown on line 0. PHP Warning: PHP Startup: Unable to load dynamic libarary 'C:\php\php_pdo_sqlsrv_53_nts_vc6.dll' - The specified module could not be found. in Unknown on line 0. I also cannot see sqlsrv in my Registered PHP streams when I go to phpinfo() I can see both files I am calling in my c:php\ext folder and I have the folder permissions set to everyone\everything. When I try to connect in php I get the error "Call to undefined function sqlsrv_connect() in C:\inetpub\wwwroot\mysqltest.php on line 3 I have been trying to get this to work for about 5 hours. PLEASE PLEASE does anyone have ANY ideas? Quote Link to comment https://forums.phpfreaks.com/topic/232770-unable-to-load-php_sqlsrv_53_nts_vc6dll/ Share on other sites More sharing options...
PFMaBiSmAd Posted April 5, 2011 Share Posted April 5, 2011 Your php.ini extension_dir setting is apparently set to C:\php, not C:\PHP\ext Quote Link to comment https://forums.phpfreaks.com/topic/232770-unable-to-load-php_sqlsrv_53_nts_vc6dll/#findComment-1197283 Share on other sites More sharing options...
mallen1 Posted April 5, 2011 Author Share Posted April 5, 2011 You're brilliant. That seems so obvious now looking back at my own post. Will go make the adjustment now. Thank you Quote Link to comment https://forums.phpfreaks.com/topic/232770-unable-to-load-php_sqlsrv_53_nts_vc6dll/#findComment-1197296 Share on other sites More sharing options...
Brian Swan Posted April 5, 2011 Share Posted April 5, 2011 You should also be using the VC9 build of the driver - that's what's recommended for FastCgi/IIS. -Brian Quote Link to comment https://forums.phpfreaks.com/topic/232770-unable-to-load-php_sqlsrv_53_nts_vc6dll/#findComment-1197300 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.