Upgrading from Debian 6 Squeeze with ISPConfig and courier/postfix to Debian 7 Wheezy

This How-To has been compiled by the Howtoforge User @manarak from the following two sources and complemented with additional fixes.

Also thank you Till for helping me with the suphp.conf problem.

This How-To supposes that your server runs:

  • Debian 6 with Courier/Postfix
  • ISPconfig

at least, that's what mine ran.

Part One: upgrade Debian

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:


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... no problem)

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)

...etc... I think these were all the important choices

I chose default answer for all other questions.

When everything is done do a


The wheezy upgrade is now complete.

Part two: upgrade ISPconfig

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


Part Three: Fixes


If you run mod_security (you really should), you will need this for phpmyadmin to work:

in /etc/phpmyadmin/apache.conf add

<IfModule mod_security2.c>
   SecRuleEngine Off

Error: syntax error, proxy_html.load failed, configtest failed...

After installing and enabling proxy_html (libapache2-mod-proxy-html) on a fresh 12.04 server install, we get the following error:

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.

explanation: libxml2 is installed, but as on amd64 architecture, the libxml2 file is in : /usr/lib/x86_64-linux-gnu/libxml2.so.2

The solution consists of changing in /etc/apache2/mods-available/proxy_html.load

LoadFile /usr/lib/libxml2.so.2

into :

LoadFile /usr/lib/x86_64-linux-gnu/libxml2.so.2

OR (more simple in my opinion and probably more upgrade-resistant):

navigate to /usr/lib and execute

ln -s /usr/lib/x86_64-linux-gnu/libxml2.so.2 libxml2.so.2

source: https://bugs.launchpad.net/ubuntu/+source/mod-proxy-html/+bug/964397

Error: dpkg: warnings when running commands with sudo:

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)

Edit /etc/sudoers as root and insert this line after Defaults env_reset:

Defaults secure_path=“/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin”

Source: http://blog.coffeebeans.at/?p=380

Error: PHP warnings when starting Apache

When trying to start apache this came up:

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

The solution is to remove suhosin package.

apt-get purge php5-suhosin

Source: http://blog.tordeu.com/?p=417

Error: deprecated comment marks cause logs to swell

ISPConfig Cron log showed this at every cron run, every minute:

PHP Deprecated: Comments starting with ‘#’ are deprecated in /etc/php5/cli/conf.d/ming.ini on line 1 in Unknown on line 0

Solution: Run this command to find comments in all .ini files and replace # with ;

find /etc/php5/cli/conf.d/ -name “*.ini” -exec sed -i -re ‘s/^(\s)#(.)/\1;\2/g’ {} \;


find /etc/php5/ -name “*.ini” -exec sed -i -re ‘s/^(\s)#(.)/\1;\2/g’ {} \;

Source: http://stackoverflow.com/questions/14074101/getting-comments-starting-with-are-deprecated-message-via-cli

Error: Saslauthd will periodically fail and users can't login to the mailbox or send mail.

I have no idea if the following fix actually fixes anything, the issue seems complex and seems to involve a bug

This is what I tried to solve the problem, saslauthd now still fails, but much much less often.

If you want to try: in /etc/default/saslauthd modify the options to look like this:

OPTIONS="-n 0 -c -m /var/spool/postfix/var/run/saslauthd -r"

sources and discussions around this problem:

  • https://www.howtoforge.com/community/threads/saslauthd-stops-working-every-few-weeks.66123/
  • https://github.com/webmin/webmin/issues/58
  • https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=758660

Error: after upgrade, phpmyadmin doesn't want to log you in, but offers to download the index.php file instead

in /etc/apache2/mods-available/suphp.conf comment out the

<FilesMatch "\.ph(p3?|tml)$">

section and add the line

AddType application/x-httpd-suphp .php .php3 .php4 .php5 .phtml

otherwise, all PHP files will be run by SuPHP.

(Thank you Till)

Error: log files show SASL authentication error

