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, Quote Link to comment 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. Quote Link to comment 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']); } Quote Link to comment 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. Quote Link to comment 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! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.