Jump to content

continue executing php script after closing the browser?


ChrisGr

Recommended Posts

hello,
i have an application writen with php4 and mySQL on Apache. I have to allow the user upload a zip file, with XML data and then the script unzips  the file, parses the XML and stores the data in a mySQL table. The problem here is that the XML files are very big and the time that the XML parser needs to parse the file is alllllooooooot. I would like to know if it is possible to allow the user to click a button to fire the script and then do everything in the background without making the user expect the feedback. The script goes: fist i upload the file, then i unzip it in a folder and then i start to parce each document seperatelly(wich takes years to be executed becase one of the files is a 7MB XML file). So when the user presses upload i want to display a page to confirm the upload and then work all the other staf in the background. Is it possible? How can i do this? Thanks in advance for any help. 
first php not support file upload status.
you can tell at the end of the upload

2nd I think you can use one of the execute function that php offer like
system , exec , etc
this way you call to a php script that do the parse, its nesscery to disable the time limit.

check tha manual

but i didnt check the behivor of this method

-----
or you can use
http://php.net/ignore-user-abort


I hope I understand correctly your question

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.