fanfavorite Posted December 15, 2008 Share Posted December 15, 2008 Hey All, I have lots of scripts where users are uploading files and once uploaded, the files are being modified to fit the requirements. For example, images are scaled down to the correct size depending on the application it is for. Now with the file sizes of things like images today, PHP sometimes will timeout. That is why I am working with progress bars now to upload. Right now I am using a flash script to upload and then manipulate the images. Is there a way to show progress bars on things like resizing/cropping images in PHP and also prevent from timeouts or at least prevent them by recognizing that it will timeout, so give an error saying there are too many files being uploaded at once? Or perhaps just before timeout, can call a function to read where the status is and throw an error saying couldn't do whatever functions are left. Also, is there a way to show progress of multiple PHP tasks in script. For example, script creates databases, uploads files, creates accounts, etc. When the script is executed, I want it to display the progress of what is happening. This is similar to what you would see when install software on your computer. Thanks all. Any help is appreciated. -JC Link to comment https://forums.phpfreaks.com/topic/137115-php-progress-and-timeout/ Share on other sites More sharing options...
Mchl Posted December 15, 2008 Share Posted December 15, 2008 You can reset execution timer with set_time_limit. Progress bars with PHP only are not possible AFAIK. You would have to use JavaScript (AJAX actually) or Flash. Link to comment https://forums.phpfreaks.com/topic/137115-php-progress-and-timeout/#findComment-716215 Share on other sites More sharing options...
fanfavorite Posted December 15, 2008 Author Share Posted December 15, 2008 Thanks, I didn't know I could call that during execution. I also found getrusage() on that page, which gets the current used time. Link to comment https://forums.phpfreaks.com/topic/137115-php-progress-and-timeout/#findComment-716220 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.