15.1. Configuration Directives

Configuration directives change the behavior of PHP. PHP looks for these directives in php.ini. PHP looks for this file in three locations, in the following order: the current directory, the path set in the PHPRC environment variable, or in a standard path compiled into PHP. On UNIX, this path is /usr/local/lib. On Windows, it's the main system directory, usually C:\WINDOWS or C:\WINNT. A typical installation uses a single php.ini file, kept in this last path.

If you use the Apache Web server, you may override php.ini settings with .htaccess and httpd.conf files. You may use one of four Apache commands to set a PHP directive. Write the Apache command followed by the PHP directive name followed by the appropriate ...

Get Core PHP Programming, Third Edition 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.