PHP和MS SQL企业问题 [英] PHP and MS SQL Enterprise Problems

查看:50
本文介绍了PHP和MS SQL企业问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用PHP并需要它连接到不同服务器上的MS SQL Enterprise数据库。我已经阅读了大量的建议,没有任何作用,这是情况:


-IIS是在安装了PHP5的Win XP Pro系统上(其余的php似乎运行正常) 。

-extension = php_mssql.dll没有注释 - 不仅服务已重启,而且计算机已重启多次

-我们也没有运行Apache。

-SQL Server是在Win 2003服务器上运行的版本8

-来自SQL Server的ntwdblib.dll文件被复制到system32中的XP系统,php AND php / ext目录

-SQL Server为命名管道和TCP / IP设置

-SQL Server将接受NT授权和SQL服务器登录


这是我的代码:


$ connection = @mssql_connect(''SQLServer'',''usrnm'',''psswd'');

echo''让它连接尝试连接'';

if(!$ connection)

{

echo''无法连接''; }

else {echo''已连接'';}''


Web在到达connect语句时停止,它不会发送任何回声的陈述。


我找到了带有和没有带领''''的代码语句,没有它,我得到:


致命错误:在第47行的C:\ Inetpub \ www.root \NewSite \ news.php中调用未定义的函数mssql_connect()


可以有人请帮忙,我在墙上并且不知道该网站,直到我弄清楚配置问题。


谢谢

解决方案

connection = @mssql_connect(''SQLServer'',''usrnm'',''psswd'');

echo''让它变得难以连接'';

if(!


connection)

{

echo''无法连接''; }

else {echo''已连接'';}''


Web在到达connect语句时停止,它不会发送任何回声的陈述。


我找到了带有和没有带领''''的代码语句,没有它,我得到:


致命错误:在第47行的C:\ Inetpub \ www.root \NewSite \ news.php中调用未定义的函数mssql_connect()


可以有人请帮忙,我在墙上并且不知道该网站,直到我弄清楚配置问题。


谢谢



致命错误:在第47行调用C:\ Inetpub \ www.root \NewSite \ news.php中的未定义函数mssql_connect()



它表明您没有成功安装MSSQL扩展。查看此 http://www.php.net/manual /en/ref.mssql.php


I am working with PHP and need it to connect to a MS SQL Enterprise database on a different server. I have read TONS of suggestions and nothing works, here is the situation:

-IIS is on a Win XP Pro System with PHP5 Installed (the rest of php seems to be running fine).
-extension=php_mssql.dll is uncommented- not only has the service been restarted but the computer has been rebooted several times
-We are NOT running Apache as well.
-SQL Server is version 8 running on a Win 2003 Server
-the ntwdblib.dll file from the SQL server is copied to the XP system in the system32, php AND php/ext directories
-SQL Server is set up for both named pipes and TCP/IP
-SQL Server will accept both NT authorization and SQL server logins

Here is my code:

$connection = @mssql_connect(''SQLServer'',''usrnm'',''psswd'');
echo ''Made it bast the attempt to connect'';
if (!$connection)
{
echo ''Could not connect''; }
else { echo ''Connected'';}''

The Web stops when it gets to the connect statement, it will not send any of the echo''d statements.

I have found code statements with and without the leading ''@'', without it, I get:

Fatal error: Call to undefined function mssql_connect() in C:\Inetpub\wwwroot\NewSite\news.php on line 47


Can someone please help, I am up against a wall and connot contiue with the website until I figure out the configuration problem.

Thanks

解决方案

connection = @mssql_connect(''SQLServer'',''usrnm'',''psswd'');
echo ''Made it bast the attempt to connect'';
if (!


connection)
{
echo ''Could not connect''; }
else { echo ''Connected'';}''

The Web stops when it gets to the connect statement, it will not send any of the echo''d statements.

I have found code statements with and without the leading ''@'', without it, I get:

Fatal error: Call to undefined function mssql_connect() in C:\Inetpub\wwwroot\NewSite\news.php on line 47


Can someone please help, I am up against a wall and connot contiue with the website until I figure out the configuration problem.

Thanks


Fatal error: Call to undefined function mssql_connect() in C:\Inetpub\wwwroot\NewSite\news.php on line 47

It shows you have not installed MSSQL extension successfully. Check out this http://www.php.net/manual/en/ref.mssql.php.


这篇关于PHP和MS SQL企业问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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