Re: Crazy FreeTDS/PHP/Apache Problem
"James K. Lowden" <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <[email protected]> |
Markus Jung wrote: > > If I use th PHP-CLI to execute the script, it works fine. If I use > apache and the PHP Extension to execute the script I will get the > following error: > > Warning: mssql_connect() [function.mssql-connect]: Unable to connect to > server: sqlhost:1433 in /opt/httpd-2.2.9/htdocs/son/test.php on line 2 > ERROR: Connection to Server failed > > > Before I got that far I tried FreeTDS 0.82 but with that version no > connection via tsql could be established so I go back to 0.64. Than with > > 0.64 FreeTDS > worked but PHP 5.2.6 couldn't even connect either with PHP-CLI or > PHP-Apache-Module. So with the actual configuration I got the best > results but the > thing I need, the Apache-Thing, does still not work. Well, since 0.82 is known to work, you almost certainly have local pilot error. Is 1433 the right port? Likely is that apache needs permission to read freetds.conf. Possible is some kind of firewall problem. From your description, I wouldn't count out the possibility of two configurations stepping on each other. I recommend 0.82. If you do have a problem with 0.64, your first remedy will be to upgrade. HTH. --jkl