I have a php web application that creates excel reports based on a SQL queries. Some reports can take longer than 20 min which causes a FastCGI timeout (500) error. I am using IIS 7 on a windows server.
Is there a way to wrap the execute command with a timer that will exit the script with a custom error message before the 20 min FastCGI timeout?
//do {
$result=odbc_exec($conn, $query);
//} while (timer < 15 mins);