Professional Documents
Culture Documents
Update PHP Centos
Update PHP Centos
www.centos.org
29/10/13
www.centos.org
In p h p 5 3 . s p e cthe provides line is: P r o v i d e s :m o d _ p h p=% { v e r s i o n } % { r e l e a s e } But I think that it also needs: P r o v i d e s :p h p=% { v e r s i o n } % { r e l e a s e } Although if they do that then anyone with PHP installed who does y u mu p d a t e might get updated to PHP5.3 automatically -- which they might not want, hmmmmm
Feel free to raise your concerns via http://bugzilla.redhat.com . EVERYTHING shipped by the CentOS project in the base and updates repositories respects bug per bug the packages shipped by the upstream commercial vendor. But before doing that, read their release notes first. You can start at http://docs.redhat.com/docs/enUS/Red_Hat_Enterprise_Linux/5/html/5.6_Release_Notes/ar01s04.html
As always, they will be made available in the same place as the binaries are, but below the SRPMS directory. They were delayed in order to minimize the impact of the new release on mirrors.
29/10/13
www.centos.org
It is more than just pear, but the other packages that depend on php (like some of my own stuff).
I am pretty sure that ALL packages which depend on php ( via all the variants of Requires: php and/or soname ) will ( or already do ) have issues. First because of the different name and second because php 5.3 is not fully compatible with php 5.1 Assuming that your company policy allows that, rather than creating your own rpm you'd better use the stack provided by the IUS repository.
29/10/13
www.centos.org
In my case I really need 5.3 in order to run Magento (ecommerce platform). After some browsing I've found following tutorial. Would this be useful? > service httpd stop Remove previously installed version of PHP: > yum remove php php-* Install PHP 5.3 (looks weird, note the "u" in php53u) > yum install 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 > chkconfig httpd on > service httpd start Anyone here familiar with this approach?
29/10/13
www.centos.org
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...
29/10/13
www.centos.org
You will prob also need my signing key which is here: http://www.phcomp.co.uk/Software/RPM-GPG-KEY-PHCLCentOS-5 If you want the source RPM get it from http://www.phcomp.co.uk/Downloads/php53-shim-5.3.3-1.2.src.rpm Have fun, enjoy!
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.
29/10/13
www.centos.org
igorb wrote: ... > yum install php53-pear (not in RPM, not installed) That seems to be one of the major complaints about php53. Note that IUS php53u packages provide all you noted missing except -mhash:
A v a i l a b l eP a c k a g e s p h p 5 3 u m c r y p t . i 3 8 6 p h p 5 3 u p e a r . n o a r c h p h p 5 3 u p e c l a p c . i 3 8 6 p h p 5 3 u p e c l m e m c a c h e . i 3 8 6 p h p 5 3 u p e c l m e m c a c h e . i 3 8 6 5 . 3 . 6 1 . i u s . e l 5 1 : 1 . 9 . 2 1 . i u s . e l 5 3 . 1 . 6 4 . i u s . e l 5 3 . 0 . 5 1 . i u s . e l 5 3 . 0 . 6 1 . i u s . e l 5 i u s i u s i u s i u s i u s t e s t i n g
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 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. Good tip. So, can we consider this topic [SOLVED]?
29/10/13
www.centos.org
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-peclmemcache 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.
Re: [SOLVED] Centos 5.6 - updating from PHP 5.1.6 to PHP 5.3
Posted by pschaff on 2011/4/13 20:27:29 Thanks for reporting back, and for being very thorough about it. Marking this thread [SOLVED] for posterity.
Re: [SOLVED] Centos 5.6 - updating from PHP 5.1.6 to PHP 5.3
Posted by amtradm on 2011/4/24 5:02:37 Thanks, the procedures above appear to work. I did encounter 1 message, however, when re/starting the httpd service: [warn] module php5_module is already loaded, skipping I solved this by commenting out the line: LoadModule php5_module modules/libphp5.so in /etc/httpd/conf/httpd.conf per instructions on this website post.
www.centos.org/modules/newbb/print.php?form=1&topic_id=30881
8/8