Ubuntu 10.04 Syntax error in php5.conf (ISPC 2)

Discussion in 'Installation/Configuration' started by krambiorix, Apr 27, 2011.

  1. krambiorix

    krambiorix New Member

    Hi guys,

    first of all, great work, nice product!

    When i try to restart apache from a fresh install, i get Syntax error on line 3 of /etc/apache2/mods-enabled/php5.conf: SetHandler takes one argument, a handler name that overrides any other configured handler ...fail!

    This is my php5.conf :

    <IfModule mod_php5.c>
    <FilesMatch "\.ph(p3?|tml)$">
    SetHandler ##ISPConfig INSTALL## application/x-httpd-php
    </FilesMatch>
    <FilesMatch "\.phps$">
    SetHandler ##ISPConfig INSTALL## application/x-httpd-php-source
    </FilesMatch>
    # To re-enable php in user directories comment the following lines
    # (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it
    # prevents .htaccess files from disabling it.
    <IfModule mod_userdir.c>
    <Directory /home/*/public_html>
    php_admin_value engine Off
    </Directory>
    </IfModule>
    </IfModule>
    ~
    Thanks for the help
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Modify the file as follows and restart Apache:


    Code:
    <IfModule mod_php5.c>
    <FilesMatch "\.ph(p3?|tml)$">
    [COLOR="Red"]##ISPConfig INSTALL##[/COLOR] SetHandler application/x-httpd-php
    </FilesMatch>
    <FilesMatch "\.phps$">
    [COLOR="Red"]##ISPConfig INSTALL##[/COLOR] SetHandler application/x-httpd-php-source
    </FilesMatch>
    # To re-enable php in user directories comment the following lines
    # (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it
    # prevents .htaccess files from disabling it.
    <IfModule mod_userdir.c>
    <Directory /home/*/public_html>
    php_admin_value engine Off
    </Directory>
    </IfModule>
    </IfModule>
     
  3. krambiorix

    krambiorix New Member

    Falko,

    i reinstalled everything and now it works.

    Thx for your time!
     

Share This Page