Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

http://www.howtoforge.com/ubuntu_debian_lamp_server

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.
 failed!

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

share|improve this question

2 Answers 2

up vote 1 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: http://packages.debian.org/squeeze/all/phpmyadmin/download

You can search for Debian packages in here: http://www.debian.org/distrib/packages

share|improve this answer
    
did that, restarting but it still gave me the same error. –  Christian 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. –  Christian Nov 14 '12 at 11:38
    
and ls config-db.php –  Christian 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? –  Christian 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. –  Christian Nov 14 '12 at 8:47

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.