PHP configuration options

PHP has a plethora of configuration options and trying to remember them all would be a tough exercise. There is a simple way to find out what configuration options are available and also there values.

/* show all our configuration options */ print_r(array_keys(ini_get_all())); /* show all our configuration options and their values */ print_r(ini_get_all()); /* show configuration options, their values, and format for html */ echo '<pre>'; print_r(ini_get_all()); echo '<pre>';

The PHP version that we're currently using showed these options.

Array ( [0] => allow_call_time_pass_reference [1] => allow_url_fopen [2] => allow_url_include [3] => always_populate_raw_post_data [4] => arg_separator.input [5] => arg_separator.output [6] => asp_tags [7] => assert.active [8] => assert.bail [9] => assert.callback [10] => assert.quiet_eval [11] => assert.warning [12] => auto_append_file [13] => auto_detect_line_endings [14] => auto_globals_jit [15] => auto_prepend_file [16] => bcmath.scale [17] => browscap [18] => cgi.check_shebang_line [19] => cgi.fix_pathinfo [20] => cgi.force_redirect [21] => cgi.nph [22] => cgi.redirect_status_env [23] => cgi.rfc2616_headers [24] => date.default_latitude [25] => date.default_longitude [26] => date.sunrise_zenith [27] => date.sunset_zenith [28] => date.timezone [29] => dba.default_handler [30] => default_charset [31] => default_mimetype [32] => default_socket_timeout [33] => define_syslog_variables [34] => disable_classes [35] => disable_functions [36] => display_errors [37] => display_startup_errors [38] => doc_root [39] => docref_ext [40] => docref_root [41] => enable_dl [42] => error_append_string [43] => error_log [44] => error_prepend_string [45] => error_reporting [46] => exif.decode_jis_intel [47] => exif.decode_jis_motorola [48] => exif.decode_unicode_intel [49] => exif.decode_unicode_motorola [50] => exif.encode_jis [51] => exif.encode_unicode [52] => expose_php [53] => extension_dir [54] => fastcgi.logging [55] => file_uploads [56] => filter.default [57] => filter.default_flags [58] => gd.jpeg_ignore_warning [59] => highlight.bg [60] => highlight.comment [61] => highlight.default [62] => highlight.html [63] => highlight.keyword [64] => highlight.string [65] => html_errors [66] => iconv.input_encoding [67] => iconv.internal_encoding [68] => iconv.output_encoding [69] => ignore_repeated_errors [70] => ignore_repeated_source [71] => ignore_user_abort [72] => implicit_flush [73] => include_path [74] => log_errors [75] => log_errors_max_len [76] => magic_quotes_gpc [77] => magic_quotes_runtime [78] => magic_quotes_sybase [79] => mail.force_extra_parameters [80] => max_execution_time [81] => max_file_uploads [82] => max_input_nesting_level [83] => max_input_time [84] => mbstring.detect_order [85] => mbstring.encoding_translation [86] => mbstring.func_overload [87] => mbstring.http_input [88] => mbstring.http_output [89] => mbstring.internal_encoding [90] => mbstring.language [91] => mbstring.strict_detection [92] => mbstring.substitute_character [93] => mcrypt.algorithms_dir [94] => mcrypt.modes_dir [95] => memory_limit [96] => mime_magic.debug [97] => mime_magic.magicfile [98] => mysql.allow_persistent [99] => mysql.connect_timeout [100] => mysql.default_host [101] => mysql.default_password [102] => mysql.default_port [103] => mysql.default_socket [104] => mysql.default_user [105] => mysql.max_links [106] => mysql.max_persistent [107] => mysql.trace_mode [108] => mysqli.default_host [109] => mysqli.default_port [110] => mysqli.default_pw [111] => mysqli.default_socket [112] => mysqli.default_user [113] => mysqli.max_links [114] => mysqli.reconnect [115] => open_basedir [116] => output_buffering [117] => output_handler [118] => pcre.backtrack_limit [119] => pcre.recursion_limit [120] => post_max_size [121] => precision [122] => realpath_cache_size [123] => realpath_cache_ttl [124] => register_argc_argv [125] => register_globals [126] => register_long_arrays [127] => report_memleaks [128] => report_zend_debug [129] => safe_mode [130] => safe_mode_allowed_env_vars [131] => safe_mode_exec_dir [132] => safe_mode_gid [133] => safe_mode_include_dir [134] => safe_mode_protected_env_vars [135] => sendmail_from [136] => sendmail_path [137] => serialize_precision [138] => session.auto_start [139] => session.bug_compat_42 [140] => session.bug_compat_warn [141] => session.cache_expire [142] => session.cache_limiter [143] => session.cookie_domain [144] => session.cookie_httponly [145] => session.cookie_lifetime [146] => session.cookie_path [147] => session.cookie_secure [148] => session.entropy_file [149] => session.entropy_length [150] => session.gc_divisor [151] => session.gc_maxlifetime [152] => session.gc_probability [153] => session.hash_bits_per_character [154] => session.hash_function [155] => session.name [156] => session.referer_check [157] => session.save_handler [158] => session.save_path [159] => session.serialize_handler [160] => session.use_cookies [161] => session.use_only_cookies [162] => session.use_trans_sid [163] => short_open_tag [164] => SMTP [165] => smtp_port [166] => soap.wsdl_cache [167] => soap.wsdl_cache_dir [168] => soap.wsdl_cache_enabled [169] => soap.wsdl_cache_limit [170] => soap.wsdl_cache_ttl [171] => sql.safe_mode [172] => suhosin.log.phpscript [173] => suhosin.log.phpscript.is_safe [174] => suhosin.log.phpscript.name [175] => suhosin.log.sapi [176] => suhosin.log.script [177] => suhosin.log.script.name [178] => suhosin.log.syslog [179] => suhosin.log.syslog.facility [180] => suhosin.log.syslog.priority [181] => suhosin.log.use-x-forwarded-for [182] => track_errors [183] => unserialize_callback_func [184] => upload_max_filesize [185] => upload_tmp_dir [186] => url_rewriter.tags [187] => user_agent [188] => user_dir [189] => variables_order [190] => xmlrpc_error_number [191] => xmlrpc_errors [192] => y2k_compliance [193] => zend.ze1_compatibility_mode [194] => zlib.output_compression [195] => zlib.output_compression_level [196] => zlib.output_handler )