Skip to content

Instantly share code, notes, and snippets.

@saxenap
Last active August 29, 2015 14:07
Show Gist options
  • Save saxenap/061d31fd5f09643d5832 to your computer and use it in GitHub Desktop.
Save saxenap/061d31fd5f09643d5832 to your computer and use it in GitHub Desktop.
#!/bin/bash
###############################################
# To use:
# rm -rf php-ini-settings
# wget https://gist.githubusercontent.com/saxenap/061d31fd5f09643d5832/raw/php-ini-settings
# chmod 777 php-ini-settings
# ./php-ini-settings
###############################################
PHP_INI_FILE_PATH="/etc/php.ini"
echo ""$'\n' >> $PHP_INI_FILE_PATH
echo "default_charset = "UTF-8"" >> $PHP_INI_FILE_PATH
echo "date.timezone = America/Indiana/Indianapolis" >> $PHP_INI_FILE_PATH
echo "short_open_tag = On" >> $PHP_INI_FILE_PATH
echo ""$'\n' >> $PHP_INI_FILE_PATH
echo "disable_functions = eval,exec,highlight_file,passthru,popen,shell_exec,show_source,stream_select,system" >> $PHP_INI_FILE_PATH
echo ""$'\n' >> $PHP_INI_FILE_PATH
echo "error_reporting = E_ALL" >> $PHP_INI_FILE_PATH
echo "display_errors = On" >> $PHP_INI_FILE_PATH
echo "display_startup_errors = On" >> $PHP_INI_FILE_PATH
echo ""$'\n' >> $PHP_INI_FILE_PATH
echo "allow_url_fopen = Off" >> $PHP_INI_FILE_PATH
echo "allow_url_include = Off" >> $PHP_INI_FILE_PATH
echo ""$'\n' >> $PHP_INI_FILE_PATH
echo "mbstring.language = Neutral" >> $PHP_INI_FILE_PATH
echo "mbstring.internal_encoding = UTF-8" >> $PHP_INI_FILE_PATH
echo "mbstring.http_input = auto" >> $PHP_INI_FILE_PATH
echo "mbstring.http_output = UTF-8" >> $PHP_INI_FILE_PATH
echo "mbstring.encoding_translation = On" >> $PHP_INI_FILE_PATH
echo "mbstring.detect_order = auto" >> $PHP_INI_FILE_PATH
echo "mbstring.substitute_character = none" >> $PHP_INI_FILE_PATH
echo "mbstring.detect_order = auto" >> $PHP_INI_FILE_PATH
echo "mbstring.substitute_character = none" >> $PHP_INI_FILE_PATH
echo ""$'\n' >> $PHP_INI_FILE_PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment