|
Posted by Tim Hunt on 10/17/06 20:45
Bob Bedford wrote:
> > Some hosts let you change the timeout using ini_set, does yours?
> No, id doesn't allow using ini_set. (it would be too simple).
>
> > If not could you split the processing over two scripts?
> That's the way I'm looking for.
>
> >
> > In the first script parse the xml file, update database, copy the image
> > to a temporary file and use $_SESSION to store the temp filename. Then
> > redirect to the second script using header('Location:') and let the 2nd
> > script finish off the resizing & database updates
> >
> > This way you have a whole twenty seconds to play with.
> It's there any way in PHP to execute (without using location as it changes
> page) a new page ? I don't have access to exec()...
> My idea is to manage the recording in the database then every time I've new
> images, send them to a new script. The main process will do easely in 10
> seconds then every process will redim and save the images (time consuming)
> and it may also do it in 10 seconds.
>
> Problem: I don't know how to do so (launch an other script without exec)
> passing the files (like a normal post or get will do).
>
You can curl or sockets to post data to another script
http://uk.php.net/manual/en/ref.curl.php
http://uk.php.net/manual/en/function.fsockopen.php.
The 1st script may timeout waiting for the response, I dont think this
will affect the execution of the 2nd script, as long as the 2nd script
starts before the 1st timeouts. A best guess not a guarantee..
[Back to original message]
|