php7 is only available whith version 7.2 and i don't find way to install 7.1 version

hi to all,

i need install php 7.1 for a project

so i have installed php7 with:
zypper install php7

I have installed php 7.2

php -v
PHP 7.2.2 (cli) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

i can’t use php 7.2 instead 7.1 bucause this incompatibilities: http://be2.php.net/manual/en/migration72.incompatible.php

i have undestand php7 package have the same name for each version.
https://forums.opensuse.org/showthread.php/522610-How-to-install-PHP-7-1

i have this repo installed:


# | Alias                               | Nome                        | Abilitato | Controllo GPG | Aggiornamento--+-------------------------------------+-----------------------------+-----------+---------------+--------------
1 | Games                               | Games                       | Sì        | (r ) Sì       | No           
2 | Mozilla                             | Mozilla                     | No        | ----          | ----         
3 | code                                | Visual Studio Code          | Sì        | (r ) Sì       | No           
4 | google-chrome                       | google-chrome               | Sì        | (r ) Sì       | Sì           
5 | http-download.opensuse.org-54848f9d | home:opensuseitalia         | Sì        | (r ) Sì       | Sì           
6 | http-download.videolan.org-d7a88967 | SuSE                        | Sì        | (r ) Sì       | Sì           
7 | repo-non-oss                        | openSUSE-Tumbleweed-Non-Oss | Sì        | (r ) Sì       | Sì           
8 | repo-oss                            | openSUSE-Tumbleweed-Oss     | Sì        | (r ) Sì       | Sì           
9 | repo-update                         | openSUSE-Tumbleweed-Update  | Sì        | (r ) Sì       | Sì    

If i search different version of php7


sudo zypper search -s php7


Caricamento dati del repository in corso...
Lettura dei pacchetti installati in corso...


S  | Nome                         | Tipo      | Versione        | Arch.  | Repository             
---+------------------------------+-----------+-----------------+--------+------------------------
i+ | apache2-mod_php7             | pacchetto | 7.2.2-2.1       | x86_64 | openSUSE-Tumbleweed-Oss
v  | apache2-mod_php7             | pacchetto | 7.2.2-2.1       | i586   | openSUSE-Tumbleweed-Oss
i+ | php7                         | pacchetto | 7.2.2-2.1       | x86_64 | openSUSE-Tumbleweed-Oss
v  | php7                         | pacchetto | 7.2.2-2.1       | i586   | openSUSE-Tumbleweed-Oss
   | php7-APCu                    | pacchetto | 5.1.9-1.1       | x86_64 | openSUSE-Tumbleweed-Oss



i have also search on on line packages here https://software.opensuse.org/package/php7 but is the same only version available is 7.2

is possible opensuse thumbleweed don’t make avilable previous version of a packages? i think i’m do same mistake but i don’t undertand where…

I have search a lot on google but i have find solution only for apt-get based sistem like ubuntu where different version of php are named different.

https://ibb.co/eB4DfHhttps://ibb.co/eB4DfHi post a yast image where onli version available is 7.2 https://ibb.co/eB4DfH

I think you will have to uninstall php7 and mark the package not to update. Then see
https://help.nextcloud.com/t/opensuse-tumbleweed-has-php-7-2-repos-have-nextcloud-12-what-do-i-do/25127

If you install any software that needs 7.2 there may be issues.

Don’t use this as expert advice, just a another item in your research.

i have find php7 version 7.1 under expermentals packages at https://software.opensuse.org/package/php7
image here https://ibb.co/gbKAuc


php -v


PHP 7.1.15 (cli) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies



Yes,
And although is not labeled a “community repo” I think that the profile of the owner/maintainer of the repo is solid
https://build.opensuse.org/user/show/pgajdos

TSU

I don’t see any php71 repo for Tumbleweed. I’ve updated to php7.2 by mistake, and there is no repo (even experimental) to switch back to php7.1.
What should I do? Is Tumbleweed going to support only 7.2 from now on?

Thx

I don’t think Tw is going to have 7.1 back. If this is about Nextcloud too, upgrade your Nextcloud to the most recent ( 14 ) version

