PHP and FreeTDS problem

Brian Bruns camber at
Sat Oct 9 12:36:01 EDT 1999

It sounds like PHP (or rather the apache children) are not closing the
connections to the database (are you using persisent connections or
regular ones?).  Can you verify this by logging in to the SQL Server and
doing an sp_who? (Note, you may need to log in before running the scripts,
since you may not be able to afterwards).


On Sat, 9 Oct 1999, Tasos Angelis wrote:

> Hello to all,
> I have compiled FreeTDS and I managed to use it with PHP 3.0.12.
> Then I written a script that makes a connection into an SQL server
> and shows the data from a table.(using mssql_connect,mssql_select_db... etc)
> This script works fine the first 4 times.
> The 5th time I execute it, the mssql_connect reports it cannot connect into the server.
> I also linked DBD-Sybase with Freetds and I written a perl script that manages to 
> do the same thing. I can run the perl script as many times I want with no problem.
> But after the PHP script fails to connect the perl sript fails also.
> When I stop httpd and start it again the PHP can run another 4 times, and
> the perl script as many as I want(until PHP script fails again).
> I must say that I use RedHat 6.0 and the Apache that is included in RedHat 6.0(I think 1.3.6 version) .
> Also I use PHP version 3.0.12 as an apache module.
> I think that whole propblem has to do with the module setup of PHP.
> Can anyone help me to get over it? 
> I don't want to use the CGI version of PHP.
> Tasos Angelis.
> Web programmer.

More information about the FreeTDS mailing list