dongzhi9574 2011-09-14 20:18
浏览 76
已采纳

php_sqlsrv.dll:检查PHP版本但扩展工作时出错

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 Startup: 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!

  • 写回答

1条回答 默认 最新

  • doushu2699 2011-09-14 20:52
    关注

    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 ?

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 thinkphp6配合social login单点登录问题
  • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch