Php Configuration File (php.ini)
The 'php.ini' file is the default configuration file for running applications that require PHP. It is used to control variables such as script execution time, upload sizes etc. Some common setting variables with description are as follows:
Category | Variable | Default Value | Description |
---|---|---|---|
Register Global | register_globals | Off | Whether or not to register the EGPCS (Environment, GET, POST, Cookie, Server) variables as global variables. For more detail read here |
File Upload | file_uploads | On | Whether to allow HTTP file uploads. |
upload_tmp_dir | NULL | Temporary directory for HTTP uploaded files (will use system default if not specified). | |
upload_max_filesize | 2M | Maximum allowed size for uploaded files. PHP allows shortcuts for bit values, including K (kilo), M (mega) sand G (giga). | |
max_file_uploads | 20 | The maximum number of files allowed to be uploaded simultaneously. | |
Post | post_max_size | 8M | Sets max size of post data allowed. This setting also affects file upload. To upload large files, this value must be larger than 'upload_max_filesize'. Default value is 8Mb. |
Session | session.gc_maxlifetime | 1440 | Default sessin time in php. The default value is on seconds (1440 sec = 24 min) |
session.auto_start | 0 | Initialize session on request startup.(Turning on session support automatically at site level) | |
Resource Limit | max_execution_time | 30 | Maximum execution time of each script, in seconds. |
Error Reporting | error_reporting | E_ALL | Display types of error. E_ALL display all types of error. |
Full directives can be found at here (php official website).