2.5. Configuring PHP
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:
Windows: The system directory, depending on the Windows version: on Windows 98/Me/XP, windows; on Windows NT/2000 (and sometimes XP), winnt
Unix, Linux, and Mac: /usr/local/lib
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.
|
To configure PHP, follow these steps:
Open the php.ini file for editing.
Change the settings you want to change.
Steps 3, 4, and 5 mention some specific settings that you should always change if you're using the specified environment.
Only if you're using PHP 5 or earlier, turn ...
Get PHP & MySQL® Web Development All-in-One Desk Reference for Dummies® now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.