php.ini configuration file Default values
Posted by Raj
php.ini configuration file Default values
The PHP configuration file(php.ini) is read when PHP is initialized. php.ini includes the core php.ini directives you can set these directives to configure your PHP setup.php.ini will be located at /etc/php5/apache2/php.ini or /etc/php.ini
;Default Value: On
This determines whether errors should be printed to the screen or not.
---------------------------------------------------------------------
error_reporting
;Default Value: E_ALL & ~E_NOTICE
// Turn off all error reporting
error_reporting(0);
// Report simple running errors
error_reporting(E_ERROR | E_WARNING | E_PARSE);
// Reporting E_NOTICE can be good too (to report uninitialized
// variables or catch variable name misspellings ...)
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
// Report all errors except E_NOTICE
// This is the default value set in php.ini
error_reporting(E_ALL ^ E_NOTICE);
// Report all PHP errors (see changelog)
error_reporting(E_ALL);
// Report all PHP errors
error_reporting(-1);
--------------------------------------------------------------------------------
max_input_time
;Default Value: -1 (Unlimited)
This sets the maximum time in seconds a script is allowed to parse input data, like POST and GET.
-----------------------------------------------------------------------------------
short_open_tag
;Default Value: On
whether the short form ( ) of PHP's open tag should be allowed
---------------------------------------------------------------------------------
max_execution_time = 30
Maximum execution time of each script, in seconds
----------------------------------------------------------------------------------
file_uploads :"1"
Whether or not to allow HTTP file uploads.
---------------------------------------------------------------------------------
upload_max_filesize : 2M
The maximum size of an uploaded file.
-------------------------------------------------------------------------------
max_file_uploads :20
The maximum number of files allowed to be uploaded simultaneously.
------------------------------------------------------------------------------
max_input_vars : 1000
How many input variables may be accepted .
-------------------------------------------------------------------------------
upload_tmp_dir : NULL
The temporary directory used for storing files when doing file upload.
--------------------------------------------------------------------------------
error_log
Name of the file where script errors should be logged.
------------------------------------------------------------------------------
log_errors : "0"
Tells whether script error messages should be logged to the server's error log
-----------------------------------------------------------------------------------
memory_limit : 128M
This sets the maximum amount of memory in bytes that a script is allowed to allocate.
-----------------------------------------------------------------------------------
session.gc_maxlifetime : 1440
session.gc_maxlifetime specifies the number of seconds after which data will be seen as 'garbage'.
------------------------------------------------------------------------------------
session.cookie_lifetime : 0
session.cookie_lifetime specifies the lifetime of the cookie in seconds which is sent to the browser.
The value 0 means "until the browser is closed." Defaults to 0.
---------------------------------------------------------------------------------
Check List of php.ini directives: http://php.net/manual/en/ini.list.php
The PHP configuration file(php.ini) is read when PHP is initialized. php.ini includes the core php.ini directives you can set these directives to configure your PHP setup.php.ini will be located at /etc/php5/apache2/php.ini or /etc/php.ini
php.ini default values:
display_errors;Default Value: On
This determines whether errors should be printed to the screen or not.
---------------------------------------------------------------------
error_reporting
;Default Value: E_ALL & ~E_NOTICE
// Turn off all error reporting
error_reporting(0);
// Report simple running errors
error_reporting(E_ERROR | E_WARNING | E_PARSE);
// Reporting E_NOTICE can be good too (to report uninitialized
// variables or catch variable name misspellings ...)
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
// Report all errors except E_NOTICE
// This is the default value set in php.ini
error_reporting(E_ALL ^ E_NOTICE);
// Report all PHP errors (see changelog)
error_reporting(E_ALL);
// Report all PHP errors
error_reporting(-1);
--------------------------------------------------------------------------------
max_input_time
;Default Value: -1 (Unlimited)
This sets the maximum time in seconds a script is allowed to parse input data, like POST and GET.
-----------------------------------------------------------------------------------
short_open_tag
;Default Value: On
whether the short form ( ) of PHP's open tag should be allowed
---------------------------------------------------------------------------------
max_execution_time = 30
Maximum execution time of each script, in seconds
----------------------------------------------------------------------------------
file_uploads :"1"
Whether or not to allow HTTP file uploads.
---------------------------------------------------------------------------------
upload_max_filesize : 2M
The maximum size of an uploaded file.
-------------------------------------------------------------------------------
max_file_uploads :20
The maximum number of files allowed to be uploaded simultaneously.
------------------------------------------------------------------------------
max_input_vars : 1000
How many input variables may be accepted .
-------------------------------------------------------------------------------
upload_tmp_dir : NULL
The temporary directory used for storing files when doing file upload.
--------------------------------------------------------------------------------
error_log
Name of the file where script errors should be logged.
------------------------------------------------------------------------------
log_errors : "0"
Tells whether script error messages should be logged to the server's error log
-----------------------------------------------------------------------------------
memory_limit : 128M
This sets the maximum amount of memory in bytes that a script is allowed to allocate.
-----------------------------------------------------------------------------------
session.gc_maxlifetime : 1440
session.gc_maxlifetime specifies the number of seconds after which data will be seen as 'garbage'.
------------------------------------------------------------------------------------
session.cookie_lifetime : 0
session.cookie_lifetime specifies the lifetime of the cookie in seconds which is sent to the browser.
The value 0 means "until the browser is closed." Defaults to 0.
---------------------------------------------------------------------------------
Check List of php.ini directives: http://php.net/manual/en/ini.list.php
This entry was posted on October 4, 2009 at 12:14 pm, and is filed under
php.ini configuration file Default values
.You can leave a response, or trackback from your own site.