The uploaded file exceeds the upload_max_filesize directive in php.ini
Posted: August 16, 2019 Filed under: Apache, General Fixes, PHP Leave a comment
I have created many web servers and wordpress installs.
The latest install threw up something new. The upload_max_filesize when uploading a theme zip.
Now I always forget to change the php.ini, so it is an easy one to fix.
Edit the php.ini file, change the following settings and restart the httpd server. Not that hard.
So locate these entries and change appropriately.
upload_max_filesize 999M memory_limit 256M post_max_size 999M max_execution_time 600 max_input_time 900
systemctl restart httpd
And then try to upload the zip file again. Same error ??????
So into debug mode now.
Create a phpinfo.php file.
<?php // Show all information, defaults to INFO_ALL phpinfo(); ?>
And open a browser to show the results.
Something very odd this still showed the original settings ?????????????
A lot of searching and somewhere I found reference to restarting the php service, this was at 7.1. I never knew this existed.
So systemctl resulted in displaying the list of services
There is a service php-fpm.service.
Restart this as you are ready to go.
systemctl restart php-fpm
Not sure about the details, maybe another time.
As always I hope this helps someone.