Understanding of PHP.INI file
purpose of
the php.ini file. At the time of PHP installation, php.ini was a special file
provided as defaults configuration file.
Purpose:
·
It a
very essential configuration file that controls what a user can or cannot do
with website.
·
Each
time PHP initialized, the php.ini file is ready by the system.
·
Sometimes
you need to change the behavior of PHP at runtime, then this configuration file
is to use.
·
All the
settings related to registering global variables, uploading maximum size,
display log errors, resource limits,
·
the
maximum time to execute a PHP script and others are written in file as a set of
directives that helps in declaring changes.
·
The
php.ini file is the default configuration file for running applications that
required PHP. it used to control variables such as upload
·
sizes,
file timeouts, and resource limits.
·
PHP.ini
file is the configuration file. It is always checked when the server gets
started or HTTP is restarted in the module and its configuration
·
the
website to know what a user can do or can't do with a website.
·
It also
helps with the administration of the web server easily.
·
Whenever
some changes are made to the file, you need to restart your web server.
·
It helps
in easy administration of the web with a server using these configuration files.
We can also write our own custom configuration files.
Example of
php.ini Settings:
; Maximum execution time of each script, in seconds
max_execution_time = 30
; Maximum amount of memory a script may consume
memory_limit = 128M
; Maximum allowed size for uploaded files
upload_max_filesize = 50M
; Set the default timezone
date.timezone = "America/New_York"