Crazy FreeTDS/PHP/Apache Problem

Markus Jung <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <OF9F3FEBF0.F9058610-ONC12574A4.002872F5-C12574A4.00299F56@de.tds-global.com>
Hi guys,

I have a strange problem with the following configuration:

- Solaris 10
- Apache 2.2.9
- PHP 5.23
- FreeTDS 0.64

I used this older versions of PHP and FreeTDS because with the newer 
version I had a lot of more problems.

The current situation is, that I can connect with the tsql-Command to the 
database. Doesn't matter if I connect
via "./tsql -S ... -U ..." or via "./tsql -H ... -p ... -U ..." - every 
connection works.

In the next step I tried a simples PHP conenction with the following code:
<? $db_conn = mssql_connect("sqlhost:1433","user","pass") or die( 
"<strong>ERROR: Connection to Server failed</strong>" ); ?>

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.

I have no idea. Please can someone help me????

Greetz, Markus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.