PHP 5.2

If you are new to YDL and have some more or less basic questions.

PHP 5.2

Postby mmajidi » 04 Jun 2010, 18:30

I need to update PHP on YDL running on IBM Power PC. Currently I have installed PHP 5.1 and I need to upgrade it to PHP 5.2. Can someone respond to this posting on how to update PHP on YDL using Yum.

I tried Yum update PHP but that just updates PHP 5.1. I need to update from 5.1 to 5.2 and I am not sure how is that possible.

Thank you,
Mehran
mmajidi
ydl newbie
ydl newbie
 
Posts: 15
Joined: 04 Jun 2010, 14:42

Re: PHP 5.2

Postby billb » 04 Jun 2010, 21:24

I know the IUS Community Project offers PHP 5.2 & 5.3 updates for Red Hat Enterprise Linux / Centos (on which YDL 6.2 is based) but unfortunately their builds are only for i386 or x86_64 and not PowerPC.

It might be possible to use their source RPMs to rebuild packages for PPC without too much trouble, though. Then you'd have RPM packages for PHP which could easily be installed/uninstalled via yum. I was able to rebuild packages for Python 3.1 using that method a while back.

So, you can't use their repos here:
http://iuscommunity.org/packages/

But you may be able to use the RHEL/Centos5 Source RPMs here:
http://dl.iuscommunity.org/pub/ius/stab ... /repoview/

For example, you'd download this srpm:

http://dl.iuscommunity.org/pub/ius/stab ... php52.html

Then, with your system set up to build RPMs, build new RPMs from the SRPM like this:

setarch ppc rpmbuild -ba --ppc php52-5.2.13-3.ius.el5.src.rpm

If that sounds like something you want to attempt I can try to help. :)
PS3 60GB [CECHA01], FW 3.15, YDL 6.2, Samsung T260HD @ 1920x1200
Powermac G4 1.25 GHz x2, 2 GB RAM, YDL 6.2
User avatar
billb
Site Admin
Site Admin
 
Posts: 5522
Joined: 24 May 2007, 20:30
Location: Eastern NC, USA

Re: PHP 5.2

Postby mmajidi » 05 Jun 2010, 20:47

I thank you for the reply. I am going to try your suggestion. Here is what I did so far:

a) I downloaded the php52-5.2.13-3.ius.e15.src [11.2 MB] Changelog by BJ Dierkes from the following link:
http://dl.iuscommunity.org/pub/ius/stab ... php52.html

I am using the command that you mentioned to see what happens.

After that I do not know what to do.

I really appreciate for any help.
Thank you,
Mehran
mmajidi
ydl newbie
ydl newbie
 
Posts: 15
Joined: 04 Jun 2010, 14:42

Re: PHP 5.2

Postby mmajidi » 05 Jun 2010, 21:04

I execute the following command and got and error:

setarch ppc rpmbuild -ba --ppc php52-5.2.13-3.ius.el5.src.rpm
Building target platforms: ppc
Building for target ppc
error: File /root/php/php52-5.2.13-3.ius.el5.src.rpm does not appear to be a specfile.


I then issued the following command and got more errors:

setarch ppc rpmbuild --rebuild php52-5.2.13-3.ius.el5.src.rpm
Installing php52-5.2.13-3.ius.el5.src.rpm
warning: InstallSourcePackage: Header V3 DSA signature: NOKEY, key ID 9cd4953f
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
cat: /usr/include/httpd/.mmn: No such file or directory
error: Failed build dependencies:
aspell-devel >= 0.50.0 is needed by php52-5.2.13-3.ius.ppc64
httpd-devel >= 2.0.46-1 is needed by php52-5.2.13-3.ius.ppc64
apr-devel is needed by php52-5.2.13-3.ius.ppc64
apr-util-devel is needed by php52-5.2.13-3.ius.ppc64
libc-client-devel is needed by php52-5.2.13-3.ius.ppc64
mysql-devel >= 5.0.48 is needed by php52-5.2.13-3.ius.ppc64
postgresql-devel is needed by php52-5.2.13-3.ius.ppc64
unixODBC-devel is needed by php52-5.2.13-3.ius.ppc64
net-snmp-devel >= 5.1 is needed by php52-5.2.13-3.ius.ppc64
libtidy is needed by php52-5.2.13-3.ius.ppc64
libtidy-devel is needed by php52-5.2.13-3.ius.ppc64
libmcrypt-devel is needed by php52-5.2.13-3.ius.ppc64
mhash is needed by php52-5.2.13-3.ius.ppc64
mhash-devel is needed by php52-5.2.13-3.ius.ppc64
freetds-devel >= 0.64 is needed by php52-5.2.13-3.ius.ppc64
mmajidi
ydl newbie
ydl newbie
 
