Despite php.ini can't upload over 100M


#1

I’ve tried several file uploading services among which autoindex, Ajaxplorer and OwnCloud.
I have set max upload and max post size in php.ini to 2GB and memory limit to 1,5 Gb, which is the hard limit of my VPS.
I’ve also increased the script execution time to 3600.

Issue is that no matter which service I user I can’t upload over 100M file.
When it reaches a percentage close to a corresponding size of 100M, it just silently stops uploading (and file is not even partial on site).

From the phpinfo.php:
max_input_time 3600
memory_limit 1500M
upload_max_filesize 2000M
post_max_size 2000M

IMHO there is a timeout somewhere else cutting upload to 100M but can’t understand where…

Thanks in advance,
RoarinPenguin


#2

The temporary directory on your VPS (/tmp) is sized at 128 MB by default. We can change that if you need more — you can contact Support if you’d like us to do that, or you can set the upload_tmp_dir PHP.ini directive to something other than the normal temporary directory.

Keep in mind that PHP will not be the only process running on your VPS — if you have your VPS memory set to 1500 MB, you should probably set the memory_limit no higher than perhaps 1300 or 1400 MB to leave some room for other important processes (like the web server!). If you expect to ever have multiple uploads running at once, you should factor that in as well!


#3

Hello andrewf thanks for the fast reply.
The memory limit is set to that level but is not even consumed to 1/10th of that… so this setting is for the momento not under discussion.

About /tmp, I’ve already asked to DH to set it to 2 GB and they did… but this did not solve the problem.

The must be something else on the VPS cutting that upload but can’t understand what :frowning:

I’m running PHP 5.3 CGI…

TIA,

RoarinPenguin


#4

After you edited the php.ini file did you restart Apache?
I am hosting one of my sites on a LAMP setup over at AWS and this is what I had to do to get the change to take effect.


#5

I have a similar issue and wasn’t able to resolve it through Dreamhost but here are some of my notes on how I got around it.

  1. I had to get Dreamhost to increase the tmp directory size

  2. That didn’t initially work either because there were a lot of garbage files in the tmp directory that were not getting deleted …

  3. Once I deleted the tmp files via SSH I was able to upload about 50 MB max … and still getting timeouts on the PHP processes way before they were complete

  4. My hunch is that Dreamhost has a kill routine that kills long running processes no matter what the php.ini settings are. This problem did not exist 2-years ago when I was able to successfully upload a 500MB file by using a custom php.ini

Anyhow … the solution:

The solution was to use a PHP upload handler that supports “chunking”. This allows uploads of virtually any size file.

  • I have successfully uploaded over 1GB

Check out PLUpload. It has saved me numerous hours and time and works great with chunking enabled on any file size!

http://www.plupload.com/