Miscellaneous
  Home arrow Miscellaneous arrow Page 3 - Controlling PHP
Codewalker Forums 
  Tutorials  
Database Articles  
Miscellaneous  
Navigation Usability  
PEAR Articles  
Programming Basics  
Server Administration  
XML Tutorials  
  Reviews  
Database Book Reviews  
Linux Book Reviews  
Miscellaneous Reviews  
PHP Book Reviews  
PHP Software Reviews  
Server Admin Reviews  
SQL Tool Reviews  
  Code Gallery  
Content Management Code  
Contest Code  
Counters Code  
Database Code  
Date Time Code  
Discussion Board Code  
Email Code  
File Manipulation Code  
GUI Code  
Link Farm Code  
Miscellaneous Code  
Search Code  
Site Navigation Code  
User Management Code  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Download TestComplete 
Forums Sitemap 
Weekly Newsletter 
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
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

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    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


       · Dear SirExplained the Mantra of Controlling PHP Behaviour in different...
       · I'm glad you've found it beneficial! Personally, I think I'll be installing...
       · lkj
     

    MISCELLANEOUS ARTICLES

    - Using PHP to Stream MP3 Files and Prevent Il...
    - 10 Must Have Firefox Improvements
    - All About OpenOffice 3.0
    - Shell Script Writing
    - Loops in the UNIX Shell
    - The Test in the UNIX Shell
    - Data Streams and the UNIX Shell
    - Control Mechanisms of the UNIX Shell
    - Variables Within the UNIX Shell
    - The Shell and UNIX
    - In Detail: UNIX File Systems
    - Rights Management in UNIX
    - UNIX File Systems
    - The Terminal in UNIX
    - Operating Systems and UNIX





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek