简体   繁体   English

sqlsrv在php 5.4上运行

[英]sqlsrv running on php 5.4

I've just upgraded from PHP 5.3.10 to 5.4, now I get the following when trying to initialise php on the command line in windows: 我刚刚从PHP 5.3.10升级到5.4,现在我尝试在Windows命令行初始化php时得到以下内容:

C:\php5.4>php -v
PHP Warning:  PHP Startup: sqlsrv: Unable to initialize module
Module compiled with module API=20090626
PHP    compiled with module API=20100525
These options need to match
 in Unknown on line 0
PHP 5.4.0 (cli) (built: Feb 29 2012 19:06:50)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies

This should be a straight swap. 这应该是直接交换。 I've downloaded the NTS version of php (same as 5.3.10 version) & referenced the php_sqlsrv_53_nts_vc9.dll (v2) of sqlsrv. 我已经下载了NTS版本的php(与5.3.10版本相同)并引用了sqlsrv的php_sqlsrv_53_nts_vc9.dll(v2)。

Out of interest I also have the sqlsrv v3.0 extension, which I tried to load in and get the same error. 出于兴趣,我也有sqlsrv v3.0扩展,我试图加载并得到相同的错误。

Has anyone else had this issue, or know of how to fix it? 有没有其他人有这个问题,或知道如何解决它?

TIA TIA

D d

It looks like the version of the dll you have is for PHP 5.3 看起来你拥有的DLL的版本是PHP 5.3

I'm not sure if there is a version out for 5.4 yet, but you can check the PHP Extensions for Windows page to see. 我不确定5.4版本是否有版本,但您可以查看PHP Extensions for Windows页面。

The system requirements page from Microsoft appears to indicate not (although it may not have been updated yet). Microsoft系统要求页面似乎表示没有(尽管它可能尚未更新)。

Only you need this link: https://www.microsoft.com/en-us/download/details.aspx?id=20098 the version 3.0 只有你需要这个链接: https//www.microsoft.com/en-us/download/details.aspx?id = 200998版本3.0

Regards 问候

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM