Php_sqlsrv.dll: gives an error while checking PHP version, but extension works

I am using the sqlsrv extension to connect to an MSSQL database (I think 2005) using PHP. I use Windows 7 64-bit boot, XAMPP, PHP 5.3.5 and sqlsrv without any errors when starting XAMPP, and MSSQL queries all work fine. It is displayed in phpinfo ().

The only problem I am facing is when I enter "php -v" to check the version on the command line. It says:

PHP Startup: Unable to load dynamic library '.../php/ext/php_sqlsrv_53_ts_vc6.dll' (thread-safe and VB 6) 

although there is a file. I read, maybe this is a bit of a version issue (is it strange that ext works?). The SQL driver for PHP is only available in 32-bit versions (from a 2010 article on one of the MS forums), and it looks like there are some compilation errors if you want to make the 64-bit version yourself. I am not familiar with compiling PHP to DLL files. Can anyone anticipate any problems with this? As I said, it works right now for SELECT, DELETE, and UPDATE MSSQL queries. TIA for your entries!

0
source share
1 answer

With PHP 5.3, Microsoft has a new driver for windows:

http://msdn.microsoft.com/en-us/sqlserver/ff657782.aspx

Perhaps you can try this version, which seems quite recent (06/2011)

Hope this helps!

Edit: apparently you need to use PDO for this. This is for you?

0
source

All Articles