windows操作系统xp和win7都有,安装的几个版本的php都是扩展包全选,都是5.2版本以上的,但是安装完成后php.ini中都没有 extension=php_mssql.dll。
不知道是什么原因。
按照网上的说法修改了下
1、php.ini中没有extension=php_mssql.dll这行,所以直接添加了extension=php_mssql.dll
2、mssql.secure_connection = Off改为on
3、php_mssql.dll拷贝到php.ini中extension_dir 指定的目录或者系统system32中
4、更新新ntwdblib.dll为合适于sql2005的版本2000.80.194.0但是仍然无法正常使用。phpinfo()PHP Version 5.3.2Configure Command cscript /nologo configure.js "--enable-snapshot-build" "--disable-isapi" "--enable-debug-pack" "--disable-isapi" "--without-mssql" "--without-pdo-mssql" "--without-pi3web" "--with-pdo-oci=D:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8=D:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8-11g=D:\php-sdk\oracle\instantclient11\sdk,shared" "--enable-object-out-dir=../obj/" "--enable-com-dotnet没有mssql相关模块,且上面显示 "--without-mssql" "--without-pdo-mssql"apache Version 2.2.15 error log:
PHP Warning: PHP Startup: Unable to load dynamic library 'F:\\php\\ext\\php_mssql.dll' - \xd5\xd2\xb2\xbb\xb5\xbd\xd6\xb8\xb6\xa8\xb5\xc4\xc4\xa3\xbf\xe9\xa1\xa3\r\n in Unknown on line 0
php_mssql.dll无法加载,但是zend studio的debug下又可以使用 mssql_connect(),并且能够正确获取数据;而localhost下判断function_exists('mssql_connect'),则显示不存在此函数。 泪奔~~还有的救不?
不知道是什么原因。
按照网上的说法修改了下
1、php.ini中没有extension=php_mssql.dll这行,所以直接添加了extension=php_mssql.dll
2、mssql.secure_connection = Off改为on
3、php_mssql.dll拷贝到php.ini中extension_dir 指定的目录或者系统system32中
4、更新新ntwdblib.dll为合适于sql2005的版本2000.80.194.0但是仍然无法正常使用。phpinfo()PHP Version 5.3.2Configure Command cscript /nologo configure.js "--enable-snapshot-build" "--disable-isapi" "--enable-debug-pack" "--disable-isapi" "--without-mssql" "--without-pdo-mssql" "--without-pi3web" "--with-pdo-oci=D:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8=D:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8-11g=D:\php-sdk\oracle\instantclient11\sdk,shared" "--enable-object-out-dir=../obj/" "--enable-com-dotnet没有mssql相关模块,且上面显示 "--without-mssql" "--without-pdo-mssql"apache Version 2.2.15 error log:
PHP Warning: PHP Startup: Unable to load dynamic library 'F:\\php\\ext\\php_mssql.dll' - \xd5\xd2\xb2\xbb\xb5\xbd\xd6\xb8\xb6\xa8\xb5\xc4\xc4\xa3\xbf\xe9\xa1\xa3\r\n in Unknown on line 0
php_mssql.dll无法加载,但是zend studio的debug下又可以使用 mssql_connect(),并且能够正确获取数据;而localhost下判断function_exists('mssql_connect'),则显示不存在此函数。 泪奔~~还有的救不?
解决方案 »
- 自己想开发一个PHP web应用,底层不知道从何写起了,希望大家给点指点
- 关于wampserver安装和配置的问题~
- php中使用什么样的在线编辑器,如何使用?
- 强烈推荐 PHPCodeLock 免费的 php 加密软件,非常好用(如果发帖违规,请版主告知,我自行自觉删除,仅仅是想把好东西推荐给大家)
- 这行SQL语句如何才能正常使用?
- 局域网内的其他电脑通过IP不能访问我的apache
- php excel问题
- 关于window.history.go(-1)返回后书写记录无法保存的问题?
- 郵件的 Return-Path 屬性 , 大家幫忙
- 请推荐一个支持php+mysql的空间
- 无法上传文件。求解
- 请问:PS功能(保存为WEB所用格式)如何实现?
T_T
肯定是有解决方法的吧,不然php怎么访问mssql数据库的呀呀呀
http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=ccdf728b-1ea0-48a8-a84a-5052214caad9
http://msdn.microsoft.com/en-us/library/cc296170(v=sql.90).aspx资料:
http://hardforum.com/showthread.php?p=1035593792
但是win xp x86 pack3的系统connect函数可以使用,但是出错, print_r(sqlsrv_errors()); 结果如下:Array ( [0] => Array ( [0] => 08001 [SQLSTATE] => 08001 [1] => 53 [code] => 53 [2] => [Microsoft][SQL Server Native Client 10.0]Named Pipes Provider: Could not open a connection to SQL Server [53]. [message] => [Microsoft][SQL Server Native Client 10.0]Named Pipes Provider: Could not open a connection to SQL Server [53]. ) [1] => Array ( [0] => HYT00 [SQLSTATE] => HYT00 [1] => 0 [code] => 0 [2] => [Microsoft][SQL Server Native Client 10.0]Login timeout expired [message] => [Microsoft][SQL Server Native Client 10.0]Login timeout expired ) [2] => Array ( [0] => 08001 [SQLSTATE] => 08001 [1] => 53 [code] => 53 [2] => [Microsoft][SQL Server Native Client 10.0]A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online. [message] => [Microsoft][SQL Server Native Client 10.0]A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online. ) ) >_< xp系统上本地数据库sql server2005访问ok,但是无法访问远程数据库。