PHP.ini is very useful and it is
a configuration file that is used to customize behavior of PHP at runtime.
The Settings
in which upload directory, register global variables, display errors, log
errors, max uploading size setting, maximum time to execute a script and other
configurations is written in this file.
When PHP Server
starts up it looks for PHP.ini file first to load various values for settings.
If you made changes in PHP.ini then you need to restart your server to check
the changes be effected. Default php.ini file of web server. the copy of this
ini file can be found in /usr/local/lib/php/ for UNIX installation.
If you want to
do some custom configurations then you can also write your own php.ini file.
For this copy php.ini template file, make necessary changes in values
directives according to your need rename it to php.ini then copy it to desired
location in root of your web directory or in any particular folder. But hosting
should allow for running this file. The PHP runtime will take values only for
settings which are specified in php.ini file if you are using your own, for
rest of settings it will take defaults of PHP runtime. So if you are writing
your own php.ini, keep in mind to overwrite every settings specified in web
server’s php.ini file this cannot be used as an extension of web server’s
php.ini file.
For Example
php.ini //save
file as php.ini
php_value post_max_size 16M //maximum
uploading size is 8mb
//so now we can
change it upto 16mb
No comments:
Post a Comment