Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Set PHP settings in Apache configuration

Answer:

It is possible to set PHP (PHP5) settings in the Apache configuration.

E.g. Turn on register_globals

Add the following lines to the Apache configuration (httpd.conf)

<IfModule mod_php5.c>
    php_value register_globals                1
</IfModule>

Restart Apache to take effect

# apachectl -k graceful

  1. Turn on expire headers in Apache
  2. Enable Server Side Includes in Apache
  3. How to restart Apache without disconnecting user
  4. How to check the Apache configuration file (httpd.conf)?
  5. Disable X-Powered-By and Server headers in Apache/PHP

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>