"unknown filter" growing apache log.

Discussion in 'Installation/Configuration' started by wwparrish, Feb 16, 2006.

  1. wwparrish

    wwparrish New Member

    I am getting large logs due to this :

    Thu Feb 16 10:11:07 2006] [error] an unknown filter was not added: PHP
    [Thu Feb 16 10:11:15 2006] [error] an unknown filter was not added: PHP
    [Thu Feb 16 10:11:15 2006] [error] an unknown filter was not added: PHP
    [Thu Feb 16 10:11:18 2006] [error] an unknown filter was not added: PHP
    [Thu Feb 16 10:11:18 2006] [error] an unknown filter was not added: PHP
    [Thu Feb 16 10:11:22 2006] [error] an unknown filter was not added: PHP
    [Thu Feb 16 10:11:22 2006] [error] an unknown filter was not added: PHP
    [Thu Feb 16 10:11:33 2006] [error] an unknown filter was not added: PHP
    [Thu Feb 16 10:11:33 2006] [error] an unknown filter was not added: PHP
    [Thu Feb 16 10:11:48 2006] [error] an unknown filter was not added: PHP
    [Thu Feb 16 10:11:48 2006] [error] an unknown filter was not added: PHP
    [Thu Feb 16 10:12:22 2006] [error] an unknown filter was not added: PHP
    [Thu Feb 16 10:12:22 2006] [error] an unknown filter was not added: PHP
    [Thu Feb 16 10:13:22 2006] [error] an unknown filter was not added: PHP
    [Thu Feb 16 10:13:22 2006] [error] an unknown filter was not added: PHP
    [Thu Feb 16 10:14:25 2006] [error] an unknown filter was not added: PHP
    [Thu Feb 16 10:14:25 2006] [error] an unknown filter was not added: PHP
    [Thu Feb 16 10:15:25 2006] [error] an unknown filter was not added: PHP
    [Thu Feb 16 10:15:25 2006] [error] an unknown filter was not added: PHP



    If I could impose on you, I could probally figure it out in a week or two but since ISP config is running so nicely I dont want to mess it up.

    httpd.conf :

    Code:
    <directory /var/www/*/web>
       # Options +Includes -Indexes
        AllowOverride All
        Order allow,deny
        Allow from all
        <files ~ "^\.ht">
        Deny from all
        </files>
    </directory>
    
    <directory /var/www/*/user/*/web>
       # Options +Includes -Indexes
        AllowOverride All
        Order allow,deny
        Allow from all
        <files ~ "^\.ht">
        Deny from all
        </files>
    </directory>
    
    <directory /var/www/*/cgi-bin>
       # Options ExecCGI -Indexes
        AllowOverride None
        AllowOverride Indexes AuthConfig Limit FileInfo
        Order allow,deny
        Allow from all
        <files ~ "^\.ht">
        Deny from all
        </files>
    </directory>
    
    Include /etc/apache2/vhosts/Vhosts_ispconfig.conf
    
    and vhosts

    Code:
    ###################################
    #
    # ISPConfig vHost Configuration File
    #         Version 1.0
    #
    ###################################
    #
    NameVirtualHost xxx.xxx.xxx.xx:80
    <VirtualHost xxx.xxx.xxx.xx:80>
      ServerName localhost
      ServerAdmin root@localhost
      DocumentRoot /var/www/sharedip
    </VirtualHost>
    #
    #
    ######################################
    # Vhost: util.xxxxxxxx.net:80
    ######################################
    #
    #
    <VirtualHost xxx.xxx.xxx.xxx:80>
    ServerName util.xxxxxxxxx.net:80
    ServerAdmin [email protected]
    DocumentRoot /var/www/web1/web
    ServerAlias xxxxxxxxx.net
    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/web1/cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    ErrorLog /var/www/web1/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 Off
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
    Alias /error/ "/var/www/web1/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/web1/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web1/user/$1/web/$3
    </VirtualHost>
    #
    
    Thanks !!!!
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    ISPConfig adds addhandler and filter records for PHP because some apache 2 versions need filters, some need addhandler and some need both.

    This is already solved in the next ISPConfig release, then you can select in the config.inc.php file which php handler shall be used.
     
  3. trueshanti

    trueshanti New Member

    Hi till .. sorry to revoke this old threat, but i am looking for a solution "without" upgrading ispconfig , since i never walked through a complete successful upgrade and it alwas resulted in a fresh install .. what i dont like to redo again for now and my system is productive ..

    so i am looking for a way to implement a fix ..

    my problem with this issue goes a little bit further , since my apache used to crash regulary and always covered by this "unknown filter"-issue

    Code:
    [Tue Aug 29 12:06:45 2006] [error] an unknown filter was not added: PHP
    [Tue Aug 29 12:06:45 2006] [error] an unknown filter was not added: PHP
    [Tue Aug 29 12:06:50 2006] [error] an unknown filter was not added: PHP
    [Tue Aug 29 12:06:50 2006] [error] an unknown filter was not added: PHP
    [Tue Aug 29 12:07:29 2006] [error] an unknown filter was not added: PHP
    [Tue Aug 29 12:07:29 2006] [error] an unknown filter was not added: PHP
    [Tue Aug 29 12:08:29 2006] [error] an unknown filter was not added: PHP
    [Tue Aug 29 12:08:29 2006] [error] an unknown filter was not added: PHP
    [Tue Aug 29 12:09:29 2006] [error] an unknown filter was not added: PHP
    [Tue Aug 29 12:09:29 2006] [error] an unknown filter was not added: PHP
    [Tue Aug 29 12:09:57 2006] [error] an unknown filter was not added: PHP
    [Tue Aug 29 12:09:57 2006] [error] an unknown filter was not added: PHP
    [Tue Aug 29 12:10:00 2006] [error] an unknown filter was not added: PHP
    [Tue Aug 29 12:10:00 2006] [error] an unknown filter was not added: PHP
    [Tue Aug 29 12:10:01 2006] [error] an unknown filter was not added: PHP
    [Tue Aug 29 12:10:01 2006] [error] an unknown filter was not added: PHP
    [Tue Aug 29 12:10:04 2006] [notice] caught SIGTERM, shutting down
    [Tue Aug 29 12:11:45 2006] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec2)
    [Tue Aug 29 12:11:46 2006] [notice] mod_python: Creating 10 session mutexes based on 10 max processes and 0 ma
    x threads.
    [Tue Aug 29 12:11:47 2006] [notice] Apache/2.0.54 (Debian GNU/Linux) mod_python/3.1.3 Python/2.3.5 PHP/4.3.10-
    16 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_perl/1.999.21 Perl/v5.8.4 configured -- resuming normal operations
    [Tue Aug 29 12:11:51 2006] [error] an unknown filter was not added: PHP
    [Tue Aug 29 12:11:51 2006] [error] an unknown filter was not added: PHP
    [Tue Aug 29 12:11:54 2006] [error] an unknown filter was not added: PHP
    [Tue Aug 29 12:11:54 2006] [error] an unknown filter was not added: PHP
    [Tue Aug 29 12:11:56 2006] [error] an unknown filter was not added: PHP
    [Tue Aug 29 12:11:56 2006] [error] an unknown filter was not added: PHP

    so there is this SIGTERM all the time , thanks that ispconfig restarts my server at a good frequence :)

    thanks4comment

    best regards

    -c-
     
  4. falko

    falko Super Moderator Howtoforge Staff

    Check the function make_vhost() in /root/ispconfig/scripts/lib/config.lib.php. You can change it so that it doesn't write the PHP filters to your Apache configuration.
     
  5. hairydog2

    hairydog2 Member

    I'm sure that makes sense to you, but for someone who doesn't have the same technical knowledge you have, it is not really a solution.

    I'd like a simple "how to" to tell me what to change so that I don't get 3,800 lines per hour saying something like:

    [Fri Sep 01 15:26:41 2006] [error] an unknown filter was not added: PHP

    They only differ in the date and time!
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Just update to the latest ISPConfig release and change the line:

    Code:
    $go_info["server"]["apache2_php"] = 'both'; // 'filter' = set PHP filters, 'addtype' = Set PHP addtype or 'both' = Set Filter + Addtype, suphp = SuPHP wrapper enabled
    to:

    Code:
    $go_info["server"]["apache2_php"] = 'addtype'; // 'filter' = set PHP filters, 'addtype' = Set PHP addtype or 'both' = Set Filter + Addtype, suphp = SuPHP wrapper enabled
    in the file /home/admispconfig/ispconfig/lib/config.inc.php. Then change a setting in one of the websites and ISPConfig rewrites your apache configuration.
     
  7. hairydog2

    hairydog2 Member

    Thanks. That seems to have fixed the problem.
     

Share This Page