You can try Tumbleweed Snapshots,
I don’t know if it goes back far enough (approx 1 year plus) and if it will have PHP7.1x

http://release-tools.opensuse.org/2018/09/18/Tumbleweed-Snapshots-Official.html

Otherwise if you really need PHP 7.1,
The alternative I’d recommend is to use your choice of virtualization(or multi-boot) to build an openSUSE 15 or 42.3, both which apparently still support going back to PHP7.1.22 by adding the “devel:languages:php:php71” repo.

This second option is what I do all the time (specific vms to build software) to avoid mucking up my base OS.

TSU

Tumbleweed snapshots is not going to help here.

@momic: what application needing php7.1 are we talking about?

I need php7.1 for local development and personal projects that rely on php7.1

Tumbleweed has no officially supported php7.1 repos, and even Leap(LTS) 15/42.3 has only experimental php7.1 repo but it does not cover all packages (like php7-redis and php7-intl for example). I was able to install from them on Tumbleweed but since my code depends on php7-redis and php7-intl I couldn’t do much without building it from source. I know I could use virtualization for development like vagrant/docker, but wouldn’t it be better to have option of multiple php versions side by side? But I guess openSuSE does not have proper naming of packages to support that. On the other hand other distros gives you option to install multiple versions of php with proper package naming from many community repos.

openSuSE gives you maintenance support up to 3 years for Leap.
Leap 15.0 - is expected to be maintained until end of November 2019
Leap 42.3 - is expected to be maintained until June 30 2019
So up to one year left and with experimental repos for php7.1 it does not provide enough trust and confidence to use it.

IIRC, I had php5 and php7 alongside eachother on Tumbleweed for a while. But, php5 is considered dead now, and php7.2 is the current stable.

To be more specific, reason why I need 7.1 instead of 7.2, is because of Laravel framework issue and other vendor packages issues with php7.2
https://github.com/laravel/framework/issues/20248

Yes, but I’m talking about installation of different minor versions alongside eachother like: php7.0, php7.1 and php7.2 for development purposes. You can adapt your code for php7.2 but not of other vendors. So php7.1 is still needed. Like here:
https://www.tecmint.com/install-different-php-versions-in-ubuntu/

Valid. You can file a bug report against Tumbleweed for this but given it’s a rolling release, that moves fast, I don’t think the packagers are eager to maintain older versions, specially not with projects like php.
But, using the credentials you have here you could login on build.opensuse.org, setup a Tumbleweed repo and branch all the packages in http://download.opensuse.org/repositories/devel:/languages:/php:/php71/openSUSE_Leap_15.0/ and see if they build for Tumbleweed. You could even install osc ( the openSUSE Buildserver ) and build them locally

But in your a case I wouldn’t go for Tumbleweed, but for Leap instead. Simply because it already has a php71 repo.

I would recall this thread because I have a similar problem. Tumbleweed seems to keep track only of the latest released php version.
I requested zypper to install php7 and I got installed 7.3.2 without any chance to opt for a minor version.

As well as op I have framework dependencies which do not support the latest release oh php.

Unfortunately this is a breaking point for me as I cannot work properly with just one php version (which also will get updated in time, so it will change during development).

AFAIK this is not going to change so, unfortunately, I think I’m gonna need a different distro to work

What you’re describing is a basic consideration when deciding whether to install Tumbleweed or LEAP, it’s fully documented and discussed in many places that TW is for people who want the bleeding edge in everything, and to be on the bleeding edge all the time means constant changes.

Your options aside from a re-installation include

  • Installing what you want, and then freezing those packages
  • Installing important LOB type apps in, and deploying in a virtual machine(running LEAP or other distro that doesn’t change constantly).
  • Using Docker containers

Each of the above options give you full control over whether anything related to the app is updated or not.
Be wary though that you may not get automatic security patches, you won’t want to fall into a trap similar to all the victims of Struts exploits recently.

TSU

Well, you got an answer from a very active and knowing member, so there are people who found this your recall. But I do not think it is the best thing for you to do.

Not many people will check if old threads gete a new post after so many months. And this will of course also not show up in the list of new threads. Thus what you do here might not be the most effective way of drawing attention to your problem.