Upgrading PHP on CentOS, yields PHP not parsing

I'm running CentOS5.5 and trying to upgrade PHP from 5.1.6 to 5.3. I tried the following commands:

yum remove php-common

yum install php53-common

service httpd restart

This seemed to work, but PHP would not parse instead only showed the source code. I ended up reverting back to v5.1.6.

Does anyone have any suggestions?

Thanks!

4 Replies

The Apache php module is in the php53 package. That's the one you need to install. It will then pull in php53-common as a dependency.

The php53 package available for centos 5 lacks extensive php module support.

Consider using Centos 6 if using php 5.3 is a must, or compiling php from source if you need to stick with centos 5 and don't mind maintaining php without a package manager.

I'm running my own php 5.3.x based on the Fedora src.rpm

It builds in mock but uses some dependencies from EPEL.

If you want my src.rpm let me know.

I use php as package name and put excludes in the the CentOS repos.

I also run updated pear, and exclude pear packages from yum, using the pear interface itself to install / manage them.

I prefer the php53u packages from IUS Community Repo to give php 5.3.x support to my CentOS 5/6 linodes.

some time ago i was using php from http://centos.alt.ru but the maintainer did rollback to 5.2 for compatibility :/ (but i use nginx from here)

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct