System Configuration
Now that you have PHP and your web server up and running, you will probably want to configure PHP to your liking. All of PHP's settings are available in its php.ini file, which, if you followed these installation instructions, is available either in /usr/local/lib/php (Unix) or c:\windows\php.ini (Windows). Open this in your text editor of choice (you will need to be root on Unix).
A list of popular options, what they do, and their default values (if you use php.ini-recommended as the default) is given in Table 2-2. Note that lines starting with a semicolon (;) are comments, and are ignored by PHP.
Table 2-2. Configuration options for PHP
Option |
Meaning |
Default |
---|---|---|
|
Enables the |
On |
|
Sets whether PHP should output error messages to the screen |
Off |
|
Decides what types of errors PHP should notify you of |
E_ALL |
|
Allows PHP to identify itself to clients through the web server |
On |
|
Loads a PHP extension |
N/A |
|
Sets the directory where PHP should look for extensions |
./ |
|
Decides whether PHP should accept users uploading files |
On |
|
Determines whether PHP should store error messages in a log file |
On |
|
Determines whether PHP should automatically run form data through |
Off |
|
Determines how long a script may run for before timing out |
30 seconds |
|
Get PHP in a Nutshell 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.