php_sqlsrv.dll: gives error when checking PHP version but extension works
I'm using the sqlsrv extension to connect to a MSSQL (I think 2005) database using PHP. I'm using a 64-bit Windows 7 machine, XAMPP, PHP 5.3.5, and sqlsrv loads without giving any errors when XAMPP starts and MSSQL queries all work great. It shows up under phpinfo().
The only problem I encounter is when I type in "php -v" to check up on the version in the command line. It says
PHP Sta开发者_Python百科rtup: Unable to load dynamic library '.../php/ext/php_sqlsrv_53_ts_vc6.dll' (thread-safe and VB 6)
even though the file is there. I'm reading perhaps this is a bit version issue (strange the ext works though?). The SQL driver for PHP is available only in 32-bit it seems (from an 2010 article on one of the MS forums) and it looks like there are some compiling errors if you want to make a 64-bit version yourself. I'm not familiar with compiling PHP into .dll files. Can anybody foresee any problem with this? As I said, it is working right now for SELECT, DELETE, and UPDATE MSSQL queries. TIA for your inputs!
Since PHP 5.3, Microsoft has a new driver for windows :
http://msdn.microsoft.com/en-us/sqlserver/ff657782.aspx
Maybe you can try this version, which seems quite recent (06/2011)
Hope that helps !
Edit : apparently, you need to use PDO for this to work. Is it the case for you ?
精彩评论