Anim9or Posted January 9, 2010 Share Posted January 9, 2010 This has been bothering me for weeks and I've been trying to solve it without asking for help, but eventually I had to give up Basically, I have a website that is based around manipulating photos with php commands(imagecopymerge,imagecolorat,etc.) however, one page, which compiles all of the data together, is way too large. Most of the time it results in an internal server error. Base on what a GoDaddy Customer service representative said, I assumed that this problem is caused by the script taking too much of the server's time and concentration. Because of this, I wrote a code to by pass it by doing some of the commands, then refreshing with a changed GET variable to tell the page where to start based on how high the number is. This kind of solved the problem, but there's still a 50% chance that I will get a server error on any random step for reasons I don't understand. My question is, is there any way I can stop an internal server error 500, or redirect the page automatically when it happens? And if not, what part of a website package would I need to upgrade to allocate more time and processing power for my website? Thank you! Quote Link to comment Share on other sites More sharing options...
RaythMistwalker Posted January 9, 2010 Share Posted January 9, 2010 the php.ini file contains the maximum time for a script to gather data and will automatically halt it if this happens. Quote Link to comment Share on other sites More sharing options...
teamatomic Posted January 9, 2010 Share Posted January 9, 2010 You can try this at the start of your page set_time_limit (240);// in seconds-the default is 30 If this does not solve the problem you should try keeping track of the time elapsed and using a header with GET to shove back the page before your script barfs. Easiest would be to write a log file and use it to keep track of where your script is. HTH Teamatomic 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.