Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to install phpmyadmin on my webserver, using this guide:

I did that once, and it worked like a dream, but I hated the looks of phpmyadmin (maybe the oldest layout ever) and decided to delete it, and didn't know that deleting is done with apt-get remove phpmyadmin and did in phpmyadmin directory rm * and thought that it's done. However, as I can't find the debian build of phpmyadmin anywhere, I want to install it again, but when I add Include /etc/phpmyadmin/apache.conf to /etc/apache2/apache2.conf, and restart apache, it give's me this error:

apache2: Syntax error on line 73 of /etc/apache2/apache2.conf: Could not open configuration file /etc/phpmyadmin/apache.conf: No such file or directory
Action 'configtest' failed.
The Apache error log may have more information.

No matter how I try, I always get this error, and phpmyadmin isn't there.

share|improve this question
up vote 0 down vote accepted

First of all, just be defining "include /etc/..." in /etc/apache2/apache2.conf does not make the file magically appear in said destination.

But now, let's fix things.

You can reinstall phpmyadmin by executing "aptitude reinstall phpmyadmin" in the shell.

Debian's version of phpmyadmin can be downloaded from here:

You can search for Debian packages in here:

share|improve this answer
did that, restarting but it still gave me the same error. – user145429 Nov 14 '12 at 8:26
Please execute this in the shell and paste the resulting line: sed -n "73 p" /etc/apache2/apache2.conf – John Wilcox Nov 14 '12 at 10:43
And also the result of this: ls /etc/phpmyadmin/ – John Wilcox Nov 14 '12 at 10:48
first one says that not found. – user145429 Nov 14 '12 at 11:38
and ls config-db.php – user145429 Nov 14 '12 at 11:40

Removing configuration files is considered to be a configuration change, and Debian packages are required to preserve configuration changes. So reinstalling a removed package will not cause removed configuration files to be restored. You need to purge the package rather than just remove. This will tell the packaging system that you no longer want even the configuration files for the package. Once that is done you can install the package again and the configuration files will be reinstalled as well.

share|improve this answer
so what do I enter to command line? – user145429 Nov 14 '12 at 8:30
apt-get purge phpmyadmin; apt-get install phpmyadmin – qqx Nov 14 '12 at 8:39
nope, still produces the same error. – user145429 Nov 14 '12 at 8:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.