Saturday, February 25, 2012
Cannot connect to SQL2005 Express from PHP
I have php 5.0.2 on Apache2/WinXP and database on MS SQL 2005 express.
I cannot connect to server:
Warning: mssql_connect() [function.mssql-connect]: Unable to connect to
server: TESTSERVER\SQLEXPRESS in C:\xxx\test.php on line 11
My source code test.php:
...
$connectstring = mssql_connect("TESTSERVER/SQLEXPRESS","sa","xx");
if ($connectstring == FALSE)
echo "ERROR!";
else
echo "OK!";
...
This example with MSDE2000 work ok, but with SQL2005 Express not. Help
me, please.
J.R.I use new version ntwdblib.dll and all is OK!
http://support.microsoft.com/dllhel...2548&l=55&det=1
Jan Rok napsal(a):
> Hello,
> I have php 5.0.2 on Apache2/WinXP and database on MS SQL 2005 express.
> I cannot connect to server:
> Warning: mssql_connect() [function.mssql-connect]: Unable to connect t
o
> server: TESTSERVER\SQLEXPRESS in C:\xxx\test.php on line 11
> My source code test.php:
> ...
> $connectstring = mssql_connect("TESTSERVER/SQLEXPRESS","sa","xx");
> if ($connectstring == FALSE)
> echo "ERROR!";
> else
> echo "OK!";
> ...
> This example with MSDE2000 work ok, but with SQL2005 Express not. Help
> me, please.
> J.R.|||What happens if you change TESTSERVER/SQLEXPRESS to TESTSERVER\SQLEXPRESS in
your connection string? Did you setup SQL Express for mixed mode access
when you installed it? By default it is Windows authentication only.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Jan Rok" <jan.rok@.email.cz> wrote in message
news:e2Z4SUXLGHA.420@.tk2msftngp13.phx.gbl...
> Hello,
> I have php 5.0.2 on Apache2/WinXP and database on MS SQL 2005 express.
> I cannot connect to server:
> Warning: mssql_connect() [function.mssql-connect]: Unable to connect t
o
> server: TESTSERVER\SQLEXPRESS in C:\xxx\test.php on line 11
> My source code test.php:
> ...
> $connectstring = mssql_connect("TESTSERVER/SQLEXPRESS","sa","xx");
> if ($connectstring == FALSE)
> echo "ERROR!";
> else
> echo "OK!";
> ...
> This example with MSDE2000 work ok, but with SQL2005 Express not. Help me,
> please.
> J.R.
Cannot connect to SQL2005 Express from PHP
I have PHP 5.0.2 on Apache2/WinXP and database on MS SQL 2005 express.
I cannot connect to server:
Warning: mssql_connect() [function.mssql-connect]: Unable to connect to
server: TESTSERVER\SQLEXPRESS in C:\xxx\test.php on line 11
My source code test.php:
...
$connectstring = mssql_connect("TESTSERVER/SQLEXPRESS","sa","xx");
if ($connectstring == FALSE)
echo "ERROR!";
else
echo "OK!";
...
This example with MSDE2000 work ok, but with SQL2005 Express not. Help
me, please.
J.R.
I use new version ntwdblib.dll and all is OK!
http://support.microsoft.com/dllhelp...548&l=55&det=1
Jan Rok napsal(a):
> Hello,
> I have PHP 5.0.2 on Apache2/WinXP and database on MS SQL 2005 express.
> I cannot connect to server:
> Warning: mssql_connect() [function.mssql-connect]: Unable to connect to
> server: TESTSERVER\SQLEXPRESS in C:\xxx\test.php on line 11
> My source code test.php:
> ...
> $connectstring = mssql_connect("TESTSERVER/SQLEXPRESS","sa","xx");
> if ($connectstring == FALSE)
> echo "ERROR!";
> else
> echo "OK!";
> ...
> This example with MSDE2000 work ok, but with SQL2005 Express not. Help
> me, please.
> J.R.
|||What happens if you change TESTSERVER/SQLEXPRESS to TESTSERVER\SQLEXPRESS in
your connection string? Did you setup SQL Express for mixed mode access
when you installed it? By default it is Windows authentication only.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Jan Rok" <jan.rok@.email.cz> wrote in message
news:e2Z4SUXLGHA.420@.tk2msftngp13.phx.gbl...
> Hello,
> I have PHP 5.0.2 on Apache2/WinXP and database on MS SQL 2005 express.
> I cannot connect to server:
> Warning: mssql_connect() [function.mssql-connect]: Unable to connect to
> server: TESTSERVER\SQLEXPRESS in C:\xxx\test.php on line 11
> My source code test.php:
> ...
> $connectstring = mssql_connect("TESTSERVER/SQLEXPRESS","sa","xx");
> if ($connectstring == FALSE)
> echo "ERROR!";
> else
> echo "OK!";
> ...
> This example with MSDE2000 work ok, but with SQL2005 Express not. Help me,
> please.
> J.R.
Cannot connect to SQL Server with PHP
I installed Windows Server Service Pack 2 on my Windows 2003 server last night, and now my PHP application can longer connect to SQL Server running on this machine.
Specifically, the PHP command mssql_connect("servername", "username", "password") returns the following error:
Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: [servername]
I have an instance of SQL Server running on a similar machine, an it connects just fine. I've tried using the IP address instead of the server name, and I've tried invcluding the port number, but nothing works.
Has Win2003 SP2 broken PHP? What else could be going on? Nothing else has changed on this machine but SP2 and various other updates that I installed last night.
Reboot everything.
Adamus
|||I have done this several times.|||Sorry to repeat this question, but the answer I received before, to "reboot everything" was no help.
To reiterate:
"I installed Windows Server Service Pack 2 on my Windows 2003 server last night, and now my PHP application can longer connect to SQL Server running on this machine.
Specifically, the PHP command mssql_connect("servername", "username", "password") returns the following error:
Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: [servername]
I have an instance of SQL Server running on a similar machine, an it connects just fine. I've tried using the IP address instead of the server name, and I've tried invcluding the port number, but nothing works.
Has Win2003 SP2 broken PHP? What else could be going on? Nothing else has changed on this machine but SP2 and various other updates that I installed last night."
A couple of other things have come to my attention as well. I have IIS running on a different Win2003 server that has NOT had SP2 installed on it, and that is running PHP, and it can open the database on my original server with no problems. SP2 broke something in PHP on my original server.
Also, very strangely, I hav a couple of PHP scripts on my original server that other sites submit forms to, which open the database and enter records into tables. These script are apparently working fine as a number of records have been added to the DB today.
|||Anybody?|||The first thing I would check is the version of ntdblib (\windows\system32\ntwdblib.dll) on the new machine and the working machine. If they are not identical, try copying the one from the working machine to the non working machine.
If that doesn't work, then we'll look at something else.
|||What are the various other updates you installed last night? Please provide more information to specify what went wrong, specifically here is the situation and what you may want to check:
PHP is not currently a lib that we produce. Check with the provider for your mssql-connect() code and see if there is an update there that matches your server. Also check to see that you have the same PHP lib on both machines. It is possible that you are out of date on the webservice machine now that you have updated. Let's eliminate this possibility before we get to the nitty-gritty stuff.
Depending on what you updated other than Win2k3, check to see that your stack is still sane. Can you osql to the machine using named pipes or tcp? Can you ping it, telnet to it, or remote into it? Does it have internet access? There are quite a few "peripheral" programs that can interfere with your connectivity, so if you cannot enumerate them here, check through what you updated other than SP2 and see if any of those seem like they may have an effect on connectivity.
If you can provide connectivity information in the form of answers to the above questions, we might be able to identify where your connectivity is failing precisely -- this way we can give you the most helpful advice.
Additionally, if you can find out exactly what you updated other than SP2, it would be useful for diagnosis as well. Let's be sure we are pointing our finger at the right problem.
Thank you!
John (MSFT)
|||Hi, James
Without any detail info such as full-text error message and your client provider which as Jay pointed out is DB-LIB , it is hard for us diagnose your problem.
Hence,
1) First, please provide the DB-LIB error code
2) Second, can you provide more specific configuration info guided by the below link:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=362498&SiteID=1
we are looking forward to your reply and help you further.
Thanks!
Ming.
|||Did you enable remote connections ? See the screencast on my site for more information.Jens K. Suessmeyer
http://www.sqlserver2005.de
|||
Hi,
I have the same problem as James. Today I installed Service Pack 2 on Windows 2003 Service Pack 1. but after rebooting all web sites on the server that used php to connect SQL Server does not work.
We have SQL Server 2000, PHP 4.4.4 , .... on one machine. The web server is IIS 6.
Finally I uninstalled service pack 2 and it works correctly.
What is wrong in this case?
.
|||Having same problem. uninstalled sp2 and php web pages still can't connect to sql.|||My company has been having the same problem, using Small Business Server 2003, Microsoft SQL Server 2000, and PHP 5.2.3. After recently installing Service Pack 2 on the server, all of our existing, operational PHP database connections simultaneously failed, causing major havoc.Reinstalling PHP has had no effect; neither has updating (or rather using the older version) PHP's ntwdblib.dll copy to the suggested version. We have attempted tracing this problem without success--event logs show no errors, a process trace shows no errors or failures in any of the involved modules.
PHP scripts running on other computers are able to connect to the database on the affected machine without problems. PHP scripts on the affected machine can connect to other machines' databases. However, PHP scripts on the affected machine are unable to connect to the local database.
Running the PHP script from a command line produces the same issue, with the same parameters.
Based on this, I've deduced that:
1. SQL Server 2000 on the affected machine is working (can connect to the database in question from other sources than PHP from anywhere)
2. PHP on the affected machine is working (can connect from PHP on this machine to databases on other machines, though these machines are running SQL Server 2005)
3. IIS is working (PHP is being executed, the database connection is being attempted, and the connection to localhost on the affected machine fails whether the script is run from a command-line or a webpage)
Our network technicians and I have been completely unsuccessful in solving this issue, though we've been working on it for a full week since the update broke our PHP scripts. Are there any possible solutions to this issue out there?
|||
This sounds like loopback. Is your local address being resolved to 127.0.0.1? Conceivably you could alter your host file to resolve loopback to your actual ip address so that all connections are coming in through the same network. Loopback is actually on a different "network" than standard interfaces. Perhaps loopback is being blocked for this port? So localhost / machine name should resolve to your remote network address, if that works around your problem, then it is a loopback permissions issue, maybe we can pinpoint it further as we go.
Thanks,
John
|||We have attempted connections with the following:localhost
127.0.0.1
<machine name on domain>
<machine IP>
www.ourwebsite.com
ourwebsite.com
As well as all of the above with ,1443 appended, to ensure that the connection is being attempted on the standard port.
|||WesleyC we are having identical issues to you with the same version of php and sql server. we can no longer use our server since we updated the service pack. We are using core 2 by zend for our php, zend have apparently been working with microsoft on this but there is a clearly something majorly different with service pack 2 to affect this. we tried installing the service pack a while ago too when we were using php v 5.1.4 and the exact same problems occurred then. Has anyone at microsoft found a fix yet? It would be a shame to never be able to use service pack 2 especially considering the security updates in it. WesleyC if you find anything could you let us know and i will do the same.
Thank you
Harry
Friday, February 24, 2012
Cannot connect to SQL Server with PHP
I installed Windows Server Service Pack 2 on my Windows 2003 server last night, and now my PHP application can longer connect to SQL Server running on this machine.
Specifically, the PHP command mssql_connect("servername", "username", "password") returns the following error:
Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: [servername]
I have an instance of SQL Server running on a similar machine, an it connects just fine. I've tried using the IP address instead of the server name, and I've tried invcluding the port number, but nothing works.
Has Win2003 SP2 broken PHP? What else could be going on? Nothing else has changed on this machine but SP2 and various other updates that I installed last night.
Reboot everything.
Adamus
|||I have done this several times.|||Sorry to repeat this question, but the answer I received before, to "reboot everything" was no help.
To reiterate:
"I installed Windows Server Service Pack 2 on my Windows 2003 server last night, and now my PHP application can longer connect to SQL Server running on this machine.
Specifically, the PHP command mssql_connect("servername", "username", "password") returns the following error:
Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: [servername]
I have an instance of SQL Server running on a similar machine, an it connects just fine. I've tried using the IP address instead of the server name, and I've tried invcluding the port number, but nothing works.
Has Win2003 SP2 broken PHP? What else could be going on? Nothing else has changed on this machine but SP2 and various other updates that I installed last night."
A couple of other things have come to my attention as well. I have IIS running on a different Win2003 server that has NOT had SP2 installed on it, and that is running PHP, and it can open the database on my original server with no problems. SP2 broke something in PHP on my original server.
Also, very strangely, I hav a couple of PHP scripts on my original server that other sites submit forms to, which open the database and enter records into tables. These script are apparently working fine as a number of records have been added to the DB today.
|||Anybody?|||The first thing I would check is the version of ntdblib (\windows\system32\ntwdblib.dll) on the new machine and the working machine. If they are not identical, try copying the one from the working machine to the non working machine.
If that doesn't work, then we'll look at something else.
|||What are the various other updates you installed last night? Please provide more information to specify what went wrong, specifically here is the situation and what you may want to check:
PHP is not currently a lib that we produce. Check with the provider for your mssql-connect() code and see if there is an update there that matches your server. Also check to see that you have the same PHP lib on both machines. It is possible that you are out of date on the webservice machine now that you have updated. Let's eliminate this possibility before we get to the nitty-gritty stuff.
Depending on what you updated other than Win2k3, check to see that your stack is still sane. Can you osql to the machine using named pipes or tcp? Can you ping it, telnet to it, or remote into it? Does it have internet access? There are quite a few "peripheral" programs that can interfere with your connectivity, so if you cannot enumerate them here, check through what you updated other than SP2 and see if any of those seem like they may have an effect on connectivity.
If you can provide connectivity information in the form of answers to the above questions, we might be able to identify where your connectivity is failing precisely -- this way we can give you the most helpful advice.
Additionally, if you can find out exactly what you updated other than SP2, it would be useful for diagnosis as well. Let's be sure we are pointing our finger at the right problem.
Thank you!
John (MSFT)
|||Hi, James
Without any detail info such as full-text error message and your client provider which as Jay pointed out is DB-LIB , it is hard for us diagnose your problem.
Hence,
1) First, please provide the DB-LIB error code
2) Second, can you provide more specific configuration info guided by the below link:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=362498&SiteID=1
we are looking forward to your reply and help you further.
Thanks!
Ming.
|||Did you enable remote connections ? See the screencast on my site for more information.Jens K. Suessmeyer
http://www.sqlserver2005.de
|||
Hi,
I have the same problem as James. Today I installed Service Pack 2 on Windows 2003 Service Pack 1. but after rebooting all web sites on the server that used php to connect SQL Server does not work.
We have SQL Server 2000, PHP 4.4.4 , .... on one machine. The web server is IIS 6.
Finally I uninstalled service pack 2 and it works correctly.
What is wrong in this case?
.
|||Having same problem. uninstalled sp2 and php web pages still can't connect to sql.|||My company has been having the same problem, using Small Business Server 2003, Microsoft SQL Server 2000, and PHP 5.2.3. After recently installing Service Pack 2 on the server, all of our existing, operational PHP database connections simultaneously failed, causing major havoc.Reinstalling PHP has had no effect; neither has updating (or rather using the older version) PHP's ntwdblib.dll copy to the suggested version. We have attempted tracing this problem without success--event logs show no errors, a process trace shows no errors or failures in any of the involved modules.
PHP scripts running on other computers are able to connect to the database on the affected machine without problems. PHP scripts on the affected machine can connect to other machines' databases. However, PHP scripts on the affected machine are unable to connect to the local database.
Running the PHP script from a command line produces the same issue, with the same parameters.
Based on this, I've deduced that:
1. SQL Server 2000 on the affected machine is working (can connect to the database in question from other sources than PHP from anywhere)
2. PHP on the affected machine is working (can connect from PHP on this machine to databases on other machines, though these machines are running SQL Server 2005)
3. IIS is working (PHP is being executed, the database connection is being attempted, and the connection to localhost on the affected machine fails whether the script is run from a command-line or a webpage)
Our network technicians and I have been completely unsuccessful in solving this issue, though we've been working on it for a full week since the update broke our PHP scripts. Are there any possible solutions to this issue out there?
|||
This sounds like loopback. Is your local address being resolved to 127.0.0.1? Conceivably you could alter your host file to resolve loopback to your actual ip address so that all connections are coming in through the same network. Loopback is actually on a different "network" than standard interfaces. Perhaps loopback is being blocked for this port? So localhost / machine name should resolve to your remote network address, if that works around your problem, then it is a loopback permissions issue, maybe we can pinpoint it further as we go.
Thanks,
John
|||We have attempted connections with the following:localhost
127.0.0.1
<machine name on domain>
<machine IP>
www.ourwebsite.com
ourwebsite.com
As well as all of the above with ,1443 appended, to ensure that the connection is being attempted on the standard port.
|||WesleyC we are having identical issues to you with the same version of php and sql server. we can no longer use our server since we updated the service pack. We are using core 2 by zend for our php, zend have apparently been working with microsoft on this but there is a clearly something majorly different with service pack 2 to affect this. we tried installing the service pack a while ago too when we were using php v 5.1.4 and the exact same problems occurred then. Has anyone at microsoft found a fix yet? It would be a shame to never be able to use service pack 2 especially considering the security updates in it. WesleyC if you find anything could you let us know and i will do the same.
Thank you
Harry
Cannot connect to SQL Server with PHP
I installed Windows Server Service Pack 2 on my Windows 2003 server last night, and now my PHP application can longer connect to SQL Server running on this machine.
Specifically, the PHP command mssql_connect("servername", "username", "password") returns the following error:
Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: [servername]
I have an instance of SQL Server running on a similar machine, an it connects just fine. I've tried using the IP address instead of the server name, and I've tried invcluding the port number, but nothing works.
Has Win2003 SP2 broken PHP? What else could be going on? Nothing else has changed on this machine but SP2 and various other updates that I installed last night.
Reboot everything.
Adamus
|||I have done this several times.|||Sorry to repeat this question, but the answer I received before, to "reboot everything" was no help.
To reiterate:
"I installed Windows Server Service Pack 2 on my Windows 2003 server last night, and now my PHP application can longer connect to SQL Server running on this machine.
Specifically, the PHP command mssql_connect("servername", "username", "password") returns the following error:
Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: [servername]
I have an instance of SQL Server running on a similar machine, an it connects just fine. I've tried using the IP address instead of the server name, and I've tried invcluding the port number, but nothing works.
Has Win2003 SP2 broken PHP? What else could be going on? Nothing else has changed on this machine but SP2 and various other updates that I installed last night."
A couple of other things have come to my attention as well. I have IIS running on a different Win2003 server that has NOT had SP2 installed on it, and that is running PHP, and it can open the database on my original server with no problems. SP2 broke something in PHP on my original server.
Also, very strangely, I hav a couple of PHP scripts on my original server that other sites submit forms to, which open the database and enter records into tables. These script are apparently working fine as a number of records have been added to the DB today.
|||Anybody?|||The first thing I would check is the version of ntdblib (\windows\system32\ntwdblib.dll) on the new machine and the working machine. If they are not identical, try copying the one from the working machine to the non working machine.
If that doesn't work, then we'll look at something else.
|||What are the various other updates you installed last night? Please provide more information to specify what went wrong, specifically here is the situation and what you may want to check:
PHP is not currently a lib that we produce. Check with the provider for your mssql-connect() code and see if there is an update there that matches your server. Also check to see that you have the same PHP lib on both machines. It is possible that you are out of date on the webservice machine now that you have updated. Let's eliminate this possibility before we get to the nitty-gritty stuff.
Depending on what you updated other than Win2k3, check to see that your stack is still sane. Can you osql to the machine using named pipes or tcp? Can you ping it, telnet to it, or remote into it? Does it have internet access? There are quite a few "peripheral" programs that can interfere with your connectivity, so if you cannot enumerate them here, check through what you updated other than SP2 and see if any of those seem like they may have an effect on connectivity.
If you can provide connectivity information in the form of answers to the above questions, we might be able to identify where your connectivity is failing precisely -- this way we can give you the most helpful advice.
Additionally, if you can find out exactly what you updated other than SP2, it would be useful for diagnosis as well. Let's be sure we are pointing our finger at the right problem.
Thank you!
John (MSFT)
|||Hi, James
Without any detail info such as full-text error message and your client provider which as Jay pointed out is DB-LIB , it is hard for us diagnose your problem.
Hence,
1) First, please provide the DB-LIB error code
2) Second, can you provide more specific configuration info guided by the below link:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=362498&SiteID=1
we are looking forward to your reply and help you further.
Thanks!
Ming.
|||Did you enable remote connections ? See the screencast on my site for more information.Jens K. Suessmeyer
http://www.sqlserver2005.de
|||
Hi,
I have the same problem as James. Today I installed Service Pack 2 on Windows 2003 Service Pack 1. but after rebooting all web sites on the server that used php to connect SQL Server does not work.
We have SQL Server 2000, PHP 4.4.4 , .... on one machine. The web server is IIS 6.
Finally I uninstalled service pack 2 and it works correctly.
What is wrong in this case?
.
|||Having same problem. uninstalled sp2 and php web pages still can't connect to sql.|||My company has been having the same problem, using Small Business Server 2003, Microsoft SQL Server 2000, and PHP 5.2.3. After recently installing Service Pack 2 on the server, all of our existing, operational PHP database connections simultaneously failed, causing major havoc.Reinstalling PHP has had no effect; neither has updating (or rather using the older version) PHP's ntwdblib.dll copy to the suggested version. We have attempted tracing this problem without success--event logs show no errors, a process trace shows no errors or failures in any of the involved modules.
PHP scripts running on other computers are able to connect to the database on the affected machine without problems. PHP scripts on the affected machine can connect to other machines' databases. However, PHP scripts on the affected machine are unable to connect to the local database.
Running the PHP script from a command line produces the same issue, with the same parameters.
Based on this, I've deduced that:
1. SQL Server 2000 on the affected machine is working (can connect to the database in question from other sources than PHP from anywhere)
2. PHP on the affected machine is working (can connect from PHP on this machine to databases on other machines, though these machines are running SQL Server 2005)
3. IIS is working (PHP is being executed, the database connection is being attempted, and the connection to localhost on the affected machine fails whether the script is run from a command-line or a webpage)
Our network technicians and I have been completely unsuccessful in solving this issue, though we've been working on it for a full week since the update broke our PHP scripts. Are there any possible solutions to this issue out there?
|||
This sounds like loopback. Is your local address being resolved to 127.0.0.1? Conceivably you could alter your host file to resolve loopback to your actual ip address so that all connections are coming in through the same network. Loopback is actually on a different "network" than standard interfaces. Perhaps loopback is being blocked for this port? So localhost / machine name should resolve to your remote network address, if that works around your problem, then it is a loopback permissions issue, maybe we can pinpoint it further as we go.
Thanks,
John
|||We have attempted connections with the following:localhost
127.0.0.1
<machine name on domain>
<machine IP>
www.ourwebsite.com
ourwebsite.com
As well as all of the above with ,1443 appended, to ensure that the connection is being attempted on the standard port.
|||WesleyC we are having identical issues to you with the same version of php and sql server. we can no longer use our server since we updated the service pack. We are using core 2 by zend for our php, zend have apparently been working with microsoft on this but there is a clearly something majorly different with service pack 2 to affect this. we tried installing the service pack a while ago too when we were using php v 5.1.4 and the exact same problems occurred then. Has anyone at microsoft found a fix yet? It would be a shame to never be able to use service pack 2 especially considering the security updates in it. WesleyC if you find anything could you let us know and i will do the same.
Thank you
Harry
Cannot connect to SQL Server with PHP
I installed Windows Server Service Pack 2 on my Windows 2003 server last night, and now my PHP application can longer connect to SQL Server running on this machine.
Specifically, the PHP command mssql_connect("servername", "username", "password") returns the following error:
Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: [servername]
I have an instance of SQL Server running on a similar machine, an it connects just fine. I've tried using the IP address instead of the server name, and I've tried invcluding the port number, but nothing works.
Has Win2003 SP2 broken PHP? What else could be going on? Nothing else has changed on this machine but SP2 and various other updates that I installed last night.
Reboot everything.
Adamus
|||I have done this several times.|||Sorry to repeat this question, but the answer I received before, to "reboot everything" was no help.
To reiterate:
"I installed Windows Server Service Pack 2 on my Windows 2003 server last night, and now my PHP application can longer connect to SQL Server running on this machine.
Specifically, the PHP command mssql_connect("servername", "username", "password") returns the following error:
Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: [servername]
I have an instance of SQL Server running on a similar machine, an it connects just fine. I've tried using the IP address instead of the server name, and I've tried invcluding the port number, but nothing works.
Has Win2003 SP2 broken PHP? What else could be going on? Nothing else has changed on this machine but SP2 and various other updates that I installed last night."
A couple of other things have come to my attention as well. I have IIS running on a different Win2003 server that has NOT had SP2 installed on it, and that is running PHP, and it can open the database on my original server with no problems. SP2 broke something in PHP on my original server.
Also, very strangely, I hav a couple of PHP scripts on my original server that other sites submit forms to, which open the database and enter records into tables. These script are apparently working fine as a number of records have been added to the DB today.
|||Anybody?|||The first thing I would check is the version of ntdblib (\windows\system32\ntwdblib.dll) on the new machine and the working machine. If they are not identical, try copying the one from the working machine to the non working machine.
If that doesn't work, then we'll look at something else.
|||What are the various other updates you installed last night? Please provide more information to specify what went wrong, specifically here is the situation and what you may want to check:
PHP is not currently a lib that we produce. Check with the provider for your mssql-connect() code and see if there is an update there that matches your server. Also check to see that you have the same PHP lib on both machines. It is possible that you are out of date on the webservice machine now that you have updated. Let's eliminate this possibility before we get to the nitty-gritty stuff.
Depending on what you updated other than Win2k3, check to see that your stack is still sane. Can you osql to the machine using named pipes or tcp? Can you ping it, telnet to it, or remote into it? Does it have internet access? There are quite a few "peripheral" programs that can interfere with your connectivity, so if you cannot enumerate them here, check through what you updated other than SP2 and see if any of those seem like they may have an effect on connectivity.
If you can provide connectivity information in the form of answers to the above questions, we might be able to identify where your connectivity is failing precisely -- this way we can give you the most helpful advice.
Additionally, if you can find out exactly what you updated other than SP2, it would be useful for diagnosis as well. Let's be sure we are pointing our finger at the right problem.
Thank you!
John (MSFT)
|||Hi, James
Without any detail info such as full-text error message and your client provider which as Jay pointed out is DB-LIB , it is hard for us diagnose your problem.
Hence,
1) First, please provide the DB-LIB error code
2) Second, can you provide more specific configuration info guided by the below link:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=362498&SiteID=1
we are looking forward to your reply and help you further.
Thanks!
Ming.
|||Did you enable remote connections ? See the screencast on my site for more information.Jens K. Suessmeyer
http://www.sqlserver2005.de
|||
Hi,
I have the same problem as James. Today I installed Service Pack 2 on Windows 2003 Service Pack 1. but after rebooting all web sites on the server that used php to connect SQL Server does not work.
We have SQL Server 2000, PHP 4.4.4 , .... on one machine. The web server is IIS 6.
Finally I uninstalled service pack 2 and it works correctly.
What is wrong in this case?
.
|||Having same problem. uninstalled sp2 and php web pages still can't connect to sql.|||My company has been having the same problem, using Small Business Server 2003, Microsoft SQL Server 2000, and PHP 5.2.3. After recently installing Service Pack 2 on the server, all of our existing, operational PHP database connections simultaneously failed, causing major havoc.Reinstalling PHP has had no effect; neither has updating (or rather using the older version) PHP's ntwdblib.dll copy to the suggested version. We have attempted tracing this problem without success--event logs show no errors, a process trace shows no errors or failures in any of the involved modules.
PHP scripts running on other computers are able to connect to the database on the affected machine without problems. PHP scripts on the affected machine can connect to other machines' databases. However, PHP scripts on the affected machine are unable to connect to the local database.
Running the PHP script from a command line produces the same issue, with the same parameters.
Based on this, I've deduced that:
1. SQL Server 2000 on the affected machine is working (can connect to the database in question from other sources than PHP from anywhere)
2. PHP on the affected machine is working (can connect from PHP on this machine to databases on other machines, though these machines are running SQL Server 2005)
3. IIS is working (PHP is being executed, the database connection is being attempted, and the connection to localhost on the affected machine fails whether the script is run from a command-line or a webpage)
Our network technicians and I have been completely unsuccessful in solving this issue, though we've been working on it for a full week since the update broke our PHP scripts. Are there any possible solutions to this issue out there?
|||
This sounds like loopback. Is your local address being resolved to 127.0.0.1? Conceivably you could alter your host file to resolve loopback to your actual ip address so that all connections are coming in through the same network. Loopback is actually on a different "network" than standard interfaces. Perhaps loopback is being blocked for this port? So localhost / machine name should resolve to your remote network address, if that works around your problem, then it is a loopback permissions issue, maybe we can pinpoint it further as we go.
Thanks,
John
|||We have attempted connections with the following:localhost
127.0.0.1
<machine name on domain>
<machine IP>
www.ourwebsite.com
ourwebsite.com
As well as all of the above with ,1443 appended, to ensure that the connection is being attempted on the standard port.
|||WesleyC we are having identical issues to you with the same version of php and sql server. we can no longer use our server since we updated the service pack. We are using core 2 by zend for our php, zend have apparently been working with microsoft on this but there is a clearly something majorly different with service pack 2 to affect this. we tried installing the service pack a while ago too when we were using php v 5.1.4 and the exact same problems occurred then. Has anyone at microsoft found a fix yet? It would be a shame to never be able to use service pack 2 especially considering the security updates in it. WesleyC if you find anything could you let us know and i will do the same.
Thank you
Harry
Cannot connect to SQL Server with PHP
I installed Windows Server Service Pack 2 on my Windows 2003 server last night, and now my PHP application can longer connect to SQL Server running on this machine.
Specifically, the PHP command mssql_connect("servername", "username", "password") returns the following error:
Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: [servername]
I have an instance of SQL Server running on a similar machine, an it connects just fine. I've tried using the IP address instead of the server name, and I've tried invcluding the port number, but nothing works.
Has Win2003 SP2 broken PHP? What else could be going on? Nothing else has changed on this machine but SP2 and various other updates that I installed last night.
Reboot everything.
Adamus
|||I have done this several times.|||Sorry to repeat this question, but the answer I received before, to "reboot everything" was no help.
To reiterate:
"I installed Windows Server Service Pack 2 on my Windows 2003 server last night, and now my PHP application can longer connect to SQL Server running on this machine.
Specifically, the PHP command mssql_connect("servername", "username", "password") returns the following error:
Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: [servername]
I have an instance of SQL Server running on a similar machine, an it connects just fine. I've tried using the IP address instead of the server name, and I've tried invcluding the port number, but nothing works.
Has Win2003 SP2 broken PHP? What else could be going on? Nothing else has changed on this machine but SP2 and various other updates that I installed last night."
A couple of other things have come to my attention as well. I have IIS running on a different Win2003 server that has NOT had SP2 installed on it, and that is running PHP, and it can open the database on my original server with no problems. SP2 broke something in PHP on my original server.
Also, very strangely, I hav a couple of PHP scripts on my original server that other sites submit forms to, which open the database and enter records into tables. These script are apparently working fine as a number of records have been added to the DB today.
|||Anybody?|||The first thing I would check is the version of ntdblib (\windows\system32\ntwdblib.dll) on the new machine and the working machine. If they are not identical, try copying the one from the working machine to the non working machine.
If that doesn't work, then we'll look at something else.
|||What are the various other updates you installed last night? Please provide more information to specify what went wrong, specifically here is the situation and what you may want to check:
PHP is not currently a lib that we produce. Check with the provider for your mssql-connect() code and see if there is an update there that matches your server. Also check to see that you have the same PHP lib on both machines. It is possible that you are out of date on the webservice machine now that you have updated. Let's eliminate this possibility before we get to the nitty-gritty stuff.
Depending on what you updated other than Win2k3, check to see that your stack is still sane. Can you osql to the machine using named pipes or tcp? Can you ping it, telnet to it, or remote into it? Does it have internet access? There are quite a few "peripheral" programs that can interfere with your connectivity, so if you cannot enumerate them here, check through what you updated other than SP2 and see if any of those seem like they may have an effect on connectivity.
If you can provide connectivity information in the form of answers to the above questions, we might be able to identify where your connectivity is failing precisely -- this way we can give you the most helpful advice.
Additionally, if you can find out exactly what you updated other than SP2, it would be useful for diagnosis as well. Let's be sure we are pointing our finger at the right problem.
Thank you!
John (MSFT)
|||Hi, James
Without any detail info such as full-text error message and your client provider which as Jay pointed out is DB-LIB , it is hard for us diagnose your problem.
Hence,
1) First, please provide the DB-LIB error code
2) Second, can you provide more specific configuration info guided by the below link:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=362498&SiteID=1
we are looking forward to your reply and help you further.
Thanks!
Ming.
|||Did you enable remote connections ? See the screencast on my site for more information.Jens K. Suessmeyer
http://www.sqlserver2005.de
|||
Hi,
I have the same problem as James. Today I installed Service Pack 2 on Windows 2003 Service Pack 1. but after rebooting all web sites on the server that used php to connect SQL Server does not work.
We have SQL Server 2000, PHP 4.4.4 , .... on one machine. The web server is IIS 6.
Finally I uninstalled service pack 2 and it works correctly.
What is wrong in this case?
.
|||Having same problem. uninstalled sp2 and php web pages still can't connect to sql.|||My company has been having the same problem, using Small Business Server 2003, Microsoft SQL Server 2000, and PHP 5.2.3. After recently installing Service Pack 2 on the server, all of our existing, operational PHP database connections simultaneously failed, causing major havoc.Reinstalling PHP has had no effect; neither has updating (or rather using the older version) PHP's ntwdblib.dll copy to the suggested version. We have attempted tracing this problem without success--event logs show no errors, a process trace shows no errors or failures in any of the involved modules.
PHP scripts running on other computers are able to connect to the database on the affected machine without problems. PHP scripts on the affected machine can connect to other machines' databases. However, PHP scripts on the affected machine are unable to connect to the local database.
Running the PHP script from a command line produces the same issue, with the same parameters.
Based on this, I've deduced that:
1. SQL Server 2000 on the affected machine is working (can connect to the database in question from other sources than PHP from anywhere)
2. PHP on the affected machine is working (can connect from PHP on this machine to databases on other machines, though these machines are running SQL Server 2005)
3. IIS is working (PHP is being executed, the database connection is being attempted, and the connection to localhost on the affected machine fails whether the script is run from a command-line or a webpage)
Our network technicians and I have been completely unsuccessful in solving this issue, though we've been working on it for a full week since the update broke our PHP scripts. Are there any possible solutions to this issue out there?
|||
This sounds like loopback. Is your local address being resolved to 127.0.0.1? Conceivably you could alter your host file to resolve loopback to your actual ip address so that all connections are coming in through the same network. Loopback is actually on a different "network" than standard interfaces. Perhaps loopback is being blocked for this port? So localhost / machine name should resolve to your remote network address, if that works around your problem, then it is a loopback permissions issue, maybe we can pinpoint it further as we go.
Thanks,
John
|||We have attempted connections with the following:localhost
127.0.0.1
<machine name on domain>
<machine IP>
www.ourwebsite.com
ourwebsite.com
As well as all of the above with ,1443 appended, to ensure that the connection is being attempted on the standard port.
|||WesleyC we are having identical issues to you with the same version of php and sql server. we can no longer use our server since we updated the service pack. We are using core 2 by zend for our php, zend have apparently been working with microsoft on this but there is a clearly something majorly different with service pack 2 to affect this. we tried installing the service pack a while ago too when we were using php v 5.1.4 and the exact same problems occurred then. Has anyone at microsoft found a fix yet? It would be a shame to never be able to use service pack 2 especially considering the security updates in it. WesleyC if you find anything could you let us know and i will do the same.
Thank you
Harry
Cannot connect to SQL Server with PHP
I installed Windows Server Service Pack 2 on my Windows 2003 server last night, and now my PHP application can longer connect to SQL Server running on this machine.
Specifically, the PHP command mssql_connect("servername", "username", "password") returns the following error:
Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: [servername]
I have an instance of SQL Server running on a similar machine, an it connects just fine. I've tried using the IP address instead of the server name, and I've tried invcluding the port number, but nothing works.
Has Win2003 SP2 broken PHP? What else could be going on? Nothing else has changed on this machine but SP2 and various other updates that I installed last night.
Reboot everything.
Adamus
|||I have done this several times.|||Sorry to repeat this question, but the answer I received before, to "reboot everything" was no help.
To reiterate:
"I installed Windows Server Service Pack 2 on my Windows 2003 server last night, and now my PHP application can longer connect to SQL Server running on this machine.
Specifically, the PHP command mssql_connect("servername", "username", "password") returns the following error:
Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: [servername]
I have an instance of SQL Server running on a similar machine, an it connects just fine. I've tried using the IP address instead of the server name, and I've tried invcluding the port number, but nothing works.
Has Win2003 SP2 broken PHP? What else could be going on? Nothing else has changed on this machine but SP2 and various other updates that I installed last night."
A couple of other things have come to my attention as well. I have IIS running on a different Win2003 server that has NOT had SP2 installed on it, and that is running PHP, and it can open the database on my original server with no problems. SP2 broke something in PHP on my original server.
Also, very strangely, I hav a couple of PHP scripts on my original server that other sites submit forms to, which open the database and enter records into tables. These script are apparently working fine as a number of records have been added to the DB today.
|||Anybody?|||The first thing I would check is the version of ntdblib (\windows\system32\ntwdblib.dll) on the new machine and the working machine. If they are not identical, try copying the one from the working machine to the non working machine.
If that doesn't work, then we'll look at something else.
|||What are the various other updates you installed last night? Please provide more information to specify what went wrong, specifically here is the situation and what you may want to check:
PHP is not currently a lib that we produce. Check with the provider for your mssql-connect() code and see if there is an update there that matches your server. Also check to see that you have the same PHP lib on both machines. It is possible that you are out of date on the webservice machine now that you have updated. Let's eliminate this possibility before we get to the nitty-gritty stuff.
Depending on what you updated other than Win2k3, check to see that your stack is still sane. Can you osql to the machine using named pipes or tcp? Can you ping it, telnet to it, or remote into it? Does it have internet access? There are quite a few "peripheral" programs that can interfere with your connectivity, so if you cannot enumerate them here, check through what you updated other than SP2 and see if any of those seem like they may have an effect on connectivity.
If you can provide connectivity information in the form of answers to the above questions, we might be able to identify where your connectivity is failing precisely -- this way we can give you the most helpful advice.
Additionally, if you can find out exactly what you updated other than SP2, it would be useful for diagnosis as well. Let's be sure we are pointing our finger at the right problem.
Thank you!
John (MSFT)
|||Hi, James
Without any detail info such as full-text error message and your client provider which as Jay pointed out is DB-LIB , it is hard for us diagnose your problem.
Hence,
1) First, please provide the DB-LIB error code
2) Second, can you provide more specific configuration info guided by the below link:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=362498&SiteID=1
we are looking forward to your reply and help you further.
Thanks!
Ming.
|||Did you enable remote connections ? See the screencast on my site for more information.Jens K. Suessmeyer
http://www.sqlserver2005.de
|||
Hi,
I have the same problem as James. Today I installed Service Pack 2 on Windows 2003 Service Pack 1. but after rebooting all web sites on the server that used php to connect SQL Server does not work.
We have SQL Server 2000, PHP 4.4.4 , .... on one machine. The web server is IIS 6.
Finally I uninstalled service pack 2 and it works correctly.
What is wrong in this case?
.
|||Having same problem. uninstalled sp2 and php web pages still can't connect to sql.|||My company has been having the same problem, using Small Business Server 2003, Microsoft SQL Server 2000, and PHP 5.2.3. After recently installing Service Pack 2 on the server, all of our existing, operational PHP database connections simultaneously failed, causing major havoc.Reinstalling PHP has had no effect; neither has updating (or rather using the older version) PHP's ntwdblib.dll copy to the suggested version. We have attempted tracing this problem without success--event logs show no errors, a process trace shows no errors or failures in any of the involved modules.
PHP scripts running on other computers are able to connect to the database on the affected machine without problems. PHP scripts on the affected machine can connect to other machines' databases. However, PHP scripts on the affected machine are unable to connect to the local database.
Running the PHP script from a command line produces the same issue, with the same parameters.
Based on this, I've deduced that:
1. SQL Server 2000 on the affected machine is working (can connect to the database in question from other sources than PHP from anywhere)
2. PHP on the affected machine is working (can connect from PHP on this machine to databases on other machines, though these machines are running SQL Server 2005)
3. IIS is working (PHP is being executed, the database connection is being attempted, and the connection to localhost on the affected machine fails whether the script is run from a command-line or a webpage)
Our network technicians and I have been completely unsuccessful in solving this issue, though we've been working on it for a full week since the update broke our PHP scripts. Are there any possible solutions to this issue out there?
|||
This sounds like loopback. Is your local address being resolved to 127.0.0.1? Conceivably you could alter your host file to resolve loopback to your actual ip address so that all connections are coming in through the same network. Loopback is actually on a different "network" than standard interfaces. Perhaps loopback is being blocked for this port? So localhost / machine name should resolve to your remote network address, if that works around your problem, then it is a loopback permissions issue, maybe we can pinpoint it further as we go.
Thanks,
John
|||We have attempted connections with the following:localhost
127.0.0.1
<machine name on domain>
<machine IP>
www.ourwebsite.com
ourwebsite.com
As well as all of the above with ,1443 appended, to ensure that the connection is being attempted on the standard port.
|||WesleyC we are having identical issues to you with the same version of php and sql server. we can no longer use our server since we updated the service pack. We are using core 2 by zend for our php, zend have apparently been working with microsoft on this but there is a clearly something majorly different with service pack 2 to affect this. we tried installing the service pack a while ago too when we were using php v 5.1.4 and the exact same problems occurred then. Has anyone at microsoft found a fix yet? It would be a shame to never be able to use service pack 2 especially considering the security updates in it. WesleyC if you find anything could you let us know and i will do the same.
Thank you
Harry
Cannot connect to SQL Server with PHP
I installed Windows Server Service Pack 2 on my Windows 2003 server last night, and now my PHP application can longer connect to SQL Server running on this machine.
Specifically, the PHP command mssql_connect("servername", "username", "password") returns the following error:
Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: [servername]
I have an instance of SQL Server running on a similar machine, an it connects just fine. I've tried using the IP address instead of the server name, and I've tried invcluding the port number, but nothing works.
Has Win2003 SP2 broken PHP? What else could be going on? Nothing else has changed on this machine but SP2 and various other updates that I installed last night.
Reboot everything.
Adamus
|||I have done this several times.|||Sorry to repeat this question, but the answer I received before, to "reboot everything" was no help.
To reiterate:
"I installed Windows Server Service Pack 2 on my Windows 2003 server last night, and now my PHP application can longer connect to SQL Server running on this machine.
Specifically, the PHP command mssql_connect("servername", "username", "password") returns the following error:
Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: [servername]
I have an instance of SQL Server running on a similar machine, an it connects just fine. I've tried using the IP address instead of the server name, and I've tried invcluding the port number, but nothing works.
Has Win2003 SP2 broken PHP? What else could be going on? Nothing else has changed on this machine but SP2 and various other updates that I installed last night."
A couple of other things have come to my attention as well. I have IIS running on a different Win2003 server that has NOT had SP2 installed on it, and that is running PHP, and it can open the database on my original server with no problems. SP2 broke something in PHP on my original server.
Also, very strangely, I hav a couple of PHP scripts on my original server that other sites submit forms to, which open the database and enter records into tables. These script are apparently working fine as a number of records have been added to the DB today.
|||Anybody?|||The first thing I would check is the version of ntdblib (\windows\system32\ntwdblib.dll) on the new machine and the working machine. If they are not identical, try copying the one from the working machine to the non working machine.
If that doesn't work, then we'll look at something else.
|||What are the various other updates you installed last night? Please provide more information to specify what went wrong, specifically here is the situation and what you may want to check:
PHP is not currently a lib that we produce. Check with the provider for your mssql-connect() code and see if there is an update there that matches your server. Also check to see that you have the same PHP lib on both machines. It is possible that you are out of date on the webservice machine now that you have updated. Let's eliminate this possibility before we get to the nitty-gritty stuff.
Depending on what you updated other than Win2k3, check to see that your stack is still sane. Can you osql to the machine using named pipes or tcp? Can you ping it, telnet to it, or remote into it? Does it have internet access? There are quite a few "peripheral" programs that can interfere with your connectivity, so if you cannot enumerate them here, check through what you updated other than SP2 and see if any of those seem like they may have an effect on connectivity.
If you can provide connectivity information in the form of answers to the above questions, we might be able to identify where your connectivity is failing precisely -- this way we can give you the most helpful advice.
Additionally, if you can find out exactly what you updated other than SP2, it would be useful for diagnosis as well. Let's be sure we are pointing our finger at the right problem.
Thank you!
John (MSFT)
|||Hi, James
Without any detail info such as full-text error message and your client provider which as Jay pointed out is DB-LIB , it is hard for us diagnose your problem.
Hence,
1) First, please provide the DB-LIB error code
2) Second, can you provide more specific configuration info guided by the below link:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=362498&SiteID=1
we are looking forward to your reply and help you further.
Thanks!
Ming.
|||Did you enable remote connections ? See the screencast on my site for more information.Jens K. Suessmeyer
http://www.sqlserver2005.de
|||
Hi,
I have the same problem as James. Today I installed Service Pack 2 on Windows 2003 Service Pack 1. but after rebooting all web sites on the server that used php to connect SQL Server does not work.
We have SQL Server 2000, PHP 4.4.4 , .... on one machine. The web server is IIS 6.
Finally I uninstalled service pack 2 and it works correctly.
What is wrong in this case?
.
|||Having same problem. uninstalled sp2 and php web pages still can't connect to sql.|||My company has been having the same problem, using Small Business Server 2003, Microsoft SQL Server 2000, and PHP 5.2.3. After recently installing Service Pack 2 on the server, all of our existing, operational PHP database connections simultaneously failed, causing major havoc.Reinstalling PHP has had no effect; neither has updating (or rather using the older version) PHP's ntwdblib.dll copy to the suggested version. We have attempted tracing this problem without success--event logs show no errors, a process trace shows no errors or failures in any of the involved modules.
PHP scripts running on other computers are able to connect to the database on the affected machine without problems. PHP scripts on the affected machine can connect to other machines' databases. However, PHP scripts on the affected machine are unable to connect to the local database.
Running the PHP script from a command line produces the same issue, with the same parameters.
Based on this, I've deduced that:
1. SQL Server 2000 on the affected machine is working (can connect to the database in question from other sources than PHP from anywhere)
2. PHP on the affected machine is working (can connect from PHP on this machine to databases on other machines, though these machines are running SQL Server 2005)
3. IIS is working (PHP is being executed, the database connection is being attempted, and the connection to localhost on the affected machine fails whether the script is run from a command-line or a webpage)
Our network technicians and I have been completely unsuccessful in solving this issue, though we've been working on it for a full week since the update broke our PHP scripts. Are there any possible solutions to this issue out there?
|||
This sounds like loopback. Is your local address being resolved to 127.0.0.1? Conceivably you could alter your host file to resolve loopback to your actual ip address so that all connections are coming in through the same network. Loopback is actually on a different "network" than standard interfaces. Perhaps loopback is being blocked for this port? So localhost / machine name should resolve to your remote network address, if that works around your problem, then it is a loopback permissions issue, maybe we can pinpoint it further as we go.
Thanks,
John
|||We have attempted connections with the following:localhost
127.0.0.1
<machine name on domain>
<machine IP>
www.ourwebsite.com
ourwebsite.com
As well as all of the above with ,1443 appended, to ensure that the connection is being attempted on the standard port.
|||WesleyC we are having identical issues to you with the same version of php and sql server. we can no longer use our server since we updated the service pack. We are using core 2 by zend for our php, zend have apparently been working with microsoft on this but there is a clearly something majorly different with service pack 2 to affect this. we tried installing the service pack a while ago too when we were using php v 5.1.4 and the exact same problems occurred then. Has anyone at microsoft found a fix yet? It would be a shame to never be able to use service pack 2 especially considering the security updates in it. WesleyC if you find anything could you let us know and i will do the same.
Thank you
Harry
Sunday, February 12, 2012
Cannot connect to database error
2000-SP3, application in PHP. We sporadically get the message cannot connec
t
to database'. Sometimes it seems to go away when we restart the database,
but that is not a sure thing to fix it. Am wondering if sp3a will be the
magic bullet? Or is there something else that I should be looking at?
Thank you for your assistance.
SueThe difference between SP3 and SP3a is in the setup so applying it won't
make any difference.
Check the SQL Server errorlog (exec master..xp_readerrorlog) and check for
any messages in there, my thinking is may be you are running out of
concurrent connections due licence restriction.
Also, when the problem happens, run sp_who2 to check for blocking.
Tony.
Tony Rogerson
SQL Server MVP
http://www.sqlserverfaq.com?mbr=21
(Create your own groups, Forum, FAQ's and a ton more)|||Do you have any specific error msg? (DBNETLIB Error?)
Sasan Saidi, MSc in cs
Senior DBA
Brascan Business Services
"I saw it work in a cartoon once so I am pretty sure I can do it."
"Sue" wrote:
> We have a new application, running on Windows Server 2003, SQL Server
> 2000-SP3, application in PHP. We sporadically get the message cannot conn
ect
> to database'. Sometimes it seems to go away when we restart the database,
> but that is not a sure thing to fix it. Am wondering if sp3a will be the
> magic bullet? Or is there something else that I should be looking at?
> Thank you for your assistance.
> Sue
Cannot connect to database error
2000-SP3, application in PHP. We sporadically get the message cannot connect
to database'. Sometimes it seems to go away when we restart the database,
but that is not a sure thing to fix it. Am wondering if sp3a will be the
magic bullet? Or is there something else that I should be looking at?
Thank you for your assistance.
SueThe difference between SP3 and SP3a is in the setup so applying it won't
make any difference.
Check the SQL Server errorlog (exec master..xp_readerrorlog) and check for
any messages in there, my thinking is may be you are running out of
concurrent connections due licence restriction.
Also, when the problem happens, run sp_who2 to check for blocking.
Tony.
--
Tony Rogerson
SQL Server MVP
http://www.sqlserverfaq.com?mbr=21
(Create your own groups, Forum, FAQ's and a ton more)|||Do you have any specific error msg? (DBNETLIB Error?)
--
Sasan Saidi, MSc in cs
Senior DBA
Brascan Business Services
"I saw it work in a cartoon once so I am pretty sure I can do it."
"Sue" wrote:
> We have a new application, running on Windows Server 2003, SQL Server
> 2000-SP3, application in PHP. We sporadically get the message cannot connect
> to database'. Sometimes it seems to go away when we restart the database,
> but that is not a sure thing to fix it. Am wondering if sp3a will be the
> magic bullet? Or is there something else that I should be looking at?
> Thank you for your assistance.
> Sue
Cannot connect to database error
2000-SP3, application in PHP. We sporadically get the message cannot connect
to database'. Sometimes it seems to go away when we restart the database,
but that is not a sure thing to fix it. Am wondering if sp3a will be the
magic bullet? Or is there something else that I should be looking at?
Thank you for your assistance.
Sue
The difference between SP3 and SP3a is in the setup so applying it won't
make any difference.
Check the SQL Server errorlog (exec master..xp_readerrorlog) and check for
any messages in there, my thinking is may be you are running out of
concurrent connections due licence restriction.
Also, when the problem happens, run sp_who2 to check for blocking.
Tony.
Tony Rogerson
SQL Server MVP
http://www.sqlserverfaq.com?mbr=21
(Create your own groups, Forum, FAQ's and a ton more)
|||Do you have any specific error msg? (DBNETLIB Error?)
Sasan Saidi, MSc in cs
Senior DBA
Brascan Business Services
"I saw it work in a cartoon once so I am pretty sure I can do it."
"Sue" wrote:
> We have a new application, running on Windows Server 2003, SQL Server
> 2000-SP3, application in PHP. We sporadically get the message cannot connect
> to database'. Sometimes it seems to go away when we restart the database,
> but that is not a sure thing to fix it. Am wondering if sp3a will be the
> magic bullet? Or is there something else that I should be looking at?
> Thank you for your assistance.
> Sue