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.

a coder
  • 789
  • 4
  • 20
  • 38

3 Answers3

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.

Lukas
  • 113
  • 5
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
Gene
  • 3,663
  • 20
  • 39
  • 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 04 '14 at 00: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 04 '14 at 01: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

skarap
  • 733
  • 5
  • 7
  • 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 04 '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 04 '14 at 11:10
  • is there an error message in error_log? – skarap Oct 04 '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 04 '14 at 14:01