phpmyadmin url downloads file instead of opening login page

I have phpmyadmin installed on webmin/virtualmin using centos 6.3. When I go to the url ie. it just downloads a blank file all the time. I’ve tried it in different browsers on my windows 7 PC . I’ve restarted apache on my centos server. I’m sure it’s some sort of php or apache issue with the server but if you could help me trouble shoot it that would be awesome!


We often see that occur when using phpMyAdmin installed via a .rpm, rather than using Virtualmin’s Install Script.

If that’s the case – my recommendation would be to remove the distro installed version, and instead to install phpMyAdmin via Virtualmin.

Alternatively, you could change the PHP Execution Mode of your domain to mod_php, as that would solve the problem too.

In order to do that, go into Server Configuration -> Website Options, and in there you can change the PHP Execution Mode.


I currently have it set to FCGId (run as virtual server owner). Is there any advantage or disadvantage to going to mod_php? I have a hard time understanding all these different php execution modes.

My recommendation is to continue using FCGID, or CGI, which both run as the Virtual Server owner. That’s more secure.

However, that’s not compatible with using phpMyAdmin from your distro, which requires usage of mod_php.

Using mod_php is less secure – that’s typically only desirable when all users on the server are trusted.

To use the more secure FCGID/CGI, along with phpMyAdmin – what you’d need to do is remove the phpMyAdmin .rpm, and then install phpMyAdmin using the Virtualmin Install Script.

OTOH, if all users on your server are trusted, a quick and simple fix to the issue you’re seeing would be to switch to mod_php.


I am just having the same problem and I thought that this was the solution … Just to summarize, I have 3 VPS, all very similar.

On all I am running PHP as FCGID. On the first 2 (Debian Squeeze) , I can access phpmyadmin with https://nameofserver.tld/php-my-admin/ and from there, accessing databases authorized by the credentials provided. It’s like a central install of phpmyadmin, I don’t install it on each virtual host.

On the third one (Debian Wheezy), using that same url just opens a dialog asking me if I want to download …

I tried the above solution that does work, switching my 3rd server to mod_php solves the problem. However, I don’t understand why I don’t have to do this on the 2 first servers … ?? So I try to understand because I would very much like to keep the 3rd one fcgid !! The only difference I see is Squeeze vs Wheezy … could that be the reason ?

Thks for your ideas !



Unisnstall and verify uninstall

dpkg-query -W -f=’${Status} ${Version}\n’ phpmyadmin

deinstall ok config-files 4:4.2.12-2

root@masterpos:~/cron# locate phpmyadmin

Install on domain, over public_html/phpmyadmin
ALl setting by default.
Domain work with FCGId

Try acceso to domain/phpmyadmin…

Not work.
Browser show download file.

That can happen if a config file is left over from a previous phpMyAdmin installation.

What is the output of this command:

ls /etc/apache2/conf.d/