I'm trying to figure out a way to handle the possibility of an odbc query taking too long. If an odbc query takes longer than 20 seconds I want to trigger an error for my custom error handler to deal with. I haven't been able to figure out a way of triggering the error.
max_execution_time (or set_time_limit) does not take into account the time that the script waits for an odbc query to return results.
max_input_time() doesn't work. It sets the maximum time in seconds a script is allowed to parse input data, like POST, GET and file uploads
odbc_setoption() is supposed to be able to set the odbc query timeout but isn't recommended for production sites and it doesn't seem to work anyway.
There doesn't seem to be any means of easily dealing with odbc queries taking longer than a specified number of seconds. Any other ideas?