Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Okay maybe this question has been asked before, I couldn't find the solution I searched both StackOverflow and Serverfault.

Fist of all I'm running CentOS release 5.5 (Final)

I had by default PHP 5.1.6 and HTTPD (Apache/2.2.3)

Now I had to upgrade PHP 5.1.6 to PHP 5.3 to enable zip support.

I ran a few yum commands such as.

yum remove php php-*

Then I ran

yum install php53 php53-cli php53-devel php53-gd php53-mbstring php53-mysql php53-pdo php53-xml php53-xmlrpc php-pear

After the installation was a success.

I ran service httpd restart

service httpd reload

And now when I go to it downloads the PHP page as plain-text. Now if I go to it parses the page properly.

Can someone tell me whats wrong?

Man I screwed up big time.

My httpd.conf file is below how it was when PHP 5.1.6 was and it worked properly with that PHP 5.1.6.

share|improve this question
up vote 0 down vote accepted

Make sure that /etc/httpd/conf.d/php.conf is still present and being included. It's provided by the both the php and php53 packages, so it should be present. You may have a php.conf.rpmsave in that directory that you can move into place as well.

share|improve this answer
Yes I have in /etc/httpd/conf.d/ php.conf file, what must I do to fix this? thanks, how do I include it? Btw as you know.. it actually parses PHP.. when you put without www just it downloads the PHP file.. – user51902 Dec 28 '11 at 6:35
Ah, I missed that, sorry. I can't immediately think of what would cause a problem there, then. Do you have separate VirtualHosts for those domains? (Can you supply the output of httpd -S?) – Josh Y. Dec 28 '11 at 6:45
VirtualHost configuration: (/etc/httpd/conf/httpd.conf:1001) Syntax OK, And Yes I do have 2 VirtualHosts for 2 websites. look at (very bottom). I own X.X.X.37 and X.X.X.38 both ran by same httpd apache. – user51902 Dec 28 '11 at 6:46
BTW.. I just cleared my cache and history from Google Chrome.. and when I visit now.. and and and it actually visits the site in all cases parsing the PHP properly.. BUT before the google cache was cleared.. everytime I would go.. it would download the PHP source codes. Even if it was just a cache problem.. Seems I have a security problem now.. It always downloaded the source code before I cleared the cache, unless it just downloaded from the cache.. but i will never be sure now.. :( – user51902 Dec 28 '11 at 6:51
Last thing I can think of: you have a couple AddTypes on lines 769 and 770 that are probably messing with the AddType included from conf.d/php.conf Try commenting them out. – Josh Y. Dec 28 '11 at 6:53

Are you using EPEL? If not you may want to start over and try again (remove php53-*).

Is all your relevant data on this system portable? If so you may just want to backup and fresh install RHEL 6.1 variant like Scientific Linux

share|improve this answer
Sorry this is a VPS and I have way to much data all over the places.. which would mean be even harder to find what I even need to backup in the first place. I have many other random java servers running in the background. – user51902 Dec 28 '11 at 7:00

Your Answer


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.