= password This setting is done to connect MySQL default password if no other password is mentioned.Ĭonfiguration of php.ini file: Whenever we install PHP, we can locate the configuration file inside the PHP folder.
display_errors = off This setting will not allow showing errors while running PHP project in the specified host.post_max_size This setting is for the maximum allowed size of POST data that PHP will accept.upload_tmp_dir = Don’t uncomment this setting.upload_max_filesize This setting is for the maximum allowed size for uploaded files in the scripts.But due to a security risk, the user has to ensure if it set to OFF for all scripts. register_globals = on its default setting to ON which tells that the contents of EGPCS (Environment, GET, POST, Cookie, Server) variables are registered as global variables.enable_safe_mode = on Its default setting to ON whenever PHP is compiled.Important settings or common parameters of the php.ini file: memory_limit: This setting is done to show the maximum amount of memory a script consumes.Settings with a particular hostname will work under Expression in the INI file is limited to bitwise operators or parentheses. The values can be string, a number, a PHP constant, INI constants, or an expression, a quoted string or a reference to a previously set variable.
The file contains a set of directives with a set of respective values assigned to it. The Boolean values are represented by On/Off, 1/0, True/False, Yes/No. Note: Keys in the file are case-sensitive, keyword values are not spaces and lines starting with a To check file path use the following program: We can also write our own custom configuration files. It helps in easy administration of web server using these configuration files. Note: Whenever some changes are performed in the file, you need to restart our web server. Sometimes you need to change the behavior of PHP at runtime, then this configuration file is to use.Īll the settings related to register global variables, upload maximum size, display log errors, resource limits, the maximum time to execute a PHP script and others are written in a file as a set of directives which helps in Each time PHP is initialized, the php.ini file is read by the system. It’s very essentialĬonfiguration file which controls, what a user can or cannot do with the website. At the time of PHP installation, php.ini is a special file provided as a default configuration file.