Mysql – Why is the phpMyAdmin page not interpreted from raw PHP code

apache-2.2MySQL

I am quite new to website construction. I have been practicing with MySQL and phpMyAdmin before, but only on localhost. It went well. But when I actually bought myself a domain name and changed the document root of my Apache to some other directory (other than public_html and such), I found it's not working as I expected it to.

It happened when I was trying to manage my database from a remote client. I typed in the URL of mywebsite/phpmyadmin, it gave me a 404 error. I ran a little research and found this page and followed the instructions, added

Include /etc/phpmyadmin/apache.conf

to /etc/apache2/apache2.conf. It worked to an extent that I don't get the 404 error any more. But it went more peculiar in that my website started downloading the raw php code file that looks will be rendered as my phpMyAdmin page, but the page is not showing.

Anyone help?

Best Answer

/etc/apache2/apache2.conf indicates a debian-ish distribution. Did you install the libapache2-mod-php5 and php5-mysql packages? And did you run a2enmod php5?