[freetds] Using PHP with FreeTDS

James K. Lowden jklowden at freetds.org
Tue May 29 23:24:02 EDT 2007


Brian Paquin wrote:
> Apache and PHP are working (I can generate a phpinfo() page).
> tsql can query the Sybase database.
> But when I use a fairly simple PHP page to connect to the database,
> I get a timeout.
...
> Do I need some environment variables?

No.

> Is a local Sybase install required??

No. 

> Will enabling Dump in freetds.conf provide help with this issue?

I would set the TDSDUMPCONFIG environment variable just to see if the
webserver is finding and can read the freetds.conf you intend it to use. 
My guess is it's trying to connect to "SYBASE" because it's not using your
freetds.conf.  

When tsql works and a webserver doesn't, it's frequently because the
webserver 1) runs under a different account and 2) has different
permissions.  

HTH.  

--jkl



More information about the FreeTDS mailing list