473,382 Members | 1,336 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

detecting an odbc_connect timeout if server is hibernating

I am using odbc_connect in a lamp environment to communicate with a sql server database on a windows box.

If I put the windows box in hibernate mode, the odbc_connect just hangs, regardless of whatever timeout setting I try (ConnectTimeout, ConnectionTimeout, etc).

Is there anyway of quickly detecting this? NB. If sql server is stopped in services, then I get an instant response. It's just I want to be able to detect the lack of response.

Thanks
Jun 23 '11 #1
3 3035
numberwhun
3,509 Expert Mod 2GB
What about using the odbc_error() function? I don't know if it will work, but its worth a shot.

Regards,

Jeff
Jun 24 '11 #2
The trouble is, odbc_connect is still running. It doesn't return to the next line so odbc_error wouldn't really help.
Jun 24 '11 #3
Markus
6,050 Expert 4TB
I'm not too well acquainted with Windows, however, when the machine is put into hibernation, doesn't that temporarily suspend (most) running processes? It may be that the PHP process itself, or ISS, or whatever you are using, is also suspended. Just a thought...
Jun 24 '11 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Rob Gibson | last post by:
Can someone please point me to some code (preferably C#, but C++ or C or VB will work) that will detect if the (local) instance of SQL Server is running on a machine or not? Many thanks! -- Rob
2
by: Ben Fidge | last post by:
Hi I'm working on a project where some business process rely on several external servers to perform processing. These are Sql Server x 2, Credit Card processing and Mail Server. Before...
0
by: jules | last post by:
Session_End (global.aspx) is called when Session.Abandon() gets called explicitly, or when the Session times out (20 minutes by default). Is there a way to tell which event caused Session_End to...
4
by: Chris Newby | last post by:
I realize that I can handle "SessionEnd" from global.asax ... but it appears to me that this gets called without the context of a current web request. So given the following scenario: User logs...
3
by: Olie | last post by:
I have a number of applications that need to access the same object at different times and any one of these programs may be running at any one time. I do not have a specific application that could...
7
by: Mike | last post by:
Hi. How can I detect if a user's session has timed-out? I'd like to be able to redirect the user to a specified page in the event of session timeout. Thanks!
2
by: runner7 | last post by:
Can anyone tell me if there is a way in PHP to determine when a session times out on the server or how many concurrent sessions there are in your application?
9
by: timor.super | last post by:
Hi group, I've written a client/server application, using the dotnet sockets. In my server, I have a thread waiting for messages with : ret = currSocket.Receive(buffer, 1024,...
1
by: Steve | last post by:
Hi All I have a windows application (written in VB.net 2005) which I update via web downloads to my clients computers The downloaded file is saved in a subfolder until the next time the...
3
by: supriya prasad | last post by:
I am trying to set up a server client network .Server will be able to stream live audio captured from a radio receiver connected to its line in port to multiple clients over the network. ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.