Posts: 15
Joined: 04 Jun 2010, 14:42

Re: PHP 5.2

Postby billb » 06 Jun 2010, 02:51

Sorry -- I gave you the wrong rpmbuild command. Should be (as you already tried):

Code: Select all
setarch ppc rpmbuild --rebuild --ppc php52-5.2.13-3.ius.el5.src.rpm


-ba is for building from a .spec file which you may not end up doing if it rebuilds OK with no changes.

You'll need to install the missing dependencies as well...

yum install mysql-devel postgresql-devel unixODBC-devel net-snmp-devel ... and so on, including all the ones it listed as needed. Some may end up being other packages that would need to be rebuilt and installed from IUS -- haven't had a chance to try it yet.
PS3 60GB [CECHA01], FW 3.15, YDL 6.2, Samsung T260HD @ 1920x1200
Powermac G4 1.25 GHz x2, 2 GB RAM, YDL 6.2
User avatar
billb
Site Admin
Site Admin
 
Posts: 5522
Joined: 24 May 2007, 20:30
Location: Eastern NC, USA

Re: PHP 5.2

Postby mmajidi » 06 Jun 2010, 07:54

I will go ahead and install the other package. I will let you know what happens.
Thank you
mmajidi
ydl newbie
ydl newbie
 
Posts: 15
Joined: 04 Jun 2010, 14:42

Re: PHP 5.2

Postby billb » 06 Jun 2010, 20:23

I got all the dependencies satisfied except for mysql-devel >= mysql-devel-5.0.45-7.ydl6.1

There are SRPMs on IUS for mysql as well, but I haven't managed to get that to rebuild yet, either.
PS3 60GB [CECHA01], FW 3.15, YDL 6.2, Samsung T260HD @ 1920x1200
Powermac G4 1.25 GHz x2, 2 GB RAM, YDL 6.2
User avatar
billb
Site Admin
Site Admin
 
Posts: 5522
Joined: 24 May 2007, 20:30
Location: Eastern NC, USA

Re: PHP 5.2

Postby mmajidi » 08 Jun 2010, 03:20

I am trying to up install Mysql using the following command
setarch ppc rpmbuild --rebuild --ppc mysql51-5.1.47-1.ius.el5.src.rpm

But I am getting the following error. Any ideas:

Bad exit status from /var/tmp/rpm-tmp.74510 (%build)

After the above error, the build terminates.
mmajidi
ydl newbie
ydl newbie
 
Posts: 15
Joined: 04 Jun 2010, 14:42

Re: PHP 5.2

Postby mmajidi » 08 Jun 2010, 03:43

I have to pass an option to the command to ignore the testing part of the build. It is building now.

Here is the option --define='runselftest 0'

I used the command

setarch ppc rpmbuild --rebuild --ppc --define='runselftest 0' mysql51-5.1.47-1.ius.el5.src.rpm
mmajidi
ydl newbie
ydl newbie
 
Posts: 15
Joined: 04 Jun 2010, 14:42

Re: PHP 5.2

Postby mmajidi » 08 Jun 2010, 06:04

I tried to run the command but I got a compile error related to YACC.
Any help will greatly appreciated.
mmajidi
ydl newbie
ydl newbie
 
Posts: 15
Joined: 04 Jun 2010, 14:42

Re: PHP 5.2

Postby mmajidi » 08 Jun 2010, 06:05

I forgot to tell you that I am running YDL 6.1 on IBM Power PC machine
mmajidi
ydl newbie
ydl newbie
 
Posts: 15
Joined: 04 Jun 2010, 14:42

Re: PHP 5.2

Postby mmajidi » 10 Jun 2010, 00:24

Is there anyone out there who have been able to sucessfully compile PHP 5.2 for YDL 6.1?
Mehran
mmajidi
ydl newbie
ydl newbie
 
