note 91559 modified in function.mssql-connect by danbrown
| From: | danbrown@php.net | Date: | Wed, 17 Jun 2009 12:11:29 +0000 |
| Subject: | note 91559 modified in function.mssql-connect by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-156967@lists.php.net to get a copy of this message | ||
I was trying to connect to a remote SQL2000 server (located on Internet, not on the local network),
then php always returned an "Unable to connect" error or something.
After waste a lot of time, by searching among foruns, blogs and logs, I finally discovered the
problem. I was monitoring the TCP connections between the server and my machine when I realized that
it wasn't been done. For some reason, my Apache 2.2 was "denying" php module from
doing remote connections.
So I changed the php configuration on apache to CGI mode rather than as module mode. Well, it worked
fine since that.
In despite of security holes that it involves, it was the only way I've found to make that
remote connection works between Apache2.2/PHP5 and MSSQL Server 2000.
Strangely, connections inside local network worked in any case (in CGI or module mode).
--was--
Hi all!
I was trying to connect to a remote SQL2000 server (located on Internet, not on the local network),
then php always returned an "Unable to connect" error or something.
After waste a lot of time, by searching among foruns, blogs and logs, I finally discovered the
problem. I was monitoring the TCP connections between the server and my machine when I realized that
it wasn't been done. For some reason, my Apache 2.2 was "denying" php module from
doing remote connections.
So I changed the php configuration on apache to CGI mode rather than as module mode. Well, it worked
fine since that.
In despite of security holes that it involves, it was the only way I've found to make that
remote connection works between Apache2.2/PHP5 and MSSQL Server 2000.
Strangely, connections inside local network worked in any case (in CGI or module mode).
http://php.net/manual/en/function.mssql-connect.php