[SOLVED] Centos 5.6 - updating from PHP 5.1.6 to PHP 5.3

Issues related to software problems.
Zigzagcom
Posts: 9
Joined: 2007/04/22 09:23:50

Re: Centos 5.6 - updating from PHP 5.1.6 to PHP 5.3

Post by Zigzagcom » 2011/04/10 19:28:18

I was researching the same topic for a future upgrade to php53, and from the looks of it, you won't need to append the "u" to the package name.
I believe the rename was specific to the IUS repo:

https://bugs.launchpad.net/ius/+bug/691755

but if you look at the link below, you'll see that the CentOs php53 packages don't have the "u":

http://mirror.centos.org/centos/5.6/updates/i386/RPMS/ ...likewise for the x86_64 RPMS

So, I think you can ignore the "u" at the cli when upgrading to php53. Maybe someone else can chime in and verify my findings.

Incidentally, bind was also upgraded to bind97 and would require a similar approach.

Best regards... :-)

User avatar
TrevorH
Forum Moderator
Posts: 29490
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Centos 5.6 - updating from PHP 5.1.6 to PHP 5.3

Post by TrevorH » 2011/04/10 20:18:53

That sounds correct to me. It seems that Redhat haven't done a brilliant job of making php53 a drop-in replacement for the standard php packages since things like Squirrelmail have a "Requires: php >= 4.0.4" and that does not match php53 5.3.3. If they'd made squirrelmail "Require: mod_php" then it would have allowed either to work since both php packages have a "Provides: mod_php" line. That still isn't a complete answer as this particular example also requires php-mbstring and that doesn't work either.

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: Centos 5.6 - updating from PHP 5.1.6 to PHP 5.3

Post by pschaff » 2011/04/10 22:43:55

The 5.6 squirrelmail will not build against php53 even with the spec file changes to use php53, so it is a bit more complicated than just changing the spec. The SL6 package will build with a one-line change to use php53 but not install due to an unsatisfied requirement for hunspell. The hunspell build fails. Gave up at that stage.

The php53u packages are from IUS - [b]wolfy[/b]'s suggestion; however, they also conflict with php so not sure how that helps.

Still seems that waiting for CentOS-6 may be the way to go.

User avatar
TrevorH
Forum Moderator
Posts: 29490
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Centos 5.6 - updating from PHP 5.1.6 to PHP 5.3

Post by TrevorH » 2011/04/10 23:44:09

Looks to me more like squirrelmail is just plain broken because it won't rebuild here with php 5.1.6. I get the same symptoms as reported [url=https://bugzilla.redhat.com/show_bug.cgi?id=669663]here[/url].

addw
Posts: 32
Joined: 2005/10/23 14:11:29
Location: England
Contact:

Re: Centos 5.6 - updating from PHP 5.1.6 to PHP 5.3

Post by addw » 2011/04/11 16:49:03

Well, I have a solution. I am not proud of it, but it appears to work.

