Limdallion Posted March 22, 2006 Share Posted March 22, 2006 Hi, this is my first question here and I hope I can get some help.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. Quote Link to comment Share on other sites More sharing options...
Caesar Posted March 22, 2006 Share Posted March 22, 2006 There is also a session timeout defined in your server's php.ini file. I doubt this is your problem though. I recently wrote a script that weeds through roughly 87,000 profiles in the database...and at most, takes 3 seconds. So maybe a little more information as to how your script works, would be helpfull...and maybe if you can paste snippets of code. That would be grreaaaat. ;-) Quote Link to comment Share on other sites More sharing options...
phporcaffeine Posted March 22, 2006 Share Posted March 22, 2006 1.) If you receive an HTTP 500, that is an internal server error - not a script timeout2.) 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. Quote Link to comment Share on other sites More sharing options...
Limdallion Posted March 23, 2006 Author Share Posted March 23, 2006 You can test the code at [a href=\"http://www.becklit.org/linkchecker.php\" target=\"_blank\"]http://www.becklit.org/linkchecker.php[/a]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] Quote Link to comment Share on other sites More sharing options...
.-INSANE-. Posted March 23, 2006 Share Posted March 23, 2006 do u have a config 2 setup cuz that may be the problem Quote Link to comment Share on other sites More sharing options...
Limdallion Posted March 24, 2006 Author Share Posted March 24, 2006 I didn't create the config file but I'm sure it's working correctly. There is another version [a href=\"http://www.becklit.org/test4.php\" target=\"_blank\"]http://www.becklit.org/test4.php[/a] that somehow works better, but still often gets an error. 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.