bug after upgrade

Discussion in 'Installation/Configuration' started by manarak, Aug 15, 2016.

  1. manarak

    manarak Member

    I recently upgraded a server from Debian 6 to Debian 7 and ISPconfig to the latest stable version: 3.0.5.4p9
    Everything seemed to run smoothly, including phpmyadmin, when I came across this oddity:
    After I changed the Apache Directives for a site in sites -> options (I added a mod security rule to ignore), phpmyadmin ceased to function normally. After filling the login credentials into the phpmyadmin login screen, the browser wants to change into SSL mode and prompts to offer to download index.php.
    This happened with http://www.domain1.com/phpmyadmin
    Then I tried to login into phpmyadmin through http://www.domain2.com/phpmyadmin where domain2 is another domain hosted on the same server.
    This worked correctly.
    Then I replicated the error by changing the Apache directives for domain2, and promptly phpmyadmin on domain2 ceased to work as well.

    I think ISPconfig overwrites or adds some vhost settings with stuff that doesn't belong there.
    How to fix?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    What you posted is not a bug, it's a config issue on your system. PHPMyadmin is a global alias, so you can affect its usage by settings configuration options in a vhost that you use to access this alias. You can e.g. tak a look into the apache error.log of the website to find out what is causing this issue.
     
  3. manarak

    manarak Member

    I checked the error logs and could not find anything suspicious.
    I post here two versions of vhosts
    this one is working correctly and has not been altered by ISPconfig panel:
    Code:
    <Directory /var/www/WORKING_OK.com>
         AllowOverride None
         Order Deny,Allow
         Deny from all
    </Directory>
    
    <VirtualHost *:80>
               DocumentRoot /var/www/WORKING_OK.com/web
           
         ServerName WORKING_OK.com
         ServerAlias www.WORKING_OK.com
         ServerAdmin webmaster@WORKING_OK.com
    
         ErrorLog /var/log/ispconfig/httpd/WORKING_OK.com/error.log
    
         Alias /error/ "/var/www/WORKING_OK.com/web/error/"
         ErrorDocument 400 /error/400.html
         ErrorDocument 401 /error/401.html
         ErrorDocument 403 /error/403.html
         ErrorDocument 404 /error/404.html
         ErrorDocument 405 /error/405.html
         ErrorDocument 500 /error/500.html
         ErrorDocument 502 /error/502.html
         ErrorDocument 503 /error/503.html
    
         <IfModule mod_ssl.c>
         </IfModule>
    
         <Directory /var/www/WORKING_OK.com/web>
             Options FollowSymLinks
             AllowOverride All
             Order allow,deny
             Allow from all
         </Directory>
         <Directory /var/www/clients/client1/web3/web>
             Options FollowSymLinks
             AllowOverride All
             Order allow,deny
             Allow from all
         </Directory>
    
    
    
    
         # suexec enabled
         <IfModule mod_suexec.c>
           SuexecUserGroup web3 client1
         </IfModule>
         # Clear PHP settings of this website
         <FilesMatch "\.ph(p3?|tml)$">
             SetHandler None
         </FilesMatch>
         # php as fast-cgi enabled
       # For config options see: http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html
         <IfModule mod_fcgid.c>
             IdleTimeout 300
             ProcessLifeTime 3600
             # MaxProcessCount 1000
             DefaultMinClassProcessCount 0
             DefaultMaxClassProcessCount 100
             IPCConnectTimeout 3
             IPCCommTimeout 360
             BusyTimeout 300
         </IfModule>
         <Directory /var/www/WORKING_OK.com/web>
             AddHandler fcgid-script .php .php3 .php4 .php5
             FCGIWrapper /var/www/php-fcgi-scripts/web3/.php-fcgi-starter .php
             Options +ExecCGI
             AllowOverride All
             Order allow,deny
             Allow from all
         </Directory>
         <Directory /var/www/clients/client1/web3/web>
             AddHandler fcgid-script .php .php3 .php4 .php5
             FCGIWrapper /var/www/php-fcgi-scripts/web3/.php-fcgi-starter .php
             Options +ExecCGI
             AllowOverride All
             Order allow,deny
             Allow from all
         </Directory>
    
    
         # add support for apache mpm_itk
         <IfModule mpm_itk_module>
           AssignUserId web3 client1
         </IfModule>
    
         <IfModule mod_dav_fs.c>
         # Do not execute PHP files in webdav directory
           <Directory /var/www/clients/client1/web3/webdav>
             <ifModule mod_security2.c>
               SecRuleRemoveById 960015
               SecRuleRemoveById 960032
             </ifModule>
             <FilesMatch "\.ph(p3?|tml)$">
               SetHandler None
             </FilesMatch>
           </Directory>
           DavLockDB /var/www/clients/client1/web3/tmp/DavLock
           # DO NOT REMOVE THE COMMENTS!
           # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
      # WEBDAV BEGIN
           # WEBDAV END
         </IfModule>
    
    <LocationMatch "/">
      SecRuleRemoveById 960015
    </LocationMatch>
    </VirtualHost>
    
    this one is the result when it has been changed by ISPconfig panel, and it is NOT WORKING
    Code:
    <Directory /var/www/NOT_WORKING.com>
         AllowOverride None
             Order Deny,Allow
         Deny from all
         </Directory>
    
    <VirtualHost *:80>
               DocumentRoot /var/www/NOT_WORKING.com/web
           
         ServerName NOT_WORKING.com
         ServerAlias www.NOT_WORKING.com
         ServerAdmin webmaster@NOT_WORKING.com
    
         ErrorLog /var/log/ispconfig/httpd/NOT_WORKING.com/error.log
    
         Alias /error/ "/var/www/NOT_WORKING.com/web/error/"
         ErrorDocument 400 /error/400.html
         ErrorDocument 401 /error/401.html
         ErrorDocument 403 /error/403.html
         ErrorDocument 404 /error/404.html
         ErrorDocument 405 /error/405.html
         ErrorDocument 500 /error/500.html
         ErrorDocument 502 /error/502.html
         ErrorDocument 503 /error/503.html
    
         <IfModule mod_ssl.c>
         </IfModule>
    
         <Directory /var/www/NOT_WORKING.com/web>
             # Clear PHP settings of this website
             <FilesMatch ".+\.ph(p[345]?|t|tml)$">
                 SetHandler None
             </FilesMatch>
             Options +FollowSymLinks
             AllowOverride All
                     Order allow,deny
             Allow from all
                 </Directory>
         <Directory /var/www/clients/client1/web1/web>
             # Clear PHP settings of this website
             <FilesMatch ".+\.ph(p[345]?|t|tml)$">
                 SetHandler None
             </FilesMatch>
             Options +FollowSymLinks
             AllowOverride All
                     Order allow,deny
             Allow from all
                 </Directory>
    
    
    
    
         # suexec enabled
         <IfModule mod_suexec.c>
           SuexecUserGroup web1 client1
         </IfModule>
         # php as fast-cgi enabled
       # For config options see: http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html
         <IfModule mod_fcgid.c>
             IdleTimeout 300
             ProcessLifeTime 3600
             # MaxProcessCount 1000
             DefaultMinClassProcessCount 0
             DefaultMaxClassProcessCount 100
             IPCConnectTimeout 3
             IPCCommTimeout 600
             BusyTimeout 3600
         </IfModule>
         <Directory /var/www/NOT_WORKING.com/web>
             <FilesMatch "\.php[345]?$">
               SetHandler fcgid-script
             </FilesMatch>
             FCGIWrapper /var/www/php-fcgi-scripts/web1/.php-fcgi-starter .php
             FCGIWrapper /var/www/php-fcgi-scripts/web1/.php-fcgi-starter .php3
             FCGIWrapper /var/www/php-fcgi-scripts/web1/.php-fcgi-starter .php4
             FCGIWrapper /var/www/php-fcgi-scripts/web1/.php-fcgi-starter .php5
             Options +ExecCGI
             AllowOverride All
                     Order allow,deny
             Allow from all
                 </Directory>
         <Directory /var/www/clients/client1/web1/web>
             <FilesMatch "\.php[345]?$">
               SetHandler fcgid-script
             </FilesMatch>
             FCGIWrapper /var/www/php-fcgi-scripts/web1/.php-fcgi-starter .php
             FCGIWrapper /var/www/php-fcgi-scripts/web1/.php-fcgi-starter .php3
             FCGIWrapper /var/www/php-fcgi-scripts/web1/.php-fcgi-starter .php4
             FCGIWrapper /var/www/php-fcgi-scripts/web1/.php-fcgi-starter .php5
             Options +ExecCGI
             AllowOverride All
                     Order allow,deny
             Allow from all
                 </Directory>
    
    
         # add support for apache mpm_itk
         <IfModule mpm_itk_module>
           AssignUserId web1 client1
         </IfModule>
    
         <IfModule mod_dav_fs.c>
         # Do not execute PHP files in webdav directory
           <Directory /var/www/clients/client1/web1/webdav>
             <ifModule mod_security2.c>
               SecRuleRemoveById 960015
               SecRuleRemoveById 960032
             </ifModule>
             <FilesMatch "\.ph(p3?|tml)$">
               SetHandler None
             </FilesMatch>
           </Directory>
           DavLockDB /var/www/clients/client1/web1/tmp/DavLock
           # DO NOT REMOVE THE COMMENTS!
           # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
      # WEBDAV BEGIN
           # WEBDAV END
         </IfModule>
    
    <LocationMatch "/">
      SecRuleRemoveById 960015
    </LocationMatch>
    </VirtualHost>
    
     
  4. manarak

    manarak Member

    replacing the vhost files with one that was formatted to the older format fixes the problem and lets me login to phpmyadmin again.

    but I would like to still be able to use the sites->options Apache Directives in ISPConfig
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Then compare the files, find the difference and then check why this difference is causing a problem on your system.
     
  6. manarak

    manarak Member

    well... before upgrade it worked. I made a clean, by-the-book automated upgrade via the upgrade script.

    the apache error log does not show anything that I could relate to this malfunction.

    and here is the apache.conf file setting the global alias for phpmyadmin, it is properly included by apache because the alias works.

    Code:
    # phpMyAdmin default Apache configuration
    
    Alias /phpmyadmin /usr/share/phpmyadmin
    
    <Directory /usr/share/phpmyadmin>
       Options FollowSymLinks
       DirectoryIndex index.php
    
       <IfModule mod_php5.c>
         AddType application/x-httpd-php .php
    
         php_flag magic_quotes_gpc Off
         php_flag track_vars On
         php_flag register_globals Off
         php_admin_flag allow_url_fopen Off
         php_value include_path .
         php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
         php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/
       </IfModule>
    <IfModule mod_security2.c>
    SecRuleEngine Off
    </IfModule>
    
    </Directory>
    
    # Authorize for setup
    <Directory /usr/share/phpmyadmin/setup>
      <IfModule mod_authn_file.c>
      AuthType Basic
      AuthName "phpMyAdmin Setup"
      AuthUserFile /etc/phpmyadmin/htpasswd.setup
      </IfModule>
      Require valid-user
    </Directory>
    
    # Disallow web access to directories that don't need it
    <Directory /usr/share/phpmyadmin/libraries>
      Order Deny,Allow
      Deny from All
    </Directory>
    <Directory /usr/share/phpmyadmin/setup/lib>
      Order Deny,Allow
      Deny from All
    </Directory>
    
     
  7. manarak

    manarak Member

    thanks, but I would like to make the system work with the default settings used by ISPconfig.
    but I'm not knowledgable enough to figure out what settings / other files I need to change for the new settings inserted by ISPconfig panel to be compatible?
    as I said, it was a clean automated upgrade and my system isn't special, I had set it up using a "perfect server" how-to by Falko.
    I left everything in a standard configuration, so now I am stumped to be running into problems like this one.
     
  8. manarak

    manarak Member

    what I don't understand is what in the vhost file that ISPconfig panel writes is disabling/overriding the settings of phpmyadmin's conf file?
    I don't understand why PHP settings have to be cleared, nor am I able to check if the regex is correct.
    Why is the new file using +FollowSymlinks instead of FollowSymlinks, I don't understand the difference.
    The water is way too deep for me here.

    If someone has an idea, I'll be glad to hear it!
    Thank you in advance
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    There is no general issue with the config that ISPConfig creates, I upgraded many servers from Debian 6 to 7 without issues. Like I mentioned already, it's a system config issue on your server, this can be a missing package (compare your system with Debian 7 tutorial) or something similar.

    Did you run an ispconfig upgrade with reconfigure services = yes after you upgraded debian? This is required after any system upgrade to update your config files to the newly installed version.

    If you need help by remote Login, contact Florian from ISPConfig Business support: http://www.ispconfig.org/get-support/?type=ispconfig
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    That's correct off course, it works flawlessly in a few hundred thousand servers.
     
  11. manarak

    manarak Member

    yes, I did let ISPconfig reconfigure services.

    this is the how-to I followed to upgrade, do you see anything strange in there?
    i followed it and it went smooth, no errors.
    Code:
    Check that your /etc/apt/sources.list looks fairly standard. Mine looks like this:
    deb http://ftp.no.debian.org/debian/ squeeze main contrib non-free
    deb-src http://ftp.no.debian.org/debian/ squeeze main contrib non-free
    deb http://security.debian.org/ squeeze/updates main contrib non-free
    deb-src http://security.debian.org/ squeeze/updates main contrib non-free
    #squeeze-updates, previously known as ‘volatile’
    deb http://ftp.no.debian.org/debian/ squeeze-updates main contrib non-free
    deb-src http://ftp.no.debian.org/debian/ squeeze-updates main contrib non-free
    
    Next, run current upgrade to make sure squeeze is completely up-to-date:
    apt-get update
    apt-get upgrade
    apt-get dist-upgrade
    
    Now we will check that no packages are on hold. These needs to return nothing:
    dpkg -–audit
    dpkg -–get-selections | grep hold
    
    Last run aptitude to check if any packages are awaiting to be installed or removed:
    aptitude
    
    Press g to view the list and to go ahead and fix these. List should be clean for no packages to be installed, removed or upgraded.
    If any packages are shown, go in the menu “actions” and select the first item “install/remove packages”
    Press Q to quit
    
    Now, edit your /etc/apt/sources.list and make updates for wheezy repositories. Mine looks like this:
    deb http://ftp.no.debian.org/debian wheezy main contrib non-free
    deb-src http://ftp.no.debian.org/debian wheezy main contrib non-free
    deb http://ftp.no.debian.org/debian wheezy-updates main contrib non-free
    deb http://security.debian.org/ wheezy/updates main contrib non-free
    
    Run the commands for upgrading your system with wheezy packages:
    
    apt-get update
    (System complains about missing public keys)
    apt-get upgrade
    (system will show some text walls, press Q to quit)
    (keep the installed crontab)
    (install package maintainers version of rkhunter config)
    (keep my awstats config version)
    (keep my suphp config)
    (take package’s version of phpmyadmin apache.conf)
    apt-get dist-upgrade
    (install package’s version of Rcs)
    (install package’s version of my.cnf)
    (don’t change mysql password)
    …
    
    I chose default answer for all questions. When everything is done do a reboot.
    The wheezy upgrade is now complete.
    
    Part two.
    Log back in to your server and make sure we are root:
    su -
    We need to make sure that apache got all the wheezy packages ISPConfig needs:
    apt-get install apache2 apache2.2-common apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert libapache2-mod-php5 php5 php5-common php5-gd php5-mysql php5-imap phpmyadmin php5-cli php5-cgi libapache2-mod-fcgid apache2-suexec php-pear php-auth php5-mcrypt mcrypt php5-imagick imagemagick libapache2-mod-suphp libruby libapache2-mod-ruby libapache2-mod-python php5-curl php5-intl php5-memcache php5-memcached php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl memcached
    
    After, do a autoremove to clean up:
    apt-get autoremove
    
    Go to /tmp dir, download ISPConfig archive, extract and run update.php to make sure ISPConfig is properly setup for wheezy. 
    
    Default answer for all questions. Most important part is to let it reconfigure services:
    cd /tmp
    wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz
    tar xvfz ISPConfig-3-stable.tar.gz
    cd ispconfig3_install/install/
    php –q update.php
    ISPConfig should now be properly setup. Do a final reboot.
    
    FIXES
    
    /etc/phpmyadmin/apache.conf
    
    add
    <IfModule mod_security2.c>
    SecRuleEngine Off
    </IfModule>
    
    navigating to /usr/lib
    ln -s /usr/lib/x86_64-linux-gnu/libxml2.so.2 libxml2.so.2
    
    apt-get purge php5-suhosin
    
    find /etc/php5/ -name “*.ini” -exec sed -i -re ‘s/^(\s)#(.)/\1;\2/g’ {} \;
    
    in /etc/default/saslauthd
    OPTIONS="-n 0 -c -m /var/spool/postfix/var/run/saslauthd -r"
    
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    manarak likes this.
  13. manarak

    manarak Member

    Thank you Till!
    problem solved, this bit did it:
     
  14. manarak

    manarak Member

  15. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, that would be nice.
     
  16. manarak

    manarak Member

    ah, after I formatted the How-To, I found out that I need a contributor account and it asks me to provide a link, but I don't want to provide one :)
    so here is part one of my formatted contribution (because more than 10.000 characters long):
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>Upgrading from Debian 6 Squeeze with ISPconfig and courier/postfix to Debian 7 Wheezy</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <style type="text/css">
    <!--
    .command {
      padding: 1em;
      border: 1px dashed #2f6fab;
      color: black;
      background-color: #f9f9f9;
      line-height: 1.1em;
      font-family: Courier New, Courier, mono;
      font-size: 12px;
      font-style: italic;
    }
    
    .system {
      color: black;
      font-family: Courier New, Courier, mono;
      font-size: 12px;
      font-style: italic;
    }
    
    .highlight {
      color: #FF0000;
       font-family: Georgia, "Times New Roman", Times, serif;
       font-size: 12px;
       text-decoration: underline;
    }
    -->
    </style>
    </head>
    <body>
    <h1>Upgrading from Debian 6 Squeeze with ISPconfig and courier/postfix to Debian 7 Wheezy</h1>
    <p>This How-To is compiled from the following two sources and complemented with additional fixes.</p>
    <p>Falko: <a href="https://www.howtoforge.com/how-to-upgrade-debian-squeeze-to-wheezy">How to upgrade Debian Squeeze to Wheezy</a></p>
    <p>Jeppe: <a href="http://techjottings.com/upgrading-debian-6-squeeze-to-debian-7-wheezy-with-ispconfig">Upgrading Debian 6 Squeeze to Debian 7 Wheezy with ISPConfig</a></p>
    <p>Also thank you Till for helping me with the suphp.conf problem.</p>
    <p>This How-To supposes that your server runs:
    <ul><li>Debian 6 with Courier/Postfix</li>
    <li>ISPconfig</li></ul>at least, that's what mine ran</p>
    <h2>Part One: upgrade debian</h2>
    <p>Check that your <span class="system">/etc/apt/sources.list</span> looks fairly standard. Mine looks like this:</p>
    <pre>deb http://ftp.no.debian.org/debian/ squeeze main contrib non-free
    deb-src http://ftp.no.debian.org/debian/ squeeze main contrib non-free
    deb http://security.debian.org/ squeeze/updates main contrib non-free
    deb-src http://security.debian.org/ squeeze/updates main contrib non-free
    #squeeze-updates, previously known as ‘volatile’
    deb http://ftp.no.debian.org/debian/ squeeze-updates main contrib non-free
    deb-src http://ftp.no.debian.org/debian/ squeeze-updates main contrib non-free
    </pre>
    <p>Next, run current upgrade to make sure squeeze is completely up-to-date:</p>
    <p class="command">apt-get update</p>
    <p class="command">apt-get upgrade</p>
    <p class="command">apt-get dist-upgrade</p>
    <p>Now we will check that no packages are on hold. These needs to return nothing:</p>
    <p class="command">dpkg -–audit</p>
    <p class="command">dpkg -–get-selections | grep hold</p>
    <p>Last run aptitude to check if any packages are awaiting to be installed or removed:</p>
    <p class="command">aptitude</p>
    <p>Press g to view the list and to go ahead and fix these. List should be clean for no packages to be installed, removed or upgraded.
    If any packages are shown, go in the menu “actions” and select the first item “install/remove packages”.
    Press Q to quit</p>
    Now, edit your <span class="system">/etc/apt/sources.list</span> and make updates for wheezy repositories. Mine looks like this:
    <pre>deb http://ftp.no.debian.org/debian wheezy main contrib non-free
    deb-src http://ftp.no.debian.org/debian wheezy main contrib non-free
    deb http://ftp.no.debian.org/debian wheezy-updates main contrib non-free
    deb http://security.debian.org/ wheezy/updates main contrib non-free
    </pre>
    <p>Run the commands for upgrading your system with wheezy packages:</p>
    <p class="command">apt-get update</p>
    <p>(System complains about missing public keys... no problem)</p>
    <p class="command">apt-get upgrade</p>
    <p>(system will show some text walls, press Q to quit)</p>
    <p>(keep the installed crontab)</p>
    <p>(install package maintainers version of rkhunter config)</p>
    <p>(keep my awstats config version)</p>
    <p>(keep my suphp config)</p>
    <p>(take package’s version of phpmyadmin apache.conf)</p>
    <p class="command">apt-get dist-upgrade</p>
    <p>(install package’s version of Rcs)</p>
    <p>(install package’s version of my.cnf)</p>
    <p>(don’t change mysql password)</p>
    <p>...etc... I think these were all the important choices</p>
    <p>I chose default answer for all other questions.</p>
    <p>When everything is done do a</p> <p class="command">reboot.</p>
    <p class="highlight">The wheezy upgrade is now complete.</p>
    <h2>Part two: upgrade ISPconfig</h2>
    <p>Log back in to your server and make sure we are root:</p>
    <p class="command">su -</p>
    <p>We need to make sure that apache got all the wheezy packages ISPConfig needs:<p>
    <p class="command">apt-get install apache2 apache2.2-common apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert libapache2-mod-php5 php5 php5-common php5-gd php5-mysql php5-imap phpmyadmin php5-cli php5-cgi libapache2-mod-fcgid apache2-suexec php-pear php-auth php5-mcrypt mcrypt php5-imagick imagemagick libapache2-mod-suphp libruby libapache2-mod-ruby libapache2-mod-python php5-curl php5-intl php5-memcache php5-memcached php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl memcached</p>
    <p>After, do a autoremove to clean up:</p>
    <p class="command">apt-get autoremove</p>
    <p>Go to <span class="system">/tmp</span> dir, download ISPConfig archive, extract and run update.php to make sure ISPConfig is properly setup for wheezy. Default answer for all questions. Most important part is to let it reconfigure services:</p>
    <p class="command">cd /tmp</p>
    <p class="command">wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz</p>
    <p class="command">tar xvfz ISPConfig-3-stable.tar.gz</p>
    <p class="command">cd ispconfig3_install/install/</p>
    <p class="command">php –q update.php</p>
    <p class="highlight">ISPConfig should now be properly setup. Do a </p> <p class="command">reboot.</p>
    
     
  17. manarak

    manarak Member

    now part 2, ah:
    Code:
    <h2>Part Three: Fixes</h2>
    <h3>mod_security</h3>
    <p>If you run mod_security (you really should), you will need this for phpmyadmin to work:</p>
    <p>in <span class="system">/etc/phpmyadmin/apache.conf</span>
    add</p>
    <pre>
    &lt;IfModule mod_security2.c&gt;
       SecRuleEngine Off
    &lt;/IfModule&gt;
    </pre>
    <h3>Error: syntax error, proxy_html.load failed, configtest failed...</h3>
    <p>After installing and enabling proxy_html (libapache2-mod-proxy-html) on a fresh 12.04 server install, we get the following error:</p>
    <pre>
    apache2: Syntax error on line 210 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/proxy_html.load: Cannot load /usr/lib/libxml2.so.2 into server: /usr/lib/libxml2.so.2: cannot open shared object file: No such file or directory
    Action 'configtest' failed.
    The Apache error log may have more information.
    </pre>
    <p> explanation: libxml2 is installed, but as on amd64 architecture, the libxml2 file is in :
    <span class="system">/usr/lib/x86_64-linux-gnu/libxml2.so.2</span></p>
    <p>The solution consists of changing in <span class="system">/etc/apache2/mods-available/proxy_html.load</span>
    <pre>LoadFile /usr/lib/libxml2.so.2</pre>
    <p>into :</p>
    <pre>LoadFile /usr/lib/x86_64-linux-gnu/libxml2.so.2</pre>
    <p>OR (more simple in my opinion and probably more upgrade-resistant):</p>
    <p>navigate to <span class="system">/usr/lib</span> and execute<p>
    <p class="command">ln -s /usr/lib/x86_64-linux-gnu/libxml2.so.2 libxml2.so.2</p>
    <p>source: https://bugs.launchpad.net/ubuntu/+source/mod-proxy-html/+bug/964397</p>
    <h3>Error: dpkg: warnings when running commands with sudo:</h3>
    <pre>
    dpkg: warning: ‘ldconfig’ not found in PATH or not executable
    dpkg: warning: ‘start-stop-daemon’ not found in PATH or not executable
    dpkg: error: 2 expected programs not found in PATH or not executable
    Note: root’s PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin
    E: Sub-process /usr/bin/dpkg returned an error code (2)
    </pre>
    <p>Edit <span class="system">/etc/sudoers</span> as root and insert this line after Defaults env_reset:</p>
    <pre>Defaults secure_path=“/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin”</pre>
    <p>Source: http://blog.coffeebeans.at/?p=380</p>
    <h3>Error: PHP warnings when starting Apache</h3>
    <p>When trying to start apache this came up:</p>
    <pre>PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php5/20100525/suhosin.so’ - /usr/lib/php5/20100525/suhosin.so: cannot open shared object file: No such file or directory in Unknown on line 0</pre>
    <p>The solution is to remove suhosin package.</p>
    <p class="command">apt-get purge php5-suhosin</p>
    <p>Source: http://blog.tordeu.com/?p=417</p>
    <h3>Error: deprecated comment marks cause logs to swell</h3>
    <p>ISPConfig Cron log showed this at every cron run, every minute:</p>
    <pre>PHP Deprecated: Comments starting with ‘#’ are deprecated in /etc/php5/cli/conf.d/ming.ini on line 1 in Unknown on line 0</pre>
    <p>Solution: Run this command to find comments in all .ini files and replace # with ;</p>
    <p class="command">find /etc/php5/cli/conf.d/ -name “*.ini” -exec sed -i -re ‘s/^(\s)#(.)/\1;\2/g’ {} \;</p>
    <p>or</p>
    <p class="command">find /etc/php5/ -name “*.ini” -exec sed -i -re ‘s/^(\s)#(.)/\1;\2/g’ {} \;</p>
    <p>Source: http://stackoverflow.com/questions/14074101/getting-comments-starting-with-are-deprecated-message-via-cli</p>
    <h3>Error: Saslauthd will periodically fail and users can't login to the mailbox or send mail.</h3>
    <p>I have no idea if the following fix actually fixes anything, the issue seems complex and seems to involve a bug</p>
    <p>This is what I tried to solve the problem, saslauthd now still fails, but much much less often.</p>
    <p>If you want to try: in <span class="system">/etc/default/saslauthd</span> modify the options to look like this:</p>
    <pre>OPTIONS="-n 0 -c -m /var/spool/postfix/var/run/saslauthd -r"</pre>
    <p>sources and discussions around this problem:</p>
    <ul><li>https://www.howtoforge.com/community/threads/saslauthd-stops-working-every-few-weeks.66123/</li>
    <li>https://github.com/webmin/webmin/issues/58</li>
    <li>https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=758660</li></ul>
    <h3>Error: after upgrade, phpmyadmin doesn't want to log you in, but offers to download the index.php file instead</h3>
    <p>in <span class="system">/etc/apache2/mods-available/suphp.conf</span> comment out the <p>
    <pre>
    &lt;FilesMatch "\.ph(p3?|tml)$"&gt;
    </pre>section and add the line
    <pre>AddType application/x-httpd-suphp .php .php3 .php4 .php5 .phtml</pre>
    <p>otherwise all PHP files will be run by SuPHP.<p>
    <p>(Thank you Till)</p>
    <h3>Error: log files show SASL authentication error</h3>
    <p>After the upgrade this can show up in the logs:</p>
    <pre>...  SASL PLAIN authentication failed: no mechanism available</pre>
    <p>solution: edit <span class="system">/etc/postfix/sasl/smtpd.conf</span> and replace</p>
    <pre>auxprop_plugin: mysql</pre><p>with</p>
    <pre>
    auxprop_plugin: sql
    sql_engine: mysql
    </pre>
    <p>and</p> <pre>%u</pre> has to be replaced with <pre>%u@%r</pre>
    <p>source: thank you anonymous user</p>
    </body>
    </html>
    
     
  18. till

    till Super Moderator Staff Member ISPConfig Developer

  19. manarak

    manarak Member

    Great, thank you Till!
     

Share This Page