Apr
14

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

Author ZeeShaN    Category PHP, Web Development     Tags

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.

Add To Facebook Stumble This Digg This Add To Del.icio.us Add To Reddit Add To Yahoo Add To Twitter


Written by ZeeShaN

ZeeShaN RasooL is a web developer who loves to work in latest technologies to create more interactive dynamic and beautiful web pages.







Enter your Email:

Click Here for Popular

Who I Am

Zeeshan Rasool

Software Engineer - PHP
Lahore - Pakistan

zeeshan(@)99points.info
Skype: zeeshan-rasool
gTalk: zishan.rasool85

Categories

Tags

Comments