PHP uses settings in a file named php.ini to control some of its behavior. PHP looks for php.ini when it begins and uses the settings that it finds. If PHP can’t find the file, it uses a set of default settings. The default location for the php.ini file is one of the following unless you change it during installation:
If the php.ini file isn’t installed during installation, you need to install it now. A configuration file with default settings, called php.ini-dist, is included in the PHP distribution. Copy this file into the appropriate location, such as the default locations just mentioned, changing its name to php.ini.
If you have a previous version of PHP installed (such as PHP 4.3), make a backup copy of the php.ini file before you overwrite it with the php.ini file for PHP 5/6. You can then see the settings you are currently using and change the settings in the new php.ini file to match the current settings.
To configure PHP, follow these steps:
Steps 3, 4, 5, and 6 mention some specific settings that should always be changed if you are using the specified environment.
Look for the following line:
magic_quotes-gpc OnChange On to Off.
;cgi.force_redirect = 1You need to remove the semicolon so that the setting is active, and also change the 1 to 0. After the changes, the line looks as follows:
cgi.force_redirect = 0
;date.timezone =Remove the semicolon from the beginning of the line. Add the code for your local timezone after the equal sign. For instance, the line might be:
date.timezone = America/Los_AngelesYou can find a list of timezone codes at www.php.net/manual/en/timezones.php.