0

I've just installed phpMyAdmin at /usr/share/phpMyAdmin on a CentOS 5 machine running webmin / virtualmin. I have also added an alias to the apache config, being the following line:

Alias /phpMyAdmin /usr/share/phpMyAdmin

So that when I visit www.foobar.com/phpMyAdmin it serves phpMyAdmin. The problem is that the php is not being parsed, and is instead being spat out with the html which greatly diminishes the usefullness of what I have done. How can I set up apache or php or whatever to parse phpMyAdmin correctly.

When googling this I wasn't able to get an understandable answer, however the most common related question was whether I am running mod_php or as CGI. php is running via CGI

Thanks

isomorphismes
  • 139
  • 2
  • 11
Lobe
  • 103
  • 1
  • 1
  • 6

1 Answers1

1

Lobe, it sounds like you need the line:

AddType application/x-httpd-php .php

added to your apache configuration.

AliGibbs
  • 2,303
  • 20
  • 34
  • This breaks mod_fcgid/suexec in VirtualHost sections. It's better to do this specifically for the directory you want this to work on; or to do it for specific VirtualHosts where you want phpmyadmin to run from the server-wide installation. A safer option may be to install phpmyadmin inside a virtual host, rather than using the apt-provided package, so that it can run under suexec and as a normal user (the Debian/Ubuntu package runs as the Apache user). – swelljoe Feb 28 '11 at 18:57