Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I just upgraded a CentOS 5.5 server (using Apache 2.2) to PHP53 (using the php53u set of packages).

All of a sudden, Apache doesn't appear to recognize .php files. It's just delivering the source.

Please help! I need to get this server back online as soon as possible.

share|improve this question
    
I believe CentOS 5.6 has native php53 packages. Why didn't you update to 5.6 and use those? –  HTTP500 May 16 '12 at 22:37
add comment

2 Answers

It looks like this exact issue was addressed on StackOverflow: Issues installing PHP 5.3 with apache on centos. In a nutshell:

yum install yum-priorities
yum remove php php-*
yum remove httpd 
yum install httpd 
yum install php53u-pear php53u php53u-cli php53u-common php53u-devel php53u-gd php53u-mbstring php53u-mcrypt php53u-mysql php53u-pdo php53u-soap php53u-xml php53u-xmlrpc php53u-bcmath php53u-pecl-apc php53u-pecl-memcache php53u-snmp
yum remove php53u-pecl-apc
yum update php53u-pecl-apc --enablerepo=ius-testing
service httpd restart 
share|improve this answer
    
I should have mentioned this in the post above - I found that post before I posted this one, followed the steps exactly, and still didn't have any luck. –  Glen Balliet May 16 '12 at 21:51
add comment

It seems that (at least on my installation of CentOS) an upgrade to php53 updates /etc/php.ini with:

short_open_tag = Off

so if your php scripts use the <? .. ?> syntax, you should change it back to:

short_open_tag = On

Worked for me :)

share|improve this answer
add comment

Your Answer

 
discard

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.