我从来没有使用过PHP,并试图连接到运行IIS7和PHP5.3的Windows计算机上的SQL Server 2008实例。PHP致命错误:调用未定义的函数mssql_connect()
我已经下载并在C:\Program Files (x86)\PHP\ext
从here安装SQLSRV30.EXE
将此添加到C:\Program Files (x86)\PHP\php.ini
:
extension=php_sqlsrv_53_nts.dll
然后重新启动整个服务器。我仍然得到我的日志文件中的致命错误说:
PHP Fatal error: Call to undefined function mssql_connect()
什么我需要做的,从PHP 5.3连接到Microsoft SQL Server 2008的IIS7/Windows Server 2008上运行?我敢肯定这件事情非常愚蠢,我很想念......
FULL PHPINFO - >http://demo.mandibleweb.com/zapified/hello.php
phpinfo()函数:
PHP Version 5.3.10
System
Windows NT MWD001 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586
Build Date
Feb 2 2012 20:10:58
Compiler
MSVC9 (Visual C++ 2008)
Architecture
x86
Configure Command
cscript /nologo configure.js "--enable-snapshot-build" "--enable-debug-pack" "--disable-zts" "--disable-isapi" "--disable-nsapi" "--without-mssql" "--without-pdo-mssql" "--without-pi3web" "--with-pdo-oci=C:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8=C:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8-11g=C:\php-sdk\oracle\instantclient11\sdk,shared" "--with-enchant=shared" "--enable-object-out-dir=../obj/" "--enable-com-dotnet" "--with-mcrypt=static" "--disable-static-analyze"
Server API
CGI/FastCGI
Virtual Directory Support
disabled
Configuration File (php.ini) Path
C:\Windows
Loaded Configuration File
C:\Program Files (x86)\PHP\php.ini
我有类似的情况(没有MySQL块),我的解决方案是在这里:http://stackoverflow.com/questions/5179535/fatal-error-call-to-undefined-function-mysql-connect-in-c -apache-htdocs-test – 2013-09-18 12:09:14