NLCJ Posted December 19, 2010 Share Posted December 19, 2010 Hello, I've been trying to create a progress bar for the past 3 days, but I can't get it to work. I've got my own dedicated server with cPanel on it, using cPanel I installed the PECL extension. However, it doesn't respond to anything. The script I'm using is: HTML code: <form id="uploadform" enctype="multipart/form-data" method="post"> <input id="UPLOAD_IDENTIFIER" name="UPLOAD_IDENTIFIER" type="hidden" value="12345" /> <input id="ulfile" name="ulfile" type="file" /> <input type="submit" value="Upload" /> </form> To request the information I made another page with: <?php print uploadprogress_get_info($_GET['id']); ?> Nothing is returned however, no error, nothing... I'm totally lost! Regards, Link to comment https://forums.phpfreaks.com/topic/222147-upload-progress-bar/ Share on other sites More sharing options...
NLCJ Posted December 20, 2010 Author Share Posted December 20, 2010 Seems that no-one can help me. I will take a look at APC, and see if that works. I will keep you guys up to date. Link to comment https://forums.phpfreaks.com/topic/222147-upload-progress-bar/#findComment-1149482 Share on other sites More sharing options...
mattal999 Posted December 20, 2010 Share Posted December 20, 2010 What is the variable $_GET['id'] set to? I have no experience with the PECL extension, but surely you would need to put the following at the top of your file upload page: if($_POST['ulfile']) { echo uploadprogress_get_info($_POST['UPLOAD_IDENTIFIER']); } Link to comment https://forums.phpfreaks.com/topic/222147-upload-progress-bar/#findComment-1149486 Share on other sites More sharing options...
NLCJ Posted December 20, 2010 Author Share Posted December 20, 2010 The form gets an unique id, just for testing I set it manually: <input id="UPLOAD_IDENTIFIER" name="UPLOAD_IDENTIFIER" type="hidden" value="12345" /> This field will tell the extension uploadprogress that the identifier for this upload is 12345. Then you should be able to get it by using filename.php?id=12345: <?php print uploadprogress_get_info($_GET['id']); ?> However, it seems that no data is being made using this extension. I got no clue... Once I figured it out I will post it here. Link to comment https://forums.phpfreaks.com/topic/222147-upload-progress-bar/#findComment-1149511 Share on other sites More sharing options...
NLCJ Posted December 20, 2010 Author Share Posted December 20, 2010 I found the problem, I think. When I couldn't solve it I was searching for the original docs of this extension. After a few broken links I found the examples at: http://svn.php.net/viewvc/pecl/uploadprogress/tags/RELEASE_1_0_1/examples/ Copying and viewing those resulted in a page with the information about the current settings. A few of those are: ('upload_max_filesize' is 50M per file) ('post_max_size' is 8M per submit) I was aware of the max filesize of 50M, so I uploaded files around 40M. Due to the post_max_size being 8M it wouldn't return any information. So I tried a 6M file with the example script, and it resulted in the wanted results! Link to comment https://forums.phpfreaks.com/topic/222147-upload-progress-bar/#findComment-1149514 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.