This message helped me:
The newest php version installed on server does not allow global settings (such as execution time, max upload filesize, max post file size, etc.) to be changed.
Folow these steps to resolve the issue:
- Eval
phpinfo();
- Search for 'Scan this dir for additional .ini files' text in
phpinfo()
output
- It will be something like this
/etc/php5/apache2/conf.d
- Create your user.ini file inside the dir. (
/etc/php5/apache2/conf.d/user.ini
)
- Use this ini file for custom settings.
- Restart the server
File /etc/php5/apache2/conf.d/user.ini
post_max_size = 90M
upload_max_filesize = 50M
Update 2018.06
If you are using nginx + php-fpm your path will be something like this (use your php version in path). Create file using:
nano /etc/php/7.0/fpm/conf.d/user.ini
There are a lot of other .ini
files in the conf.d
directory. If you want your config to be the last included - use prefix.
For example: 30-user.ini
.
After file creation don't forget to restart fpm
:
sudo service php7.0-fpm restart