与SQLSRV为PHP的MSSQL配置问题 [英] Configuration Issues with SQLSRV for PHP for MSSQL

查看:242
本文介绍了与SQLSRV为PHP的MSSQL配置问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装的配置与WampServer 2.4:

I am installing a configuration with WampServer 2.4:

- Windows 7 64-bit sp1
- WampServer 2.4 64-bit
- PHP 5.4.3 64-bit (came with the WampServer)
- Apache 2.4.4
- Microsoft SQL Server 2012 Native Client 64-bit
- Microsoft SQLSRV 3.0 (php_sqlsrv_54_ts.dll, php_pdo_sqlsrv_54_ts.dll and they are put in c:/wamp/bin/php/php5.4.3/ext/

和我编辑的C:\\ WAMP \\ BIN \\ apache的\\ Apache2.4.4 \\ BIN \\ php.ini中的行:

And I edited the C:\wamp\bin\apache\Apache2.4.4\bin\php.ini with the lines:

- extension_dir = "c:/wamp/bin/php/php5.4.3/ext/"
- extension=php_sqlsrv_54_ts.dll
- extension=php_pdo_sqlsrv_54_ts.dll

和我重新开始所有的服务从WAMP。

And I restarted all the services from Wamp.

但我仍然无法看到的phpinfo的SQLSRV部分 - 当然我的连接测试程序失败。

But I still couldn't see the SQLSRV section from phpinfo -- and of course my connection test program failed.

什么可能出现了问题?

谁能帮助?

推荐答案

您的问题是,因为你正在使用(或WAMP给你)64 PHP,其中作为你的SQLSRV驱动程序是最有可能的32位。

Your issue is because you are using (or WAMP has given you) 64bit php, where as your sqlsrv driver is most likely 32bit.

您的解决方案是切换到PHP的32位版本(在64上运行的好处,是pretty太多不存在呢,除非你需要较大的数据类型),或重新编译在64位的SQLSRV驱动程序(可能更多麻烦比它值得)。

Your solution is to switch to a 32bit version of php (The benefits of running in 64, are pretty much non existent anyway unless you need larger data types), or to recompile the sqlsrv driver in 64bit (Likely more trouble than it is worth).

尝试WAMP的32位版本。 <一href=\"http://www.wampserver.com/en/#wampserver-32-bits-php-5-4\">http://www.wampserver.com/en/#wampserver-32-bits-php-5-4

Try a WAMP 32 bit version. http://www.wampserver.com/en/#wampserver-32-bits-php-5-4

此外,如果Apache和我-SQL没有后果你(他们只是一个网页服务器和和SQL数据库),你可以使用Web平台安装程序一件轻而易举的安装PHP WISP堆栈。 <一href=\"http://www.microsoft.com/web/downloads/platform.aspx\">http://www.microsoft.com/web/downloads/platform.aspx

Also if Apache and my-sql are of no consequence to you (they are just a web sever and and an sql database) you can install a WISP PHP Stack in a breeze using the web platform installer. http://www.microsoft.com/web/downloads/platform.aspx

这篇关于与SQLSRV为PHP的MSSQL配置问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