Skip to content

Instantly share code, notes, and snippets.

@felixgren
Created June 4, 2021 04:38
Show Gist options
  • Save felixgren/84e8d2b73b106f5df98289823f7f2888 to your computer and use it in GitHub Desktop.
Save felixgren/84e8d2b73b106f5df98289823f7f2888 to your computer and use it in GitHub Desktop.
PHP Dev Setup Config

Quick script to configure PHP for an ideal dev setting

ini_path=`php -i | grep php.ini | cut -f2- -d'>' | tail -1`

sudo sed -i'.bak' "s/error_reporting = .*/error_reporting = E_ALL/" $ini_path

sudo sed -i'.bak' "s/display_errors = .*/display_errors = On/" $ini_path

sudo sed -i'.bak' "s/upload_max_filesize = .*/upload_max_filesize = 8M/" $ini_path

sudo sed -i'.bak' "s/post_max_size = .*/post_max_size = 8M/" $ini_path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment