Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 Script Library
 Connection Error

Author  Topic 

mathceleb
Starting Member

1 Post

Posted - 2010-09-13 : 09:17:49
Can anybody assist with a connection error I'm receiving from a php script? I went into the database and used the credentials and they worked, but running it from the code, it does not:

Connection could not be established. Array ( [0] => Array ( [0] => 08001 [SQLSTATE] => 08001 [1] => 11001 [code] => 11001 [2] => [Microsoft][SQL Server Native Client 10.0]TCP Provider: No such host is known. [message] => [Microsoft][SQL Server Native Client 10.0]TCP Provider: No such host is known. ) [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] => 11001 [code] => 11001 [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. ) )

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2010-09-13 : 15:08:14
quote:
Originally posted by mathceleb

Can anybody assist with a connection error I'm receiving from a php script? I went into the database and used the credentials and they worked, but running it from the code, it does not:

Connection could not be established. Array ( [0] => Array ( [0] => 08001 [SQLSTATE] => 08001 [1] => 11001 [code] => 11001 [2] => [Microsoft][SQL Server Native Client 10.0]TCP Provider: No such host is known. [message] => [Microsoft][SQL Server Native Client 10.0]TCP Provider: No such host is known. ) [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] => 11001 [code] => 11001 [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. ) )

also, let's see your connection string
Go to Top of Page
   

- Advertisement -