After installing PHP, the next step would be configuring its many options. In order to do this, you must edit the configuration file, which should be called "php.ini". PHP reads this file when it starts, so you shouldn’t expect your changes to apply as soon as you’ve modified the file, you have to restart the web-server after you’ve changed PHP’s configuration file!
The configuration file is not provided with PHP; instead, there are two templates which should help you decide on PHP settings: a development purposes template "php.ini-dist" – and a production site template "php.ini-recommended". If no configuration file is used, then PHP will use the factory settings.
If you intend to use PHP for learning and development, you should definitely use the first template. If you will use PHP for production purposes, you should go with the second template. This second one makes PHP more efficient and more secure. Unfortunately, this way of improving PHP’s performance may make it incompatible with some applications, and may prove to be difficult to develop with. So go ahead and choose the one it suits you best, and then copy it under the name "php.ini" in its intended location – you can find out where PHP looks for its configuration file if you read the documentation. The locations of the configuration file may differ for each platform, so, for example, on UNIX-systems you should place it in "/usr/local/lib/"; on a Windows system, the default location is the Windows directory. A "php.ini" file in the current working directory will override one in the default location, so it’s easy to change the behavior of PHP on a per-directory basis.
The configuration file is fully commented, so you can go over each one setting and see the effect on your application, and then decide weather to modify it or not. Changing the values is actually very easy, you just have to open the configuration file in your favorite text file editor, and simply modify the settings according to your needs. Again, remember to restart the web-server after you’ve altered the configuration file.
The settings in the php.ini file take the form of a setting name and a value separated by an equals sign. White spaces between these two are ignored; a semicolon instructs PHP not to take into consideration the text that follows the semicolon, until the end of the line. Most settings’ names are suggestive to their behavior, and you will find some useful descriptions before each setting.