mikeym Posted February 19, 2008 Share Posted February 19, 2008 OK. My providers are as it turns out Nazis and wont turn off safe mode so I am unable to run any piece of code for more than 30 seconds. This makes my task of allowing my users to upload a number of images which I resize and put onto the page for displaying rather tricky. I've been trying to think of ways to circumnavigate this issue. The first step I've taken it to copy the uploaded files into a temporary directory and finish so as to not run out of time. What I was thinking was that I could direct them to a page that would process one image from the temp dir then call itself until the temp dir was empty. However I've found that any script calling itself causes an error. This page cannot load because of a problem with the Web site. The server “www.getoutofglasgow.com” is redirecting in a way that will never complete. So the only other things I can think off are setting a refresh time of 30 seconds on the page (which will waist a lot of time as it will wait for 30 secs even if the script finishes before hand) or making a series of confirmation pages that will post a resonce from the user to confirm the images one at a time (pretty much what I was wanting to avoid). This is also assuming that the post is allowed to call the same script that posted the data without causing an error! I'm looking for some cleaver person to help me out with a suggestion. Quote Link to comment Share on other sites More sharing options...
dave420 Posted February 20, 2008 Share Posted February 20, 2008 It's not ideal, but looking at the documentation, if you could run a PHP script on your server using system(), the duration of that script is not included in the time-out, so even if the script takes an hour to complete, as long as you spend less than 30 seconds outside of that system() call, you'll be fine. Put your image processing in that external script, pass it the parameters it needs to know what to do, and you're set. 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.