lampdeveloper :: Jamie Scott’s Blog


Installing PHP 5.2.5, Suhosin, PHP-Eaccelerator on Centos 4 with YUM

Posted in Linux, PHP by Jamie on the November 17th, 2007

I’ve created a repo containing the new PHP 5.2.5 rpms and other extensions.

My yum repo currently only supports i386 architectures and centos / el4.

To upgrade to php 5.2.5 please run:

wget http://www.smudge-it.co.uk/pub/yum/RPM-GPG-KEY-smudge
rpm –import RPM-GPG-KEY-smudge

Add my repository by creating the file
vi /etc/yum.repos.d/smudge.repo

[smudgeit]
name=Smudge IT RPMS for Centos 4 - $basearch
baseurl=http://www.smudge-it.co.uk/pub/yum/centos/4/$basearch/
enabled=1
gpgcheck=1

Then run yum update php.

I have the following files in my repo:

pcre-6.6-1.1.i386.rpm php-gd-5.2.5-1.i386.rpm php-pdo-5.2.5-1.i386.rpm
pcre-devel-6.6-1.1.i386.rpm php-imap-5.2.5-1.i386.rpm php-pear-1.6.1-2.noarch.rpm
php-5.2.5-1.i386.rpm php-ldap-5.2.5-1.i386.rpm php-pgsql-5.2.5-1.i386.rpm
php-bcmath-5.2.5-1.i386.rpm php-mbstring-5.2.5-1.i386.rpm php-snmp-5.2.5-1.i386.rpm
php-cli-5.2.5-1.i386.rpm php-mcrypt-5.2.5-1.i386.rpm php-soap-5.2.5-1.i386.rpm
php-common-5.2.5-1.i386.rpm php-mhash-5.2.5-1.i386.rpm php-suhosin-0.9.20-1.i386.rpm
php-dba-5.2.5-1.i386.rpm php-mssql-5.2.5-1.i386.rpm php-tidy-5.2.5-1.i386.rpm
php-devel-5.2.5-1.i386.rpm php-mysql-5.2.5-1.i386.rpm php-xml-5.2.5-1.i386.rpm
php-eaccelerator-5.2.5_0.9.5.1-1.i386.rpm php-ncurses-5.2.5-1.i386.rpm php-xmlrpc-5.2.5-1.i386.rpm
php-embedded-5.2.5-1.i386.rpm php-odbc-5.2.5-1.i386.rpm

You can install other extensions such as:

yum install php-eaccelerator
yum install php-suhosin

Edit /etc/php.d/suhosin.ini to->

extension=suhosin.so
suhosin.session.encrypt = Off

Now you have a more secure php installation.

*** Updated sqlite2 packages. If you were having issues installing php-pdo then do

yum clean all

and then

yum install sqlite2

8 Responses to 'Installing PHP 5.2.5, Suhosin, PHP-Eaccelerator on Centos 4 with YUM'

Subscribe to comments with RSS or TrackBack to 'Installing PHP 5.2.5, Suhosin, PHP-Eaccelerator on Centos 4 with YUM'.

  1. jon said,

    on November 27th, 2007 at 5:18 am

    Missing Dependency: libsqlite.so.0 is needed by package php-pdo

  2. Jamie said,

    on November 27th, 2007 at 10:36 am

    This has been fixed.

    *** Added sqlite2 packages. If you were having issues installing php-pdo then do

    yum clean all

    and then

    yum install sqlite2

    yum install php-pdo

  3. jon said,

    on November 27th, 2007 at 4:38 pm

    worked like a charm!

    thanks greatly!

    j.

  4. Dan said,

    on December 6th, 2007 at 5:45 am

    Thanks for the awesome repos - unfortunately, I get a dependancy error:

    Error: Missing Dependency: libc-client.so.2006 is needed by package php-imap

    :(

  5. Jamie said,

    on December 6th, 2007 at 10:24 am

    Think you needed libc-client2006-2006g-2.el4.1.i386.rpm

    from

    ftp://mirror.switch.ch/mirror/epel/4/i386/

    I copied it to my repo. Just run yum install libc-client2006

    Thanks

  6. Kosta said,

    on December 6th, 2007 at 12:48 pm

    Any chance to make it compatible for CentOS 5?

  7. Jamie said,

    on December 6th, 2007 at 1:07 pm

    Maybe in the future. ATM I’m currently only supporting Centos 4

  8. Travis Phipps said,

    on April 29th, 2008 at 9:42 pm

    Thank you so much for this! Installed perfectly!

Leave a Reply