Updating a progress bar during php scripts
db initilze progress start db insert update progress bar 1% db insert update progressbar 3% dbinsert etc.. just echo out the update to browser and do the next db insert...Originally posted by The Prohacker Not really, you can have the page output an update during the mysql updates...If you are just entering information in the text fields, then the progress meter will not show. If you're uploading to the folder where you files reside, then that folder must also be set to 777. Hi Jhon, I saw the demo of your script it's looking good. I want to integrate the progress bar of your script into my script. Thanks Phani Krishna Hi John, this is a neat script! I have a working php script to handle my uploaded files.Single File Upload Requirements: You must have APC (Alternative PHP Cache) and PHP 5.2 installed on your server for any of this to work. I cant install your whole scrit for file uploading because i have many options in the backend in my existing script, so i want only the progress bar module of your script. Now I would like to use your / Rasmus' script to do the upload.So the page would only display after the 30,000 DB calls have been completed.
If I have a page that would do maybe 30,000 alterations to a DB that page would only display to the browser after it's been completely parsed by the server.
This is really the only potential problem for those who don't have root access to their server. But I don't know where I would refer to my script or do move_uploaded_file(). Thanks, Andy Hi, i want to use these beautifull script. Am I misreading the manual where it says: Note that the file upload tracking is not threadsafe at this point, so new uploads that happen while a previous one is still going will disable the tracking for the previous.
It's not that difficult to install, but you either have to have root access, or your hosting provider will need to do this for you. Installing APC on your Linux server Installing APC on your Windows server Important: Make sure to include apc.rfc1867 = on in your file after APC is installed. I have installed APC and i m using php version 5.2.3, apache version 2.2.4 . When i upload a file it does not show any error and shows that file has been uploaded successfully, But does NOT upload file in the destination folder. when i am uploading a file , all time during uploading progress bar does not move. i've try this with your code but there is the same problem. apc APC Support enabled Version 3.1.0-dev MMAP Support Disabled Locking type File Locks Revision $Revision: 3.151 $ Build Date Nov 8 2007 Directive Value apc.cache_by_default On apc.enable_cli Off apc.enabled On apc.file_update_protection 2 apc.filters no value apc.gc_ttl 3600 apc.include_once_override Off apc.localcache Off apc.512 apc.max_file_size 50M apc.num_files_hint 1000 apc.report_autofilter Off apc.rfc1867 Off apc.rfc1867_freq 0 apc.rfc1867_name APC_UPLOAD_PROGRESS apc.rfc1867_prefix upload_ apc.shm_segments 1 apc.shm_size 64 apc.slam_defense 0 On apc.stat_ctime Off 0 apc.user_entries_hint 4096 apc.user_ttl 0 apc.write_lock On any idea? Does this mean that this will cause problems with two concurrent file uploads? progress bar for one person fails if another person starts uploading?
db initilze progress start db insert update progress bar 1% db insert update progressbar 3% dbinsert etc.. just echo out the update to browser and do the next db insert... PHP by default buffers the output of the script until the buffer is full before sending it to the client, to achieve maximum network utilization.
This buffering is also done at the Apache level, and the OS level.
All-in-all, this is a nice method, but unreliable most of the time.