Last active
February 27, 2017 09:29
-
-
Save landsman/6127c9a22aa8c5ba59b8c2285c30a768 to your computer and use it in GitHub Desktop.
improve php limits config for development
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# call this script on root permissions (ubuntu: sudo sh /path-to-file/localhostSetup.sh) | |
# upload limit | |
sed -i 's/post_max_size = 8M/post_max_size = 4000M/g' /etc/php/7.0/apache2/php.ini | |
sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 4000M/g' /etc/php/7.0/apache2/php.ini | |
# timeout from 30s to 1 half hour | |
sed -i 's/max_execution_time = 30/max_execution_time = 1800/g' /etc/php/7.0/apache2/php.ini | |
# error reporting | |
sed -i 's/display_errors = Off/display_errors: On/g' /etc/php/7.0/apache2/php.ini | |
sed -i 's/display_startup_errors = Off/display_startup_errors = On/g' /etc/php/7.0/apache2/php.ini | |
sed -i 's/; display_errors/display_errors: On/g' /etc/php/7.0/apache2/php.ini | |
sed -i 's/; display_startup_errors/display_startup_errors: On/g' /etc/php/7.0/apache2/php.ini | |
sed -i 's/; error_reporting/error_reporting: E_ALL/g' /etc/php/7.0/apache2/php.ini | |
sed -i 's/; log_errors/log_errors: On/g' /etc/php/7.0/apache2/php.ini | |
# ram | |
sed -i 's/memory_limit = 128M/memory_limit = 512M/g' /etc/php/7.0/apache2/php.ini | |
# restart apache to load new settings | |
service apache2 restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
todo: max_input_time