SQL Connect Timeout

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
webdvl
Forum Newbie
Posts: 1
Joined: Thu May 08, 2003 4:27 pm

SQL Connect Timeout

Post by webdvl »

I am working on a site in which we are connecting to MS SQL Server 2000 using FreeTDS as a bridge. PHP4.2.3 is running on RedHat7.? and Apache 1.3.27. I've got FreeTDS up and working and I am able to connect to the SQL server, which is running on a MS Windows 2000 machine at a different location.

What I need to do is figure out how to QUICKLY determine if I can connect to the SQL server from PHP so I can display some alternate text if I can connect. I've looked at timeout settings in the freetds config files and they don't appear to work. Right now, the connection takes a couple minutes to time out. There is probably a really easy solution to this, but I can't seem to get it.

Any help would be greatly appreciated.
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

Post Reply