You are not logged in.

#1 2010-12-03 00:38:59

poulshichone
Member
Registered: 2010-12-03
Posts: 1

Php AddHandler Error

Hi Everyone,

I'am currently trying to create my own httpd file to set up a web server.
I'am struggling with the error and i can't find out how to resolve it :

syntax error on line 6 of /etc/httpd/conf/extra/php5_module.conf:
Invalid command 'AddHandler', perhaps misspelled or defined by a module not included in the server configuration

This is my httpd.conf file :

User http
Group http

LockFile /etc/httpd/apache2.lock
PidFile /var/run/apache2.pid

Listen *:80

Timeout 30
MaxClients 200
MaxRequestsPerChild 0
StartServers 5
MinSpareServers 5
MaxSpareServers 10

ServerRoot "/etc/httpd/"
ServerAdmin Xy@gmail.con
ServerName www.Xy.org

ServerSignature Email

<Location />
    Options -Indexes
</Location>

LoadModule alias_module modules/mod_alias.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule dir_module modules/mod_dir.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule unique_id_module modules/mod_unique_id.so
LoadModule php5_module modules/libphp5.so

Include conf/extra/php5_module.conf
DirectoryIndex index.html index.php
DocumentRoot "/srv/http"

And the file php5_module.conf :

<IfModule dir_module>
    <IfModule php5_module>
        DirectoryIndex index.php index.html
        AddHandler application/x-httpd-php .php
        AddHandler application/x-httpd-php-source .phps
    </IfModule>
</IfModule>

Thank you
Have a nice day

Offline

#2 2010-12-03 10:55:31

Snowknight
Member
Registered: 2009-06-11
Posts: 55
Website

Re: Php AddHandler Error

I believe you need to load mod_mime for the AddHandler directive to work.

Offline

Board footer

Powered by FluxBB