0

I'm unable to upload files larger than roughly 2gb. The max upload/post values were previously set to 2500MB so I thought that was the problem.

First,

# php --version
PHP 5.3.3 (cli) 

I set upload_max_filesize and post_max_size as follows

# vi /etc/php.ini
post_max_size = 5500M
upload_max_filesize = 5500M
[write/quit vi]

Next,

# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]

I then confirmed the new configuration with a phpinfo() script:

post_max_size   5500M   5500M
upload_max_filesize 5500M   5500M

I go back to my script to upload another large data file (~4GB), and am again told that the uploaded file exceeds value of upload_max_filesize.

So, I am at a loss. I am able to upload 2gb and smaller files no problem. I've restarted Apache, and don't know where to go from here.

  • 1
    Exactly what operating system, distribution, etc.? – Michael Hampton Oct 3 '14 at 22:35
  • CentOS 6.5, Apache 2.2 – a coder Oct 4 '14 at 1:40
  • Does the application you're using have a file size limit? For example, MediaWiki has its own limit defined in LocalSettings.php. – Gene Oct 8 '14 at 6:04
  • It does and the file size limit matches what is in php.ini. The software (VIMP) is known to work just fine with very large files ( >5gb ) – a coder Oct 8 '14 at 11:50
1

This PHP-Change log

http://php.net/ChangeLog-5.php#5.6.0

states that, until PHP 5.6.0, file uploads were limited to 2 GB.

0

You may be updating the wrong file. Verify with the php -i command. For example:

$ php -i 2> /dev/null | grep php.ini
Configuration File (php.ini) Path => /usr/local/lib
Loaded Configuration File => /usr/local/lib/php.ini
  • 1
    Testing with php -i may still give him the wrong file. It isn't uncommon to have a completely different config for the CLI vs the Apache module, or CGI. – Zoredache Oct 4 '14 at 0:15
  • I'm updating the correct file because if I change upload_max_filesize to 9999M, then restart apache, I see that reflected in phpinfo(); – a coder Oct 4 '14 at 1:40
0

My guess is you are using a 32 bit operating system. If that is the case you won't be able to go beyond 2GB with apache and PHP.

See this article for more information: http://doc.owncloud.org/server/6.0/admin_manual/configuration/configuring_big_file_upload.html

  • 64 bit CentOS with 24gb RAM. Wondering if I have a 32-bit version of Apache installed now. How would I find that out? – a coder Oct 4 '14 at 11:05
  • $ file /usr/sbin/httpd /usr/sbin/httpd: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped – a coder Oct 4 '14 at 11:10
  • is there an error message in error_log? – skarap Oct 4 '14 at 11:25
  • ooo till Monday, can't get to my video production machine. will follow up then (and delete this message at that time) – a coder Oct 4 '14 at 14:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.