1828038 Members
1957 Online
109973 Solutions
New Discussion

Patching PHP

 
SOLVED
Go to solution
Jeff Ohlhausen
Frequent Advisor

Patching PHP

Hello,
I'm on the current version of Php on one of my suse linux boxes:
# rpm -qa | grep php
mod_php4-core-4.2.2-124
mod_php4-servlet-4.2.2-124
mod_php4-4.2.2-124
mod_php4-devel-4.2.2-124

I realize I need to update the version level to a later version. Does anyone have advice on the best way to do this?
We're running Suse 8.1.

Thanks!
Jeff
Do or do not - there is no try.
4 REPLIES 4
Steven E. Protter
Exalted Contributor

Re: Patching PHP

I didn't realize Suse used rpm.

Get all the rpm's and save them in say /tmp/phpupdate.

cd

Then execute this script code.

installline=" "
echo "install line $installline"
for i in *.rpm
do
installline="$installline $i"
# echo "install line ... $installline $i"
done
commandline="rpm -Fvh $installline"
echo $commandline
$commandline


It will update all the pakages involved or tell you which dependencies are missing.

Alternatively, try yum.

yum update *php*
After setting up yum of course.

SEP

Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Stuart Browne
Honored Contributor
Solution

Re: Patching PHP

Whilst SuSE uses RPM's, they aren't (unforunately) the same as RH's RPM's.

As for updating the PHP version on an 8.1 box, well that's a little tricky. SuSE don't offer support for 8.1 any more (only 8.2 onwards), so you either have to find 3rd party RPMS (unfortuantely a quick search couldn't find any 3rd party legacy repositories).

Probably the best suggestion would be for you to grab a more recent distribution's PHP4 source RPM and recompile it for your platform, i.e. ftp://ftp.suse.com/pub/suse/i386/update/8.2/rpm/src/mod_php4-4.3.1-178.src.rpm (or from a mirror).

Then use 'rpmbuild --rebuild mod_php4-4.3.1-178.src.rpm' to make new RPM's.
One long-haired git at your service...
Gopi Sekar
Honored Contributor

Re: Patching PHP


try using yast2 and download the latest updates for php from official suse website. but as stuart mentions if SuSE has dropped support for SUSE 8.1 then you may have to do what stuart has mentioned.

or

download latest php from http://www.php.net remove existing rpm's (keep a safe copy of rpm to rollback anytime). compile the downloaded php to suite your need and use that. in that way you dont have to depend on SUSE any more for any updates. after all you are in open source world

Regards,
Gopi
Never Never Never Giveup
Jeff Ohlhausen
Frequent Advisor

Re: Patching PHP

Thanks everyone.
Do or do not - there is no try.