Topic: Trouble upgrading to PHP 7.0

I'm having an issue installing PHP 7.
On CentOS6.7 and using PHP 5.5 currently.

I have been trying to follow the remi wizard.

The first thing I try is to get the Repositories which download fine.

My next step is to run:

yum-config-manager --enable remi-php70

Which I get these results:

[remi-php70]
bandwidth = 0
base_persistdir = /var/lib/yum/repos/x86_64/6
baseurl =
cache = 0
cachedir = /var/cache/yum/x86_64/6/remi-php70
cost = 1000
enabled = True
enablegroups = True
exclude =
failovermethod = priority
gpgcadir = /var/lib/yum/repos/x86_64/6/remi-php70/gpgcadir
gpgcakey =
gpgcheck = True
gpgdir = /var/lib/yum/repos/x86_64/6/remi-php70/gpgdir
gpgkey = REMOVED BY FORUM
hdrdir = /var/cache/yum/x86_64/6/remi-php70/headers
http_caching = all
includepkgs =
keepalive = True
mdpolicy = group:primary
mediaid =
metadata_expire = 21600
metalink =
mirrorlist = REMOVED BY FORUM
mirrorlist_expire = 86400
name = Remi's PHP 7.0 RPM repository for Enterprise Linux 6 - x86_64
old_base_cache_dir =
password =
persistdir = /var/lib/yum/repos/x86_64/6/remi-php70
pkgdir = /var/cache/yum/x86_64/6/remi-php70/packages
proxy = False
proxy_dict =
proxy_password =
proxy_username =
repo_gpgcheck = False

Next I run:

yum update

And get:

remi-php70 
No Packages marked for Update

Says I'm still on php 5.5 when I run:

php --v

I have tried restarting and no luck.  Am I missing something?

Re: Trouble upgrading to PHP 7.0

Answer on https://www.centos.org/forums/viewtopic … mp;t=57338

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Trouble upgrading to PHP 7.0

So you have an old PHP version installed from sources.

1/ You have to remove it

By removing the files installed in /usr/local (be careful, perhaps you have some other things from some other software also installed from source)

2/ Then you can "install" the packaged version

yum install php php-cli php-mbstring php-mysqlnd... 
Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Trouble upgrading to PHP 7.0

Remi wrote:

So you have an old PHP version installed from sources.

1/ You have to remove it

By removing the files installed in /usr/local (be careful, perhaps you have some other things from some other software also installed from source)

2/ Then you can "install" the packaged version

yum install php php-cli php-mbstring php-mysqlnd... 

Thank you thank you!  Trying right now.

Re: Trouble upgrading to PHP 7.0

I compilied with EasyApaphe and selected no PHP.  Running

php --v

give me

root@x6gn-rc5v [~]# php --v
Usage: php [options] [-f] <file> [--] [args...]
   php [options] -r <code> [--] [args...]
   php [options] [-B <begin_code>] -R <code> [-E <end_code>] [--] [args...]
   php [options] [-B <begin_code>] -F <file> [-E <end_code>] [--] [args...]
   php [options] -S <addr>:<port> [-t docroot]
   php [options] -- [args...]
   php [options] -a

  -a               Run interactively
  -c <path>|<file> Look for php.ini file in this directory
  -n               No php.ini file will be used
  -d foo[=bar]     Define INI entry foo with value 'bar'
  -e               Generate extended information for debugger/profiler
  -f <file>        Parse and execute <file>.
  -h               This help
  -i               PHP information
  -l               Syntax check only (lint)
  -m               Show compiled in modules
  -r <code>        Run PHP <code> without using script tags <?..?>
  -B <begin_code>  Run PHP <begin_code> before processing input lines
  -R <code>        Run PHP <code> for every input line
  -F <file>        Parse and execute <file> for every input line
  -E <end_code>    Run PHP <end_code> after processing all input lines
  -H               Hide any passed arguments from external tools.
  -S <addr>:<port> Run with built-in web server.
  -t <docroot>     Specify document root <docroot> for built-in web server.
  -s               Output HTML syntax highlighted source.
  -v               Version number
  -w               Output source with stripped comments and whitespace.
  -z <file>        Load Zend extension <file>.

  args...          Arguments passed to script. Use -- args when first argument
                   starts with - or script is read from stdin

  --ini            Show configuration file names

  --rf <name>      Show information about function <name>.
  --rc <name>      Show information about class <name>.
  --re <name>      Show information about extension <name>.
  --rz <name>      Show information about Zend extension <name>.
  --ri <name>      Show configuration for extension <name>.


I also removed the php folder under usr/local/php