Posts: 15
Joined: 04 Jun 2010, 14:42

Re: PHP 5.2

Postby mmajidi » 10 Jun 2010, 05:34

I think that I finally build the RPM files for mysql50-5.0.91 which should be fine to build php 5.2. Can someone guide me on the steps on how to install the rpm package now.

ls -la /usr/src/yellowdog/RPMS/ppc
total 40316
drwxr-xr-x 2 root root 4096 Jun 9 22:21 .
drwxr-xr-x 9 root root 4096 Mar 11 2008 ..
-rw-r--r-- 1 root root 4717420 Jun 9 22:20 mysql50-5.0.91-1.ius.ppc.rpm
-rw-r--r-- 1 root root 537493 Jun 9 22:21 mysql50-bench-5.0.91-1.ius.ppc.rpm
-rw-r--r-- 1 root root 21841874 Jun 9 22:21 mysql50-debuginfo-5.0.91-1.ius.ppc.rpm
-rw-r--r-- 1 root root 2703617 Jun 9 22:21 mysql50-devel-5.0.91-1.ius.ppc.rpm
-rw-r--r-- 1 root root 11399073 Jun 9 22:21 mysql50-server-5.0.91-1.ius.ppc.rpm
mmajidi
ydl newbie
ydl newbie
 
Posts: 15
Joined: 04 Jun 2010, 14:42

Re: PHP 5.2

Postby ppietro » 10 Jun 2010, 05:56

mmajidi wrote:I think that I finally build the RPM files for mysql50-5.0.91 which should be fine to build php 5.2. Can someone guide me on the steps on how to install the rpm package now.

ls -la /usr/src/yellowdog/RPMS/ppc
total 40316
drwxr-xr-x 2 root root 4096 Jun 9 22:21 .
drwxr-xr-x 9 root root 4096 Mar 11 2008 ..
-rw-r--r-- 1 root root 4717420 Jun 9 22:20 mysql50-5.0.91-1.ius.ppc.rpm
-rw-r--r-- 1 root root 537493 Jun 9 22:21 mysql50-bench-5.0.91-1.ius.ppc.rpm
-rw-r--r-- 1 root root 21841874 Jun 9 22:21 mysql50-debuginfo-5.0.91-1.ius.ppc.rpm
-rw-r--r-- 1 root root 2703617 Jun 9 22:21 mysql50-devel-5.0.91-1.ius.ppc.rpm
-rw-r--r-- 1 root root 11399073 Jun 9 22:21 mysql50-server-5.0.91-1.ius.ppc.rpm


Basically, you open a terminal window, and as root user, use the RPM command to either install or update.

Example first time install from a terminal window:
Code: Select all
su
rpm -ivh mysql50-5.0.91-1.ius.ppc.rpm


Example update install from a terminal window:
Code: Select all
su
rpm --upgrade mysql50-5.0.91-1.ius.ppc.rpm


(the su command in the examples is to switch your normal login to root user)

NOTE: RPM will check to see if necessary dependencies are loaded. If you don't have the prerequisites installed, RPM will error out. You would just use RPM to install the dependencies, then try your install again.

Don't forget - you can always use the man rpm command from a terminal window for built-in help.

Cheers,
Paul
User avatar
ppietro
Site Admin
Site Admin
 
Posts: 4965
Joined: 13 Sep 2007, 22:18

Re: PHP 5.2

Postby mmajidi » 11 Jun 2010, 20:54

I thank you for the reply. Here is my issue:

a) The IBM PowerPC is running YDL 6.1 in production and I need to upgrade PHP from 5.1 to 5.2 on that machine.
b) When I use yum upgrade it does not upgrade from PHP 5.1 to PHP 5.2
c) Based on help from this posting, I was told that I need to build the RPM and then install it.
d) In order to build the RPM for PHP 5.2, I had to build the RPM for Mysql which I have done

I will follow your instruction to install the RPM however I am just wandering if the installation of RPM fails or cause a problem, is there a way to unistall and come back to the current version of MySql.

I am under a tide deadline and this is a production server.

Thank you,
Mehran
mmajidi
ydl newbie
ydl newbie
 
Posts: 15
Joined: 04 Jun 2010, 14:42

Next

Return to Beginner

Who is online

Users browsing this forum: No registered users and 36 guests

cron