View Full Version : [SOLVED] PHP upload_max_filesize and PHP post_max_size
anonymouschief
February 24th, 2016, 07:11 PM
On an Ubuntu 14.04 server, several Apache/PHP5 web applications that I have been installing, say, Zurmo, and SuiteCRM, are stating that my PHP upload and post size values are insufficient. I have them set correctly in /etc/php5/apache2/php.ini.
PHP upload_max_filesize value is: 2M minimum requirement is: 20M
FAIL
PHP post_max_size setting is: 8M minimum requirement is: 20M
FAIL
I have done a grep and cannot find a conf file with the said 2M and 8M values:
/etc/php5/fpm/php.ini:upload_max_filesize = 40M/etc/php5/apache2/php.ini.save:upload_max_filesize = 40M
/etc/php5/apache2/php.ini.bak2.recycle:upload_max_filesize = 40M
/etc/php5/apache2/php.ini.save.2:upload_max_filesize = 40M
/etc/php5/apache2/php.ini:upload_max_filesize = 40M
/etc/php5/apache2/php.ini.ucf-dist:upload_max_filesize = 40M
/etc/php5/cli/php.ini:upload_max_filesize = 40M
Please help,
AC :popcorn:
SeijiSensei
February 24th, 2016, 07:20 PM
I'll ask the obvious question first: did you restart Apache after changing the filesize parameter?
Create a file called info.php in the website root with this content:
<?php phpinfo() ?>
If you view that file with a browser, what do you see for the filesize limit?
anonymouschief
February 24th, 2016, 07:31 PM
Yes, I restarted Apache2.
Here is the snippet from my php.ini file:
; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 40M
; Maximum size of POST data that PHP will accept.
; http://php.net/post-max-size
post_max_size = 40M
PHP Info file:
upload_max_filesize
2M
2M
post_max_size
8M
8M
Where are these values being taken from?
Habitual
February 24th, 2016, 07:32 PM
look for more than one php.ini
find / -name php.ini -type f
anonymouschief
February 24th, 2016, 07:45 PM
I have searched. There are just these, and they have all been updated (see my first post):
/etc/php5/fpm/php.ini
/etc/php5/apache2/php.ini
/etc/php5/cli/php.ini
Habitual
February 24th, 2016, 09:48 PM
Sorry about that. :)
anonymouschief
February 24th, 2016, 10:07 PM
I have Googled this for ages; all to no avail. I get several confirmations that /etc/ph5/apache2/php.ini is the only configuration file that is i effect. I have no idea where the 2M and 8M values are being derived from. I know that we do not need to restart Linux to apply config changes. However, I will do that right now. I am sure that nothing will change.
Configuration File (php.ini) Path
/etc/php5/apache2
Loaded Configuration File
/etc/php5/apache2/php.ini
Please help, Linux gurus.
anonymouschief
February 24th, 2016, 11:19 PM
I have solved this, more or less as a workaround. There is nothing wrong with the php.ini file, however, this webapp is either not reading php.ini or is overriding the values in php.ini. I found a workaround at http://www.maheshchari.com/increase-php-file-upload-limit/ and used .htaccess to apply the values that I needed, that is:
php_value upload_max_filesize 40M
php_value post_max_size 60M
php_value memory_limit 768M
Powered by vBulletin® Version 4.2.2 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.