Archive for the ‘PHP’ Category

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

Posted on November 17th, 2007 in Linux, PHP | 15 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

Share/Save/Bookmark

Get Google Page Rank using PHP

Posted on November 14th, 2007 in PHP | 9 Comments »

Here is a nice little script to get a google page rank using php. This should work on 32 and 64 bit machines.

You basically pretend to be the Google Tool bar and read the data sent back from google.

PHP Google Page Rank Script


Share/Save/Bookmark