unknown filter was not added: PHP

Discussion in 'Installation/Configuration' started by ddelbia, Jan 20, 2006.

  1. ddelbia

    ddelbia Member

    Hi,
    I get this error every time I view a php page on /var/log/apache/error.log:

    [Fri Jan 20 09:59:18 2006] [error] an unknown filter was not added: PHP

    This is vhost file written by ISPConfig

    <VirtualHost 1.2.3.4:80>
    SuexecUserGroup web14_ftp web14
    ServerName www.xxxxxx.com:80
    ServerAdmin webmaster@xxxxxx.com
    DocumentRoot /var/www/web14/web
    DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm
    ScriptAlias /cgi-bin/ /var/www/web14/cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    ErrorLog /var/www/web14/log/error.log
    AddType application/x-httpd-php .php .php3 .php4 .php5
    <Files *.php>
    SetOutputFilter PHP
    SetInputFilter PHP
    </Files>
    <Files *.php3>
    SetOutputFilter PHP
    SetInputFilter PHP
    </Files>
    <Files *.php4>
    SetOutputFilter PHP
    SetInputFilter PHP
    </Files>
    <Files *.php5>
    SetOutputFilter PHP
    SetInputFilter PHP
    </Files>
    php_admin_flag safe_mode On
    php_admin_value open_basedir /var/www/web14/
    php_admin_value file_uploads 1
    php_admin_value upload_tmp_dir /var/www/web14/phptmp/
    php_admin_value session.save_path /var/www/web14/phptmp/
    Alias /error/ "/var/www/web14/web/error/"
    ErrorDocument 400 /error/invalidSyntax.html
    ErrorDocument 401 /error/authorizationRequired.html
    ErrorDocument 403 /error/forbidden.html
    ErrorDocument 404 /error/fileNotFound.html
    ErrorDocument 405 /error/methodNotAllowed.html
    ErrorDocument 500 /error/internalServerError.html
    ErrorDocument 503 /error/overloaded.html
    AliasMatch ^/~([^/]+)(/(.*))? /var/www/web14/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web14/user/$1/web/$3
    </VirtualHost>
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats nothing serious, just ignore it. ISPConfig has to enable PHP with filter records and addtpye records beacuse some of the first apache 2 versions wont work without. We will make this configurable in one of the next updates.
     
  3. ddelbia

    ddelbia Member

    Ok, it only increases my error.log file ;-)
     
  4. wr19026

    wr19026 New Member

    Is this still on the radar to be addressed in an upcoming release as I still see this error appear...
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    This has already been fixed many releases ago. You will just have to change the line from:

    $go_info["server"]["apache2_php"] = 'both'; // one string of one or more comma seperated options: 'filter' = set PHP filters, 'addtype' = Set PHP addtype, 'both' = Set Filter + Addtype, 'engine' = Use "php_admin_flag engine on/off", suphp = SuPHP wrapper enabled, 'addhandler' = Set PHP AddHandler (nescessary for SuSE 10.2)


    to:

    $go_info["server"]["apache2_php"] = 'addtype'; // one string of one or more comma seperated options: 'filter' = set PHP filters, 'addtype' = Set PHP addtype, 'both' = Set Filter + Addtype, 'engine' = Use "php_admin_flag engine on/off", suphp = SuPHP wrapper enabled, 'addhandler' = Set PHP AddHandler (nescessary for SuSE 10.2)


    in the file /home/admispconfig/ispconfig/lib/config.inc.php
     
  6. wr19026

    wr19026 New Member

    Ok thanks. However, this is appearing on a server installed last December using the then most current version (2.2.7 or 2.2.8 I guess).

    Forgot to mention, this is on a server running Ubuntu 6.06
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Have you changed the config.inc.php file as I described above?
     
  8. wr19026

    wr19026 New Member

    Yes, I copied and pasted the update - should I restart apache for it to become effective?

    Still, I notice it on a new install for 2.2.9, will this be fixed in an upcoming release, or is it Ubuntu (in this case 6.10) specific?
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    After you changed this line, you must modify a avlue in one of your websites to let ISPConfig rewrite your configuration files.

    My answer is still the same and yes, I know that is is fixed and working ;)

    This has already been fixed many releases ago. You will just have to change the line from:

    $go_info["server"]["apache2_php"] = 'both'; // one string of one or more comma seperated options: 'filter' = set PHP filters, 'addtype' = Set PHP addtype, 'both' = Set Filter + Addtype, 'engine' = Use "php_admin_flag engine on/off", suphp = SuPHP wrapper enabled, 'addhandler' = Set PHP AddHandler (nescessary for SuSE 10.2)


    to:

    $go_info["server"]["apache2_php"] = 'addtype'; // one string of one or more comma seperated options: 'filter' = set PHP filters, 'addtype' = Set PHP addtype, 'both' = Set Filter + Addtype, 'engine' = Use "php_admin_flag engine on/off", suphp = SuPHP wrapper enabled, 'addhandler' = Set PHP AddHandler (nescessary for SuSE 10.2)


    in the file /home/admispconfig/ispconfig/lib/config.inc.php
     
  10. wr19026

    wr19026 New Member

    And as usual, it works :) Thanks again!

    By the way, from what I heard there seems to be an inconsistency with HTTP code for port 81 traffic (starting off with control characters or so). Apparently this can cause problems with firewalls. I've asked for more details and will post in a seperate post once I know them.
     
  11. martinfst

    martinfst ISPConfig Developer ISPConfig Developer

    Just to add a little bit more salt.....
    I noticed this on one of my servers today. One server was oke (with php4), a server with php5 had the same error and the fix as described worked. I tried to search the sources (svn) but I couldn't find where to look in svn://svn.ispconfig.org/ispconfig/trunk/

    I have 2.2.9
     
    Last edited: Feb 23, 2007
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    Hi Martin,

    this is is not a bug. Some Apache installations need it as it is (filter + addtype) and others as your do nont need the filter tags. But with filter tags it works on all servers, so thats the default.

    As you see it is just a setting that should be set directly after the installation in config.inc.php to match your installation.
     
  13. martinfst

    martinfst ISPConfig Developer ISPConfig Developer

    And with every update and update and update ......
    Understand now it's needed, but for me really annoying. I just don't like cluttered log files with no additional value of the messages :eek:
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    The code of this setting is read by the setup script and dont overwritten during the update. At least since 2.2.8.

    You can see that its not hardcoded in config.php.tmp in the install_ispconfig folder in SVN.
     
  15. martinfst

    martinfst ISPConfig Developer ISPConfig Developer

    That's good/excellent news. Thanks!
     
  16. Rasputin

    Rasputin New Member

    I changed this and made a restart of ispconfig but there is still the same error message in the error_log:

    [error] an unknown filter was not added: PHP

    Do you have any idea? OS is OpenSuse 10.1
     
  17. falko

    falko Super Moderator ISPConfig Developer

    It's not enough to restart ISPConfig. You must modify the settings of a web site in ISPConfig (e.g. disable SSI and re-enable it again a few minutes later) so that ISPConfig rewrites the Apache configuration.
     
  18. Rasputin

    Rasputin New Member

    Problem solved. Thanks!
     
  19. bolero

    bolero New Member

    What about adding an option of "none"? I don't see much sense in adding this to each and every web when I want to have PHP enabled globally, anyway. Then it only adds to the size of the configuration which adds to the size of the config variables that apache needs to hold in RAM for it's own operation.
     
  20. bolero

    bolero New Member

    Question: Will ISPConfig rewrite the apache config after this change?
     

Share This Page