Installing PHP 5.2.5, Suhosin, PHP-Eaccelerator on Centos 4 with YUM
Posted on November 17th, 2007 in Linux, PHP | 14 Comments »
This is currently no longer supported as I’m now using Centos 5
You will find similar, but updated rpms here http://blog.famillecollet.com/
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
14 Responses
Missing Dependency: libsqlite.so.0 is needed by package php-pdo
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
worked like a charm!
thanks greatly!
j.
Thanks for the awesome repos – unfortunately, I get a dependancy error:
Error: Missing Dependency: libc-client.so.2006 is needed by package php-imap
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
Any chance to make it compatible for CentOS 5?
Maybe in the future. ATM I’m currently only supporting Centos 4
How do I know which flags you have enabled in PHP? What is your config line?
Looks like there is a problem with mysql.
I’ve done a yum update php and it fails with:
–> Running transaction check
–> Processing Dependency: libmysqlclient.so.15(libmysqlclient_15) for package: php-mysql
–> Processing Dependency: libmysqlclient.so.15 for package: php-mysql
–> Finished Dependency Resolution
Error: Missing Dependency: libmysqlclient.so.15(libmysqlclient_15) is needed by package php-mysql
Error: Missing Dependency: libmysqlclient.so.15 is needed by package php-mysql
Thank you so much for this! Installed perfectly!
Hi,
My frontend guys believe that suhosin (php module) that it it encrypts cookie values which basically breaks the underlying codes – have you guys encountered this kind of issue? Is there a better way to deal with and not just removing suhosin.
Asim
I’m using Centos 4.6 and the following PHP 4 packages are installed on my box:
php-mysql-4.3.11-2.8
php-snmp-4.3.11-2.8
php-4.3.11-2.8
php-pear-4.3.11-2.8
php-gd-4.3.11-2.8
php-mbstring-4.3.11-2.8
php-imap-4.3.11-2.8
I have add smudge’s repo and tried to upgrade, it fails with error:
Error: Missing Dependency: libmysqlclient.so.15(libmysqlclient_15) is needed by package php-mysql
Error: Missing Dependency: libmysqlclient.so.15 is needed by package php-mysql
hint/help needed. thank before
do you have php_dom? i want to install magento but need this extension, can help?
Add
suhosin.session.encrypt = Off
to the php config file to disable cookie encryption
Sorry just approved all the comments as I opened the blog agagin