Tôi chưa bao giờ sử dụng php trước và đang cố kết nối với phiên bản SQL Server 2008 trên máy chạy Windows chạy IIS7 và PHP5.3.Lỗi nghiêm trọng PHP: Gọi hàm không xác định mssql_connect()
Tôi đã tải và cài đặt SQLSRV30.EXE
từ here trong C:\Program Files (x86)\PHP\ext
thêm này để C:\Program Files (x86)\PHP\php.ini
:
extension=php_sqlsrv_53_nts.dll
Sau đó khởi động lại toàn bộ máy chủ. Tôi vẫn gặp lỗi nghiêm trọng trong tệp nhật ký của mình cho biết:
PHP Fatal error: Call to undefined function mssql_connect()
Tôi cần làm gì để kết nối với Microsoft SQL Server 2008 từ PHP 5.3 chạy trên IIS7/Windows Server 2008? Tôi chắc chắn đó là một cái gì đó thực sự ngớ ngẩn mà tôi là thiếu ...
ĐẦY ĐỦ 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
Tôi có tình huống tương tự (không có khối MySQL), và giải pháp của tôi là ở đây: http://stackoverflow.com/questions/5179535/fatal-error-call-to-undefined-function-mysql-connect-in-c -apache-htdocs-test –