Login Form
| What is php.ini? |
|
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.
This file is named php.ini for a reason - it follows the INI file structure popular in many Windows applications. 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.
It's an ASCII text file is broken into named sections, each containing variables related to that section. Each section looks something like this:
Semicolons placed at the beginning of a line serve as comment markers. This makes it easy to enable or disable PHP features; rather than deleting a line, you can comment it out so that it isn't parsed. This is handy if you think you might want to re-enable a feature at a later date, you don't have to delete it out of the file.
In order for PHP to recognize it, the php.ini file must be located either in the current directory, the directory defined in the $PHPRC environment variable, or the directory specified at compile time (for Windows PHP, this is the main Windows directory).
After making changes to PHP's configuration through the php.ini file, you'll need to restart the Web server for your changes to take effect (assuming, of course, that you're using PHP through the Web server). For command-line usage of PHP, the configuration file will be read every time you invoke the PHP binary program. |