Upgrading to PHP 5.6.9

Issues related to applications and software problems
Kunwar
Posts: 55
Joined: 2014/08/28 23:21:43

Re: Upgrading to PHP 5.6.9

Post by Kunwar » 2015/05/20 02:00:41

Thanks for helping me out.... I am asking too many questions cuz I am new to Centos....

I have following packages installed:

Code: Select all

[root@parada php.d]# yum list installed | grep "php"
php56u.x86_64                          5.6.8-1.ius.centos7             @/php56u-5.6.8-1.ius.centos7.x86_64
php56u-cli.x86_64                      5.6.8-1.ius.centos7             @ius     
php56u-common.x86_64                   5.6.8-1.ius.centos7             @ius     
php56u-mysqlnd.x86_64                  5.6.8-1.ius.centos7             @/php56u-mysqlnd-5.6.8-1.ius.centos7.x86_64
php56u-pdo.x86_64                      5.6.8-1.ius.centos7             @ius     
php56u-pear.noarch                     1:1.9.5-1.ius.centos7           @ius     
php56u-pecl-jsonc.x86_64               1.3.7-1.ius.centos7             @ius     
php56u-process.x86_64                  5.6.8-1.ius.centos7             @ius     
php56u-xml.x86_64  

[root@parada php.d]# yum list installed | grep "maria"
mariadb.x86_64                         1:5.5.41-2.el7_0                @base    
mariadb-libs.x86_64                    1:5.5.41-2.el7_0                @base    
mariadb-server.x86_64                  1:5.5.41-2.el7_0                @base    

but PHP still didn't get executed... I don't know what to do.

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: Upgrading to PHP 5.6.9

Post by gerald_clark » 2015/05/20 02:08:12

Httpd needs to run php56u instead of php.

igro
Posts: 77
Joined: 2010/08/27 00:41:25

Re: Upgrading to PHP 5.6.9

Post by igro » 2015/05/20 02:50:07

run "apachectl -M|grep -i php"
this will show loaded php module in apache or not
also see "/var/log/httpd/error.log" there may be some useful information
update: there is two error logs
error_log - log of httpd daemon
error.log - log of virtual host

Kunwar
Posts: 55
Joined: 2014/08/28 23:21:43

Re: Upgrading to PHP 5.6.9

Post by Kunwar » 2015/05/20 10:37:49

I am not sure what this code does, love get more information on this but the following code worked like a charm.... My issue is resolved.

Code: Select all

yum --enablerepo=centosplus install mod_php

igro
Posts: 77
Joined: 2010/08/27 00:41:25

Re: Upgrading to PHP 5.6.9

Post by igro » 2015/05/23 06:43:03

it's centos plus repository.
--enablerepo means enable disabled repository and mod_php is that package that need to work apache with php (usually i saw package mod_php in ubuntu. first time see on centos :)
http://wiki.centos.org/AdditionalResour ... CentOSPlus

alfianz
Posts: 5
Joined: 2015/09/04 04:04:29

Re: Upgrading to PHP 5.6.9

Post by alfianz » 2015/09/04 04:12:33

hello,

i had problem to upgrade PHP
# rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
Retrieving https://mirror.webtatic.com/yum/el6/latest.rpm
curl: (6) Couldn't resolve host 'mirror.webtatic.com'
error: skipping https://mirror.webtatic.com/yum/el6/latest.rpm - transfer failed
how to solve it?

User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: Upgrading to PHP 5.6.9

Post by avij » 2015/09/04 06:28:31

As TrevorH wrote earlier in this topic, "We do not recommend use of the Webtatic repo under any circumstances."

Perhaps you ran into some previously unknown self-defence mechanism in CentOS... Please read this entire topic for better alternatives to webtatic.

sadue
Posts: 55
Joined: 2016/01/08 19:08:26

Re: Upgrading to PHP 5.6.9

Post by sadue » 2016/01/26 10:25:09

TrevorH wrote:The webtatic repo contains many packages with names that conflict with the names of packages in CentOS base and updates repos. This means that it replaces packages supplied by CentOS without warning. Examine your /var/log/yum.log and see what else got updated at the same time as the php packages were installed (or afterwards). Use rpm -qi $packagename to check to make sure that the buildhost is a CentOS one and that the signing key is the CentOS one for each of those.

The IUS Community repo is a better source of replacement packages since they are all named differently than the ones CentOS supply so you have to take explicit action to install them.
I am a newbie to centos and have no good knowledge of programming. All my installation is through one tutoria or the other.
Am running php 5.4 on my server, due to its incompatibility, I have to upgrade to php 5.6, which I don't know how to upgrade. Many tutorial I found on net makes use of webtatic which is not supported by centos.
I went to IUS site, but to be honest, everything that is been talked there sounds like Greek to me cos am not a programmer.

Please, can you guys help me with a detailed tutorial on how to upgrade my php from 5.4 to 5.6, so that my site can run.

User avatar
remirepo
Posts: 447
Joined: 2014/09/21 09:07:12
Location: France
Contact:

Re: Upgrading to PHP 5.6.9

Post by remirepo » 2016/01/26 10:30:37

For obvious reason, I will not give you information about IUS

But, you can try "remi-php56" repository which only provide PHP, and nothing else. And I think is the simpler to use.

Configuration Wizard : http://rpms.remirepo.net/wizard/
Blog post about latest version : http://blog.remirepo.net/post/2016/01/0 ... 7-7.0.2-en
Remi's Repository - Forum - Blog

stevemowbray
Posts: 519
Joined: 2012/06/26 14:20:47

Re: Upgrading to PHP 5.6.9

Post by stevemowbray » 2016/01/26 10:40:08

To use the IUS packages in CentOS 7:

1. Install EPEL and IUS repositories:
# yum --enablerepo=extras install epel-release
# yum install https://centos7.iuscommunity.org/ius-release.rpm

2. Install yum-plugin-replace and replace the php packages with php56u packages:
# yum install yum-plugin-replace
# yum replace --replace-with php56u php

3. Restart any services which depend on php, such as httpd.

Note that this will install the current version of 5.6, which at the time of posting is 5.6.16, and that a "yum update" will keep the packages up to date in future.

Post Reply