Overriding Browser Timeouts with PHP
Posted 22 March 2006 - 12:22 AM
I've made a link checking php script that checks all the links in a database to see if the pages exist or not.
The problem is, checking too many links at once takes so long that it results in a 500 error. I believe this is a timeout error initiated by the browser when it waits too long to receive the results.
I was wondering if there was a php function or something that would tell the browser to wait indefinitely for the results.
Please bear in mind I'm not that knowledgable about php or http stuff, so it would help if you dumbed down your answers.
Thank you very much.
Posted 22 March 2006 - 12:31 AM
Posted 22 March 2006 - 12:49 AM
2.) If the script timeout is reached, it would render the HTTP 404 (page cannot be displayed) error to the browser.
3.) In PHP.INI, the " max_execution_time " setting can be adjusted to determine how many seconds PHP will allow a script to run before killing the process.
4.) I suspect that you have other issues besides a ' timeout', based on your post. HTTP 500 can easily be achieved by effectivly asking php to "do something" that either Apache or the O.S won't allow.
President & Founder, MyCodeTree
firstname.lastname@example.org | http://mycodetree.com
Posted 23 March 2006 - 01:49 AM
The reason I thought it was a timeout error is because if you search a small amount of data, say 25 entries, then it works. But anymore of that will cause the error.
EDIT: In fact now it doesn't seem to work at all, so the problem is intermittent.
I would appreciate it if someone could take a look at my code, the meat of it is not very long:
the code can be seen at [a href=\"http://www.becklit.org/linkchecker.txt\" target=\"_blank\"]http://www.becklit.org/linkchecker.txt[/a]
Posted 24 March 2006 - 04:37 AM
It would be fantastic if anyone could take a look at the code in that txt file. The meat of it is very short and the problem might be very apparent.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users