简体   繁体   English

sqlsrv在Windows 5.4中挂起

[英]sqlsrv hangs in windows with php 5.4

I know this was asked alot of times but all the answers are outdated. 我知道这被问了很多次,但所有的答案都已经过时了。

As of PHP 5.3, as we all know mssql is not supported, so went on installing Microsoft's sqlsrv driver for this, as it seems to be the only option out there (I'm open to suggestions!). 从PHP 5.3开始,我们都知道支持mssql,所以继续安装微软的sqlsrv驱动程序,因为它似乎是唯一的选择(我愿意接受建议!)。

Now I'm using PHP 5.4 on a Windows server 2003, SQL Server 2005 with IIS as webserver. 现在我在Windows服务器2003上使用PHP 5.4,使用IIS作为Web服务器的SQL Server 2005。

I've followed about a million guides and i've installed everything accordingly, but the driver just wont load, sqlsrv won't show on phpinfo() or it hangs. 我已经关注了大约一百万个指南,并且相应地安装了所有内容,但是驱动程序不会加载, sqlsrv将不会显示在phpinfo()或挂起。

This is what i've done in php.ini : 这就是我在php.ini中所做的:

 extension=php_sqlsrv_54_nts.dll

And the extension_dir is set to C:\\PHP\\ext , though phpinfo() shows its loading a php.ini file from progrem files, so i'm editing 2 php.ini files every time as i'm not sure which one is active. 并且extension_dir设置为C:\\PHP\\ext ,虽然phpinfo()显示它从progrem文件加载php.ini文件,所以我每次都编辑2个php.ini文件,因为我不确定哪个是活性。 For the same reason i've put the dll files in both locations. 出于同样的原因,我把dll文件放在两个位置。

There is no information for this problem! 这个问题没有任何信息! all the solutions are for people who have used the wrong versions, etc. 所有解决方案都适用于使用过错版本的用户等。

I've tried applying every single dll and all with the same result, including Threaded and non-threaded. 我已经尝试应用每个单独的dll和所有具有相同结果,包括线程和非线程。

What can i do? 我能做什么?

I see you're using Windows Server 2003. You need to use Version 2.0 of the PHP for SQL Server drivers with Windows Server 2003. You can't use the newest version 3.0 drivers. 我看到您正在使用Windows Server 2003.您需要在Windows Server 2003中使用PHP for SQL Server驱动程序的2.0版。您无法使用最新的3.0版驱动程序。

However you need version 3.0 of the "PHP for SQL Server drivers" to work with PHP 5.4+. 但是,您需要3.0版的“PHP for SQL Server驱动程序”才能使用PHP 5.4+。

Basically you need to update your OS to Windows Server 2008 in order to use PHP 5.4+ (if you want SQL Server driver support). 基本上,您需要将操作系统更新到Windows Server 2008才能使用PHP 5.4+(如果您需要SQL Server驱动程序支持)。

http://msdn.microsoft.com/en-us/library/cc296170.aspx http://msdn.microsoft.com/en-us/library/cc296170.aspx

I know this is an old question, but it was one of the first results when I was looking for information earlier today. 我知道这是一个老问题,但这是我今天早些时候寻找信息时的第一批结果之一。

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

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