[freetds] Antwort: Re: Crazy FreeTDS/PHP/Apache Problem

Markus Jung Markus.Jung at tds.de
Thu Aug 14 02:43:41 EDT 2008

Hi James!

Thanks for your remarks.

Firewall ist no problem. Telnet connection to the server on 1433 works and 
as I wrote
the a connection via the "tsql"-command works too. With the "tsql"-command 
I can
connect and query the database.

Maybe I made it not clear enough, I had the problems with 0.82 and solved 
them by
using 0.64. So my remedy was to downgrade.

I found out one thing with the PHP version. As I wrote in my first mail, 
with a working
FreeTDS-"tsql"-tool (version 0.64) I hat the following experiences:

PHP 5.2.6:      PHP-CLI = not working   PHP Apache module = not working
PHP 5.2.3:      PHP-CLI = working       PHP Apache module = not working
PHP 5.2.1:      PHP-CLI = working       PHP Apache module = working (but 
not stable and not always)

For every PHP-Build I used the same compiled version of FreeTDS 0.64.

What's wrong? By and by slowly I'm getting crazy...

Has anyone Apache-PHP-FreeTDS running on Solaris 9/10???? I yes, which 
versions with which
compile options???

Thanks, Markus

"James K. Lowden" <jklowden at freetds.org> 
Gesendet von: freetds-bounces at lists.ibiblio.org
13.08.2008 21:04
Bitte antworten an
FreeTDS Development Group <freetds at lists.ibiblio.org>

FreeTDS Development Group <freetds at lists.ibiblio.org>

Re: [freetds] Crazy FreeTDS/PHP/Apache Problem

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

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. 


FreeTDS mailing list
FreeTDS at lists.ibiblio.org

More information about the FreeTDS mailing list