1 (edited by Balteck 2018-05-03 09:16:52)

Topic: Centos 7.3 help with PHP multiple version

Hello, I have a Centos 7.3 where it was installed PHP71w package from WEBTATIC with command yum replace php-common --replace-with=php71w-common.

All works good, but now another developer wants a previous version of PHP.
I discovered this repo that have all versions and there is the possibility to install them side by side.

The new developer prefers 5.4, that is the stock version of Centos 7.

What is the best path to replace or esase php71w of Webtatic with the original Centos version (5.4) and install 7.1 in parallel?
How can I configure Apache to use 5.4 on a site and 7.1 on the other site?

Alternately I can reach a compromise installing php 7.0 that seems works for both.
but the question is the same: What is the best path to replace or erase php71w with php70?

this is the output of yum erase php71:

===========================================================================================================
Package                              Arch            Versione                    Repository          Dim.
===========================================================================================================
Rimozione in corso:
php71w-bcmath                        x86_64          7.1.5-1.w7                  @webtatic           94 k
php71w-cli                           x86_64          7.1.5-1.w7                  @webtatic          9.2 M
php71w-common                        x86_64          7.1.5-1.w7                  @webtatic          8.7 M
php71w-gd                            x86_64          7.1.5-1.w7                  @webtatic          744 k
php71w-mbstring                      x86_64          7.1.5-1.w7                  @webtatic          2.8 M
php71w-mysql                         x86_64          7.1.5-1.w7                  @webtatic          346 k
php71w-opcache                       x86_64          7.1.5-1.w7                  @webtatic          782 k
php71w-pdo                           x86_64          7.1.5-1.w7                  @webtatic          381 k
php71w-pear                          noarch          1:1.10.1-1.w7               @webtatic          2.1 M
php71w-process                       x86_64          7.1.5-1.w7                  @webtatic          149 k
php71w-tidy                          x86_64          7.1.5-1.w7                  @webtatic          106 k
php71w-xml                           x86_64          7.1.5-1.w7                  @webtatic          634 k
Rimozioni per dipendenze:
php-fedora-autoloader                noarch          1.0.0-1.el7                 @epel               15 k
php-php-gettext                      noarch          1.0.12-1.el7                @epel               57 k
php-tcpdf                            noarch          6.2.13-1.el7                @epel               11 M
php-tcpdf-dejavu-sans-fonts          noarch          6.2.13-1.el7                @epel              1.5 M
phpMyAdmin                           noarch          4.4.15.10-1.el7             @epel               24 M

Now I'm using phpMyAdmin, if it erase it, can I install it later without losing config?

I thank you in advance anyone may help me

Re: Centos 7.3 help with PHP multiple version

> where it was installed PHP71w package from WEBTATIC with command yum replace php-common --replace-with=php71w-common.

Please understand, that this forum is NOT for webtatic, but for remi repository users.

> Hello, I have a Centos 7.3

I only supportr latest version (7.4 for now, 7.5 soon)

You can install multiple versions of PHP, using centos-SCL repository or using my repository and SCL,
See the wizard instructions (top right link on this page)

I also recommend you read:
https://developers.redhat.com/blog/2017 … tion-tips/

which is exactly about your need (switching to FPM and then using software collections)

First step: disable webtatic and remove all packages installed from it.

Desktop: Fedora 27 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 26 x86_64 + remi (SCL only)
Hosting Server: CentOS 6.9 x86_64 + EPEL + remi + remi-php70

Re: Centos 7.3 help with PHP multiple version

Thank you very much.
I wrote the status of server for having the right beginning scenario of the server that I found.
I wished to have an help to remove Webtatic php and repo without breaking the server

But I read your recommendation and, if I wish to use multiple PHP version, I must remove php (in my case Webtatic one) and reinstall official Centos 5.4 fdm one.
I wish to ask what is the difference of Centos Software Collection repo and yours.
It seems that php7.0 and php7.1 are already present.

Re: Centos 7.3 help with PHP multiple version

> I wish to ask what is the difference of Centos Software Collection repo and yours.

My repository was used as upstream for official RHSCL and centos-scl repostiory

RHSCL provides
* rh-php70 version 7.0.10 (7.0.27 in testing)
* rh-php71 version 7.1.8
* RH support for RH customers

My repostiory provides (without the rh prefix)
* php56 version 5.6.36
* php70 version 7.0.30
* php71 version 7.1.17
* php72 version 7.2.5
* best effort support

P.S. and directories are different (/opt/rh vs /opt/remi), so you can even install both php71 from my repository and rh-php71

Desktop: Fedora 27 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 26 x86_64 + remi (SCL only)
Hosting Server: CentOS 6.9 x86_64 + EPEL + remi + remi-php70

Re: Centos 7.3 help with PHP multiple version

Thank you again.

Now I have 5.4 and 7.1 runnng in parallel!

Re: Centos 7.3 help with PHP multiple version

smile

Desktop: Fedora 27 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 26 x86_64 + remi (SCL only)
Hosting Server: CentOS 6.9 x86_64 + EPEL + remi + remi-php70