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

1
  • is php working as it should be otherwise in that foobar.com domain? Commented Feb 28, 2011 at 8:19

1 Answer 1

1

Lobe, it sounds like you need the line:

AddType application/x-httpd-php .php

added to your apache configuration.

1
  • 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). Commented Feb 28, 2011 at 18:57

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.