Miscellaneous

  Home arrow Miscellaneous arrow Page 3 - Controlling PHP
MISCELLANEOUS

Controlling PHP
By: bluephoenix
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2004-06-15

    Table of Contents:
  • Controlling PHP
  • php.ini
  • httpd.conf
  • Window's Registry
  • PHP Scripts
  • Conclusion

  •  
     

    SEARCH CODEWALKERS

    TOOLS YOU CAN USE

    advertisement

    Controlling PHP - httpd.conf


    (Page 3 of 6 )

    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.

    More Miscellaneous Articles
    More By bluephoenix

    blog comments powered by Disqus

    MISCELLANEOUS ARTICLES

    - Oracle Database XE: Indexes and Sequences
    - Modifying Tables in Oracle Database XE
    - Oracle Database XE: Tables and Constraints
    - More on Oracle Databases and Datatypes
    - Oracle Database XE Datatypes: Datetime and L...
    - Oracle Database XE Datatypes: Character and ...
    - From Databases to Datatypes
    - Firefox 3.6.6 Released with Improved Plug-in...
    - Attention Bloggers: WordPress 3.0 Now Releas...
    - Reflection in PHP 5
    - Inheritance and Other Advanced OOP Features
    - Advanced OOP Features
    - Linux from Scratch V.6.6 Review
    - Linux Gaining in Strength
    - Install Slackware on Your Old PC


    © 2003-2012 by Developer Shed. All rights reserved. DS Cluster 8 - Follow our Sitemap