Skip to Content.
Sympa Menu

freetds - [freetds] Crazy FreeTDS/PHP/Apache Problem

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Markus Jung <Markus.Jung AT tds.de>
  • To: freetds AT lists.ibiblio.org
  • Subject: [freetds] Crazy FreeTDS/PHP/Apache Problem
  • Date: Wed, 13 Aug 2008 09:37:57 +0200

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




Archive powered by MHonArc 2.6.24.

Top of Page