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 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示
  • ¥15 求三国群英传pl国战时间的修改方法
  • ¥15 matlab代码代写,需写出详细代码,代价私
  • ¥15 ROS系统搭建请教(跨境电商用途)