After the upgrade this can show up in the logs:

...  SASL PLAIN authentication failed: no mechanism available

solution: edit /etc/postfix/sasl/smtpd.conf and replace

auxprop_plugin: mysql


auxprop_plugin: sql
sql_engine: mysql



has to be replaced with


source: thank you anonymous user

Share this page:

5 Comment(s)

Add comment


From: Scotsgeek at: 2016-08-16 22:51:50

Excuse me but both Debian Squeeze and Debian Wheezy are both obsolete versions!  Why not directly from Debian Squeeze to Debian Jessie, the current stable version???  Please see the Debian release list.

From: till at: 2016-08-17 06:48:57

This tutorial is about upgrading Debian and there are still many Debian 6 installs out there and even if you would want to update from Debian 6 to 8, yu will always update to Debian 7 fisrt and then to 8. The above tutorial are the notes that an ISPConfig user has taken while updating his live server from Debian 6 to 7.

From: Scotsgeek at: 2016-08-17 13:18:33

"...and even if you would want to update from Debian 6 to 8, yu will always update to Debian 7 fisrt and then to 8."

That may be an approach for some, but not myself and many, if not most others.  Why do you say that you "MUST" upgrade from 6 to 7, then to 8???  Is there some technical reason that prevents 6 to 8 directly?

How To Upgrade Debian Squeeze To Wheezy   "The new Debian Wheezy has just been released."

This is an old outdated article.

Upgrading Debian 6 (“squeeze”) to Debian 7 (“wheezy”) with ISPConfig installed

Once again, this one was published on April 12, 2014, over two years ago.

You wrote your article on Aug 16, 2016, using outdated information.


From: till at: 2016-08-17 13:42:16

First of all, why do you say I wrote an article? This is not a tutorial that I have written, see author link. I just outlined why it is still useful to have it. Second: The article is not outdated, it is about an older but still used Debian version, not the recent one, and there was no other complete guide available on that topic. Updating older systems makes it necessary to write about older software. Or do you think that it helps a user with Debian 6 to publish an article that covers Debian 7 to 8 only? There are still plenty of Debian 6 systems out there, so writing an updated article with new information and troubleshooting tips from a migration that has been done a few days ago is always helpful and none of the two referenced older guides contained all steps and troubleshooting tips. Third: where did I say that you must do something? I said that you would want to update from 6 to 7 to 8 and not directly, I'm doing quite a few updates on Debian systems and the likeliness to crash a system by skipping a major version in a dist-upgrade is much more likely then updating step by step. You miss a guide to update Debian 7 to 8 with ISPConfig? Feel free to write one, the user who wrote this guide last week had updated his system from 6 to 7, that's why these versions are covered in his tutorial. Maybe he writes another guide to update it to Debian 8, who knows. If he writes that guide and wants to publish it here, then you will find it at howtoforge.

From: manarak at: 2016-08-19 05:07:38

I am the author of this How-To.I know debian 7 is outdated, yet I had a debian 6 server to upgrade, and as Till says, I would rather follow an upgrade path from one version to another, checking that everything runs smoothly on 7 rather than directly jump to 8 or 8.4, I think there is more risk involved in doing that.Also, upgrading one version at a time, I am more likely to be in the same position as thousands of other people on the internet who ran into the same kind of problems when upgrading, rather than "uuhhh... upgraded from 6 to 8.4 and I got this list of 3196 errors to fix, unsure where to start..."

I'm not trying to show off publishing stuff - I didn't include my twitter account of facebook or anything. And honestly I'm not very skilled at debian stuff. I just had this need to upgrade and ran into problems following existing tutorials, so I wrote my own notes. It's for me to re-use on a couple more upgrades I have to perform, but since I often rely on tutorials written by others, I wanted to give back something into the internet and help others in the same situation as me.

And finally... if you have no Debian 6 servers anymore, why bother reading this at all? You are clearly not in the target audience, Scotsgeek.