Error after upgrade

Discussion in 'Installation/Configuration' started by mbascombe, Apr 13, 2008.

  1. mbascombe

    mbascombe Member

    I upgrade my system to ISPConfig 2.22.2 and ran in to this error
    Code:
    root@server1:~# /etc/init.d/apache2 restart
     * Restarting web server apache2                                                Syntax error on line 48 of /etc/apache2/vhosts/Vhosts_ispconfig.conf:
    Invalid command 'php_admin_flag', perhaps misspelled or defined by a module not included in the server configuration
                                                                             [fail]
    root@server1:~# vi /etc/apache2/vhosts/Vhosts_ispconfig.conf
    ###################################
    #
    # ISPConfig vHost Configuration File
    #         Version 1.0
    #
    #estarting web server apache2                                                Syntax error on line 48 of /etc/apache2/vhosts/Vhosts_ispconfig.conf:
    Invalid command 'php_admin_flag', perhaps misspelled or defined by a module not included in the server configuration
                                                                             [fail]
     * Restarting web server apache2                                                Syntax error on line 48 of /etc/apache2/vhosts/Vhosts_ispconfig.conf:
    Invalid command 'php_admin_flag', perhaps misspelled or defined by a module not included in the server configuration
                                                                             [fail]
    
    
    
    Is there something I need to do
     
  2. daveb

    daveb Member

    By chance you use suphp?
     
  3. mbascombe

    mbascombe Member

    I upgraded ISPConfig and then was following the how to install suPHP with ISPConfig-2.2.20 whenI noticed the problem.
     
  4. daveb

    daveb Member

    suPHP does not support the php_value/php_admin_value directive known by mod_php to parse configuration options to scripts for certain virtual hosts or directories. You will have to either make the changes to your php.ini or have a individual php.ini for that web with the php options needed.
     
  5. mbascombe

    mbascombe Member

    Thanks but how do I go about making the change in the php.ini
     
  6. daveb

    daveb Member

    You can either make your changes server wide to your php.ini. Not sure your dist but in debian you would find it at
    Code:
    /etc/php5/cgi/php.ini
    then restart apache2
    or if you would like to just make the changes to 1 web
    Code:
    cp /etc/php5/cgi/php.ini /var/www/web#/php.ini
    make your changes
    and then in the apache directives for the site add
    Code:
    suPHP_ConfigPath /var/www/web#/php.ini
    you might also have to restart apache2 afterwards
     
  7. mbascombe

    mbascombe Member

    ok now I'm being told that there is no no such file or directory.
    Does that mean I do not have php5 installed
     
  8. daveb

    daveb Member

    did you finish the install of suphp?
    whats the contents of
    Code:
    cat /etc/apache2/httpd.conf
    what file are you not able to find? php.ini
    try
    Code:
    updatedb
    locate php.ini
     
  9. mbascombe

    mbascombe Member

    ok I decided to do an update and upgrade and this is the result
    Code:
    
    Setting up mysql-server-5.0 (5.0.45-1ubuntu3.3) ...
     * Stopping MySQL database server mysqld                                 [ OK ]
     * Starting MySQL database server mysqld                                 [ OK ]
     * Checking for corrupt, not cleanly closed and upgrade needing tables.
    
    Setting up mysql-server (5.0.45-1ubuntu3.3) ...
    Setting up mysql-client (5.0.45-1ubuntu3.3) ...
    Setting up libbz2-1.0 (1.0.4-0ubuntu2.1) ...
    
    Setting up bzip2 (1.0.4-0ubuntu2.1) ...
    
    Setting up python2.5 (2.5.1-5ubuntu5.1) ...
    
    Setting up libkrb53 (1.6.dfsg.1-7ubuntu0.1) ...
    
    Setting up libvolume-id0 (113-0ubuntu17) ...
    Setting up volumeid (113-0ubuntu17) ...
    update-initramfs: deferring update (trigger activated)
    
    Setting up udev (113-0ubuntu17) ...
    update-initramfs: deferring update (trigger activated)
    
    Setting up libisc32 (1:9.4.1-P1-3ubuntu1) ...
    
    Setting up libdns32 (1:9.4.1-P1-3ubuntu1) ...
    
    Setting up libisccc30 (1:9.4.1-P1-3ubuntu1) ...
    
    Setting up libisccfg30 (1:9.4.1-P1-3ubuntu1) ...
    
    Setting up libbind9-30 (1:9.4.1-P1-3ubuntu1) ...
    
    Setting up liblwres30 (1:9.4.1-P1-3ubuntu1) ...
    
    Setting up bind9 (1:9.4.1-P1-3ubuntu1) ...
    Installing new version of config file /etc/bind/db.root ...
     * Starting domain name service... bind                                  [ OK ]
    
    Setting up bind9-host (1:9.4.1-P1-3ubuntu1) ...
    Setting up dnsutils (1:9.4.1-P1-3ubuntu1) ...
    
    Setting up openssh-client (1:4.6p1-5ubuntu0.2) ...
    
    Setting up openssh-server (1:4.6p1-5ubuntu0.2) ...
     * Restarting OpenBSD Secure Shell server sshd                           [ OK ]
    
    Setting up rsync (2.6.9-5ubuntu1.1) ...
    
    Setting up libpcre3 (7.4-0ubuntu0.7.10.2) ...
    
    Setting up libpq5 (8.2.7-0ubuntu0.7.10) ...
    
    Setting up apache2-utils (2.2.4-3ubuntu0.1) ...
    Setting up apache2.2-common (2.2.4-3ubuntu0.1) ...
    
    Setting up apache2-mpm-prefork (2.2.4-3ubuntu0.1) ...
     * Starting web server apache2                                                  apache2: Syntax error on line 345 of /etc/apache2/apache2.conf: Syntax error on line 259 of /etc/apache2/vhosts/Vhosts_ispconfig.conf: /etc/apache2/vhosts/Vhosts_ispconfig.conf:274: <Files> was not closed.\n/etc/apache2/vhosts/Vhosts_ispconfig.conf:259: <VirtualHost> was not closed.
                                                                             [fail]
    invoke-rc.d: initscript apache2, action "start" failed.
    
    Setting up apache2 (2.2.4-3ubuntu0.1) ...
    Setting up apache2-doc (2.2.4-3ubuntu0.1) ...
    apache2: Syntax error on line 345 of /etc/apache2/apache2.conf: Syntax error on line 259 of /etc/apache2/vhosts/Vhosts_ispconfig.conf: /etc/apache2/vhosts/Vhosts_ispconfig.conf:274: <Files> was not closed.\n/etc/apache2/vhosts/Vhosts_ispconfig.conf:259: <VirtualHost> was not closed.
       ...fail!
    invoke-rc.d: initscript apache2, action "reload" failed.
    
    
    
    never got to finish the install because the apache2 could not restart. But here are the result
    Code:
    
    
    root@server1:~# cat /etc/apache2/httpd.conf
    
    root@server1:~# updatedb
    
    root@server1:~# locate php.ini
    /etc/php5/apache2/php.ini
    /etc/php5/apache2/.php.ini.swp
    /etc/php5/cli/php.ini
    /root/ispconfig/php/php.ini
    /usr/share/doc/php5-common/examples/php.ini-dist
    /usr/share/doc/php5-common/examples/php.ini-paranoid
    /usr/share/doc/php5-common/examples/php.ini-recommended
    /usr/share/php5/php.ini-dist
    root@server1:~#
    
    I appreciate your help
     
    Last edited: Apr 13, 2008
  10. daveb

    daveb Member

    So I guess you never finsihed the suphp install? looks like all you did when you fist posted was the first 2 steps right?
    Code:
    a2dismod php5
    /etc/init.d/apache2 restart
    then you got the errors for php_admin_flag correct, if correct thats because you disabled php in order to finish the install of suphp.
    please post the contents of /etc/apache2/vhosts/Vhosts_ispconfig.conf
     
  11. mbascombe

    mbascombe Member

    Code:
    </Files>
    <Files *.php5>
        SetOutputFilter PHP
        SetInputFilter PHP
    </Files>
    php_admin_flag safe_mode Off
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
    AddType application/vnd.wap.wmlscriptc .wmlsc .wsc
    AddType text/vnd.wap.wml .wml
    AddType text/vnd.wap.wmlscript .ws .wmlscript
    AddType image/vnd.wap.wbmp .wbmp
    Alias /error/ "/var/www/web4/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/web4/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web4/user/$1/web/$3
    </VirtualHost>
    #
    #
    #
    ######################################
    # Vhost: www.emersongamoryincometaxservice.com:80
    ######################################
    #
    #
    <VirtualHost 75.127.248.138:80>
    ServerName www.emersongamoryincometaxservice.com:80
    ServerAdmin [email protected]
    DocumentRoot /var/www/web6/web
    ServerAlias emersongamoryincometaxservice.com
    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
    Alias  /cgi-bin/ /var/www/web6/cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    ErrorLog /var/www/web6/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/web6/
    php_admin_value file_uploads 1
    php_admin_value upload_tmp_dir /var/www/web6/phptmp/
    php_admin_value session.save_path /var/www/web6/phptmp/
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
    AddType application/vnd.wap.wmlscriptc .wmlsc .wsc
    AddType text/vnd.wap.wml .wml
    AddType text/vnd.wap.wmlscript .ws .wmlscript
    AddType image/vnd.wap.wbmp .wbmp
    Alias /error/ "/var/www/web6/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/web6/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web6/user/$1/web/$3
    </VirtualHost>
    #
    #
    #
    ######################################
    # Vhost: www.bascombeonline.com:80
    ######################################
    #
    #
    <VirtualHost 75.127.248.138:80>
    ServerName www.bascombeonline.com:80
    ServerAdmin [email protected]
    DocumentRoot /var/www/web9/web
    ServerAlias bascombeonline.com
    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
    Alias  /cgi-bin/ /var/www/web9/cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    ErrorLog /var/www/web9/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/web9/
    php_admin_value file_uploads 1
    php_admin_value upload_tmp_dir /var/www/web9/phptmp/
    php_admin_value session.save_path /var/www/web9/phptmp/
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
    AddType application/vnd.wap.wmlscriptc .wmlsc .wsc
    AddType text/vnd.wap.wml .wml
    AddType text/vnd.wap.wmlscript .ws .wmlscript
    AddType image/vnd.wap.wbmp .wbmp
    Alias /error/ "/var/www/web9/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/web9/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web9/user/$1/web/$3
    </VirtualHost>
    #
    #
    #
    ######################################
    # Vhost: www.bascombe.info:80
    ######################################
    #
    #
    <VirtualHost 75.127.248.138:80>
    ServerName www.bascombe.info:80
    ServerAdmin [email protected]
    DocumentRoot /var/www/web20/web
    ServerAlias webmail.bascombe.info bascombe.info
    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
    Alias  /cgi-bin/ /var/www/web20/cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    ErrorLog /var/www/web20/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
    t: www.bascombe.info:80
    ######################################
    #
    #
    <VirtualHost 75.127.248.138:80>
    ServerName www.bascombe.info:80
    ServerAdmin [email protected]
    DocumentRoot /var/www/web20/web
    ServerAlias webmail.bascombe.info bascombe.info
    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
    Alias  /cgi-bin/ /var/www/web20/cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    ErrorLog /var/www/web20/log/error.log
    AddType application/x-httpd-php .php .php3 .php4 .php5
    <Files *.php>
        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
    AddType application/vnd.wap.wmlscriptc .wmlsc .wsc
    AddType text/vnd.wap.wml .wml
    AddType text/vnd.wap.wmlscript .ws .wmlscript
    AddType image/vnd.wap.wbmp .wbmp
    Alias /error/ "/var/www/web20/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/web20/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web20/user/$1/web/$3
    </VirtualHost>
    #
    #
    #
    root@server1:~#
    
     
  12. daveb

    daveb Member

    ok then make a copy of your /etc/apache2/vhosts/Vhosts_ispconfig.conf.
    Code:
    cp /etc/apache2/vhosts/Vhosts_ispconfig.conf /etc/apache2/vhosts/Vhosts_ispconfig-backup.conf
    Now remove all the php_admin entries within the original Vhosts_ispconfig.conf
    Code:
    vi /etc/apache2/vhosts/Vhosts_ispconfig.conf 
    Then restart apache
    Code:
    /etc/init.d/apache2 restart
    Then you should be able to finish your suphp install.
    You will probably not have to do any edits to your php.ini then looks as if their is possibly a step missing in the howto.
     
    Last edited: Apr 13, 2008
  13. mbascombe

    mbascombe Member

    Ok I was able get apache2 restarted. But now I'm following falko how to suPHP and running into a problem and afraid to go any further.
    When I try to install php4-cgi
    Code:
    root@server1:~# apt-get install php4-cgi
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Package php4-cgi is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    E: Package php4-cgi has no installation candidate
    root@server1:~#
    
    
    should i be alarm or continue.
     
  14. daveb

    daveb Member

    I think the howto refers to php5-cgi. If you are using ubuntu 7.10 i didnt see any refernce php4 in the ubuntu repositry.
     

Share This Page