Jump to content

getting started large file uploads


bbxrider

Recommended Posts

this is php5 running under apache, apache module, not cgi,  on win xp pro -a development environment for me

i have tried the most basic script, as presented in http://us.php.net/features.file-upload

 

the goal is to work up to uploading large files, 10g-ish, for a video thing

 

i get this error msg after about 5 minutes, i'm actually uploading a file on my server machine to the website, so its actually very local, this was the first testing:

 

Warning: POST Content-Length of 1024125257 bytes exceeds the limit of 545259520 bytes in Unknown on line 0

 

so the content length is right, i don't see yet where the limit 545259520 is coming from

 

the file is actually 976 MB (1,024,124,928 bytes) per properties

i thought i had all sizes covered

on the form: <input type="hidden" name="sizelimit" value="10000000000" />

in my php.ini:

max_execution_time = 3600, max_input_time=3600, upload_max_filesize = 10000M, post_max_size=10000m, memory_limit=128 (i was hoping this memory would work, i didn't think i could/should make it 10g, the box has 2g of chip memory)

so apparently i'm missing some thing, can anybody help with this? perhaps an apache thing?

 

please bear with me on this, i know it will need plenty of work to make it a viable app, but for now i just wanted to run a proof of concept so to speak to see how long and if these large sizes are actually handled.

bob -

 

Link to comment
Share on other sites

Are you on a shared server? If not have you rebooted your server since you made the changes?

 

If you are on a shared server try putting your settings into an htaccess file instead of the php.ini file. This will also prevent other scripts on your site from hanging up and using your servers resources.

Link to comment
Share on other sites

thanks for the replies,

server has been rebooted, this is my personal dev box, so i'm the only one making any settings.

before i even try .htaccess, which i agree i'll prob need on hosted sites,  i just want to get working as simple as possible and then start making changes so i can check along the way, then if something breaks, it should be easier to find what change caused the problem.

i've seen where there can be browser set size limits. all those discussions always say browser settings are easily faked out, so use the php limits for reliability

also will check the php ftp, but am still stuck here right now evidently with a 500mb limit coming from somewhere. ???

bob

Link to comment
Share on other sites

I looked at the php source code and it does not have any built in limit (other than the value being an integer.) If php is the cause of this (instead of a setting someplace) then it might be in the "M" mega conversion code. Try either using a 10G or list the number in bytes 10000000000

Link to comment
Share on other sites

thanks everybody, for the help

i'm happy to report that:

captial 'G' does work, so for 10gb i used '10G'

capital 'M', as tried originally (or lower case 'm') does not work

no letters, ie, for 10gb, use '10000000000' does work

 

there is an apache directive, LimitRequestBody, when set to 0, allows unlimited content body size, but if used to set limits, can only allow a max of 2147483647 , the default is 0, and since i did not have it in my httpd.conf that default setting was working or not restricting.

 

bob

 

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.