root@x6gn-rc5v [~]# yum install URL REMOVED BY FORUM LIMITS
Loaded plugins: fastestmirror
Setting up Install Process
epel-release-latest-6.noarch.rpm                                                                                                                    |  14 kB     00:00
Examining /var/tmp/yum-root-MKLVvz/epel-release-latest-6.noarch.rpm: epel-release-6-8.noarch
/var/tmp/yum-root-MKLVvz/epel-release-latest-6.noarch.rpm: does not update installed package.
Error: Nothing to do
root@x6gn-rc5v [~]# yum install REMOVED BY FORUM LIMITS
Loaded plugins: fastestmirror
Setting up Install Process
remi-release-6.rpm                                                                                                                                  | 7.4 kB     00:00
Examining /var/tmp/yum-root-MKLVvz/remi-release-6.rpm: remi-release-6.6-2.el6.remi.noarch
/var/tmp/yum-root-MKLVvz/remi-release-6.rpm: does not update installed package.
Error: Nothing to do
root@x6gn-rc5v [~]# yum install yum-utils
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: repo1.ash.innoscale.net
* epel: mirror.cogentco.com
* extras: mirror.rackspace.com
* remi-php70: mirrors.mediatemple.net
* remi-safe: mirrors.mediatemple.net
* updates: repo1.ash.innoscale.net
* webtatic: us-east.repo.webtatic.com
Package yum-utils-1.1.30-30.el6.noarch already installed and latest version
Nothing to do
root@x6gn-rc5v [~]# yum-config-manager --enable remi-php70
Loaded plugins: fastestmirror
============================================================================ repo: remi-php70 =============================================================================
[remi-php70]
bandwidth = 0
base_persistdir = /var/lib/yum/repos/x86_64/6
baseurl =
cache = 0
cachedir = /var/cache/yum/x86_64/6/remi-php70
cost = 1000
enabled = True
enablegroups = True
exclude =
failovermethod = priority
gpgcadir = /var/lib/yum/repos/x86_64/6/remi-php70/gpgcadir
gpgcakey =
gpgcheck = True
gpgdir = /var/lib/yum/repos/x86_64/6/remi-php70/gpgdir
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
hdrdir = /var/cache/yum/x86_64/6/remi-php70/headers
http_caching = all
includepkgs =
keepalive = True
mdpolicy = group:primary
mediaid =
metadata_expire = 21600
metalink =
mirrorlist = REMOVED BY FORUM LIMITS
mirrorlist_expire = 86400
name = Remi's PHP 7.0 RPM repository for Enterprise Linux 6 - x86_64
old_base_cache_dir =
password =
persistdir = /var/lib/yum/repos/x86_64/6/remi-php70
pkgdir = /var/cache/yum/x86_64/6/remi-php70/packages
proxy = False
proxy_dict =
proxy_password =
proxy_username =
repo_gpgcheck = False
retries = 10
skip_if_unavailable = False
ssl_check_cert_permissions = True
sslcacert =
sslclientcert =
sslclientkey =
sslverify = True
throttle = 0
timeout = 30.0
username =

root@x6gn-rc5v [~]# yum update
Loaded plugins: fastestmirror
Setting up Update Process
Loading mirror speeds from cached hostfile
* base: repo1.ash.innoscale.net
* epel: mirror.cogentco.com
* extras: centos.mirror.constant.com
* remi-php70: mirrors.mediatemple.net
* remi-safe: mirrors.mediatemple.net
* updates: repo1.ash.innoscale.net
* webtatic: us-east.repo.webtatic.com
remi-php70                                                                                                                                          | 2.9 kB     00:00
No Packages marked for Update

I'm very new to trying to install PHP7.  I've only used the EasyApache in the past.  I'm not understanding why I'm doing wrong still.  Thank you for any help.

Re: Trouble upgrading to PHP 7.0

Not php --v but php -v (single dash) or php --version

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Trouble upgrading to PHP 7.0

Still says php 5.5 hummm. let me try to uninstall another way.

root@x6gn-rc5v [/usr/local]# php -v
PHP 5.5.34 (cli) (built: Apr  7 2016 07:04:39)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies

Re: Trouble upgrading to PHP 7.0

Having one heck of a time removing php which was installed by source.  Just removing the directory is not working.  Also when I recompile and select NONE for php, still says I have php 5.5.  Any suggestions to remove it?

Re: Trouble upgrading to PHP 7.0

Sorry, I have no idea how EasyApache works, you should totally remove it and use the package (httpd, php, ....)

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Trouble upgrading to PHP 7.0

Hmm... looking at easyapche, it seems a cPanel thing.

Are you using cPanel ?

Is yes, you are very probably sticked with PHP 5.
Updating to another version may break everything if cpanel is not compatible.
And IIRC, cpanel use ioncube-loader which is not compatible with PHP 7

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

11 (edited by Wstar 2016-04-08 14:47:08)

Re: Trouble upgrading to PHP 7.0

Yes sir, I am using WHM with cPanel.
Thanks for any help in the matter.

Im unsure if this will work.  From what I'm reading, removing the php files manually will work.
find /usr -name php5* (To get the list of files)
find /usr -name php5* | xargs rm -rvf (To delete the php4 files/folders)

Would this be accurate?

Re: Trouble upgrading to PHP 7.0

No.

As I said, I don't think cpanel is compatible with PHP 7, so if you update, it wont work anymore.

You should really ask on cpanel forum.

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Trouble upgrading to PHP 7.0

My web hosting company gave me this document to try: https://www.codepunker.com/blog/how-to- … everything
Trying it right now and will update for everyone that is interested.

Re: Trouble upgrading to PHP 7.0

So you can probably use the php70-php-* packages (installed in /opt/remi/php70) to avoid having to build from sources, and only use configuration tips from the linked howto.

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

15 (edited by Wstar 2016-04-13 16:17:49)

Re: Trouble upgrading to PHP 7.0

Remi, your the best!  I used the remi build and followed the rest of the directions on the HOWTO.  Its working great so far!  Few modules I need to enable, but everything is great.  I would highly recommend that guild for others.

Any pointers to documents to get xsl and intl enabled?

16 (edited by Ruffus 2022-04-05 08:48:04)

Re: Trouble upgrading to PHP 7.0

Remi wrote:

So you have an old PHP version installed from sources.

1/ You have to check out Airsnore here and remove it

By removing the files installed in /usr/local (be careful, perhaps you have some other things from some other software also installed from source)

2/ Then you can "install" the packaged version

yum install php php-cli php-mbstring php-mysqlnd... 

Nice, thanks Remi. Removing the old version of PHP just did the trick for me.