Jump to content

Upload progress bar


NLCJ

Recommended Posts

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
Share on other sites

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.