Recipe 8.15 Enabling PHP Script Handling

Problem

You want to enable PHP scripts on your server.

Solution

If you have mod_php installed, use AddHandler to map .php and .phtml files to the PHP handler:

AddHandler application/x-httpd-php .phtml .php

Discussion

This recipe maps all files with .phtml or .php to the PHP handler. You must ensure that the mod_php module is installed.

See Also

  • Recipe 2.5

  • Installation instructions on the mod_php web site at http://www.php.net/manual/en/install.apache.php for Apache 1.3 or http://www.php.net/manual/en/install.apache2.php for Apache 2.0



Apache Cookbook
Apache Cookbook: Solutions and Examples for Apache Administrators
ISBN: 0596529945
EAN: 2147483647
Year: 2006
Pages: 215

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net