If run as an Apache module, PHP's behavior can also be modified through Apache's configuration file, httpd.conf. Options may also be set through .htaccess if allowed through AllowOverride.
The syntax of Apache's configuration file is used and the hash sign is used to designate comments. Boolean options are set using the php_flag and php_admin_flag directives, while value based options are set using the php_value and php_admin_value directives.
Here is a simplified excerpt from a possible httpd.conf:
LoadModule php4_module libexec/libphp4.so
AccessFileName .htaccess AllowOverride All
<IfModule mod_php4.c> # Directives to process if PHP is being used as an # Apache module # # Allow ASP-style <% %> tags php_admin_flag asp_tags off
# The number of significant digits displayed in # floating point numbers php_value precision 14 </IfModule>
Options set using either the php_admin_flag or php_admin_value cannot be overridden by entries in an auxiliary configuration file. For example, the asp_tags option from the above sample could not be overridden by future directives found within .htaccess, but the precision option could.
Apache does not allow Admin directives within .htaccess, thus the reason for four directives instead of just two. Only php_flag and php_value directives can appear within an .htaccess file.