Install [url=http://www.phcomp.co.uk/Downloads/php53-shim-5.3.3-1.2.noarch.rpm]http://www.phcomp.co.uk/Downloads/php53-shim-5.3.3-1.2.noarch.rpm[/url]
What this does is [font=Courier]require[/font] the packages: [font=Courier]php53[/font] and [font=Courier]php53-mbstring[/font] and [font=Courier]export[/font] the packages: [font=Courier]php[/font] and [font=Courier]php-mbstring[/font]

I have now reinstalled nagios (seems to work), and squirrelmail (not tried it yet) and a bunch of my own stuff that got broken is now OK.

You will prob also need my signing key which is here: [url=http://www.phcomp.co.uk/Software/RPM-GPG-KEY-PHCL-CentOS-5]http://www.phcomp.co.uk/Software/RPM-GPG-KEY-PHCL-CentOS-5[/url]

If you want the source RPM get it from [url=http://www.phcomp.co.uk/Downloads/php53-shim-5.3.3-1.2.src.rpm]http://www.phcomp.co.uk/Downloads/php53-shim-5.3.3-1.2.src.rpm[/url]

Have fun, enjoy!

igorb
Posts: 4
Joined: 2011/04/09 12:52:10
Location: Rotterdam, Netherlands
Contact:

Re: Centos 5.6 - updating from PHP 5.1.6 to PHP 5.3

Post by igorb » 2011/04/12 22:13:14

As far as I can tell the migration from PHP 5.1.6. to PHP 5.3 went pretty well
My actions:

Stop Apache webserver:
> service httpd stop

Remove previously installed version of PHP
> yum remove php php-*
This gave me alot of dependencies with PSA (Plesk) packages. I removed all of them, because I don't use Plesk.


Install PHP 5.3
> yum install php53-pear (not in RPM, not installed)
> yum install php53-cli
> yum install php53-common
> yum install php53-devel (installed together with some dependant packages)
> yum install php53-gd
> yum install php53-mbstring
> yum install php53-mcrypt (not in RPM, not installed)
> yum install php53-mhash (not in RPM, not installed, heard it was deprecated)
> yum install php53-mysql
> yum install php53-soap
> yum install php53-pdo (installed together with soap)
> yum install php53-xml
> yum install php53-xmlrpc
> yum install php53-bcmath
> yum install php53-pecl-apc (not in RPM, not installed)
> yum install php53-pecl-memcache (not in RPM, not installed)
> yum install php53-snmp
Ofcourse I could have put them in one command, but decided to do them one by one to see what each installation does.

Enable Apache webserver (don't really know why this would be an addition to the service httpd start though..)
> chkconfig httpd on

Start Apache webserver
> service httpd start

Don't forget!
In PHP 5.3 it is required to use the date.timezone setting or the date_default_timezone_set() function.
Add date.timezone = "Europe/Amsterdam" (or other zone) to php.ini.

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: Centos 5.6 - updating from PHP 5.1.6 to PHP 5.3

Post by pschaff » 2011/04/12 23:54:21

[quote]
igorb wrote:
...
> yum install php53-pear (not in RPM, not installed)[/quote]
That seems to be one of the major complaints about php53. Note that IUS php53u packages provide all you noted missing except -mhash:[code]
Available Packages
php53u-mcrypt.i386 5.3.6-1.ius.el5 ius
php53u-pear.noarch 1:1.9.2-1.ius.el5 ius
php53u-pecl-apc.i386 3.1.6-4.ius.el5 ius
php53u-pecl-memcache.i386 3.0.5-1.ius.el5 ius
php53u-pecl-memcache.i386 3.0.6-1.ius.el5 ius-testing[/code]
You would probably need to remove the php53 packages and replace them with php53u-* to make use of them.

[quote]
...
Enable Apache webserver (don't really know why this would be an addition to the service httpd start though..)
> chkconfig httpd on[/quote]
The chkconfig command controls what services start and stop at boot and shutdown. If you already had httpd starting that was a do-nothing.

[quote]
...
Don't forget!
In PHP 5.3 it is required to use the date.timezone setting or the date_default_timezone_set() function.
Add date.timezone = "Europe/Amsterdam" (or other zone) to php.ini.[/quote]
Good tip.

So, can we consider this topic [SOLVED]?

igorb
Posts: 4
Joined: 2011/04/09 12:52:10
Location: Rotterdam, Netherlands
Contact:

Re: Centos 5.6 - updating from PHP 5.1.6 to PHP 5.3

Post by igorb » 2011/04/13 20:23:22

In my case this topic is SOLVED.

I just upgraded from PHP53 to PHP53u (from IUS) using the following steps. :

1. Download and Install IUS and EPEL package. Check for correct URL: http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/
> wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/i386/ius-release-1.0-6.ius.el5.noarch.rpm
> wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/i386/epel-release-1-1.ius.el5.noarch.rpm
> rpm -Uvh ius-release*.rpm epel-release*.rpm

2. Stop Apache Webserver:
> service httpd stop
----
OPTION A: IF YOU HAVE ALL STANDARD PHP PACKAGES INSTALLED, USE:
3. Install IUS package for replacing stock packages with IUS:
> yum install yum-plugin-replace

4. replace PHP and install IUS PHP53u packages:
> yum replace php --replace-with php53u

OR

OPTION B: OR IF YOU HAVE RHEL 5.6 PHP53 PACKAGES INSTALLED, USE:
3. Remove php53 packages:
> yum remove php53 php53-*

4. Install IUS PHP53u packages:
> yum install php53u-pear php53u php53u-cli php53u-common php53u-devel php53u-gd php53u-mbstring php53u-mcrypt php53u-mysql php53u-pdo php53u-soap php53u-xml php53u-xmlrpc php53u-bcmath php53u-pecl-apc php53u-pecl-memcache php53u-snmp
----
5. Check PHP Version:
> php -v

6. Check Apache. Should return: Syntax OK.
> httpd -t

7. Start Apache Webserver
> service httpd start

8. Add date.timezone = "Europe/Amsterdam" (or other zone) to php.ini and check settings as this is a new PHP.ini.

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: [SOLVED] Centos 5.6 - updating from PHP 5.1.6 to PHP 5.3

Post by pschaff » 2011/04/13 20:27:29

Thanks for reporting back, and for being very thorough about it. Marking this thread [SOLVED] for posterity.

amtradm
Posts: 3
Joined: 2010/10/24 21:29:44

Re: [SOLVED] Centos 5.6 - updating from PHP 5.1.6 to PHP 5.3

Post by amtradm » 2011/04/24 05:02:37

Thanks, the procedures above appear to work. I did encounter 1 message, however, when re/starting the httpd service:

[b][warn] module php5_module is already loaded, skipping[/b]

I solved this by commenting out the line:

LoadModule php5_module modules/libphp5.so

in /etc/httpd/conf/httpd.conf

per instructions on [url=http://www.directadmin.com/forum/showthread.php?t=23856]this website post[/url].

Post Reply

Return to “CentOS 5 - Software Support”