What is php.ini File and Why we use it?

Author: Zeeshan Rasool  |  Apr 14, 2010 PHP, Web Development

PHP.ini is very useful and it is a configuration file that is used to customize behavior of PHP at runtime. This enables easy administration in the way you administer Apache web server using configuration files. 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 can not be used as an extension of web server’s php.ini file.

Recommended WordPress Themes Stores



If you enjoyed this post, please consider leaving a comment below or subscribing to the RSS feed to have future articles delivered to your feed reader. You can also follow us on Facebook or Twitter @99Points

This awesome post has been created by 99Points editor's team. You can follow our updates on Twitter and facebook, OR drop an email at 99points.info@gmail.com



Email Subscriber!

Be the first to know about new updates


Author of 99Points
Zeeshan Rasool is an experienced PHP Web Developer and founder at 99Points. Expert in Codeigniter (MVC), WordPress, JSON, jQuery & HTML5
 LinkedIn Profile  About.me


Advertisement




Friends


Categories


Popular post