I recently installed a PHP download portal on one of our servers. Everything is working fine, but users can't upload large files (~ 20 MB).
I set the following settings to extremely large values or unlimited:
memory_limit
upload_max_filesize
post_max_size
memory_limit
Full php.ini
here: http://pastebin.com/NrqJvMVM
But it still fails after restarting the server.
Am I missing a setting? Do I have to update any values in the Apache configuration? Could a company firewall somehow interfere with that?
EDIT: I checked phpinfo() and the master configuration still shows the old values. The config file C:\Windows\php.ini however, has the new values. Am I using the wrong config file.
By default, PHP file upload size is set to maximum 2MB file on the server, but you can increase or decrease the maximum size of file upload using the PHP configuration file ( php. ini ), this file can be found in different locations on different Linux distributions.
Possible solutions: 1) Configure maximum upload file size and memory limits for your server. 2) Upload large files in chunks. 3) Apply resumable file uploads. Chunking is the most commonly used method to avoid errors and increase speed.
To upload files larger than 2 MB, change the default value of the upload_max_filesize parameter in the /etc/php. ini file. Important: M and MB are equivalent expressions for "megabyte." For example, 2M is equal to 2 MB. However, use only M in your configuration file, as MB isn't valid in a configuration file.
You can test the params in a script, too. Perhaps this helps:
In .htaccess:
php_value upload_max_filesize 200M
php_value memory_limit 256M
php_value max_execution_time 18000
Here are nice articles about this topic: http://www.cyberciti.biz/faq/linux-unix-apache-increase-php-upload-limit/ | https://www.dokuwiki.org/faq:uploadsize
Is Suhosin installed on your server or do you use fcgi ;-)?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With