Skip to content

Instantly share code, notes, and snippets.

@fmtarif
Last active August 29, 2015 14:02
Show Gist options
  • Save fmtarif/4e003001106aba11331b to your computer and use it in GitHub Desktop.
Save fmtarif/4e003001106aba11331b to your computer and use it in GitHub Desktop.
#php conf that are allowed in ini_set
<?php
/**
* http://www.php.net/manual/en/ini.list.php
*/
//PHP_INI_PERDIR Entry can be set in php.ini, .htaccess, httpd.conf or .user.ini (since PHP 5.3)
//PHP_INI_SYSTEM Entry can be set in php.ini or httpd.conf
//PHP_INI_ALL Entry can be set anywhere
/* ini_set from script won't work (system or per dir)
------------------------------
ini_set("upload_max_filesize", "2M") //PHP_INI_SYSTEM
ini_set("post_max_size", "8M") //PHP_INI_PERDIR
ini_set("max_file_uploads", 20) //PHP_INI_SYSTEM PHP_INI_SYSTEM in PHP <= 4.2.3. Available since PHP 4.0.3.
ini_set("upload_tmp_dir", NULL) //PHP_INI_SYSTEM
ini_set("output_buffering", "0") //PHP_INI_PERDIR
-----------------------*/
ini_set("memory_limit", "128M") //PHP_INI_ALL
ini_set("max_execution_time", "30") //PHP_INI_ALL
ini_set("display_errors", "1") //PHP_INI_ALL
ini_set("error_log", NULL) //PHP_INI_ALL
ini_set("log_errors", "0") //PHP_INI_ALL
ini_set("session.gc_maxlifetime", "1440") // 24m PHP_INI_ALL
ini_set("short_open_tag", "1") // PHP_INI_PERDIR PHP_INI_ALL in PHP 4.0.0. PHP_INI_PERDIR in PHP >= 4.0.1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment