• [gentoo-user] php different version

    From zcampe@gmail.com@21:1/5 to All on Wed Oct 20 19:30:02 2021
    i am a little confused.
    it's been a few years since i last installed a php application.
    but the problems still seem to be the same ;-)

    with postfixadmin everything seems to be ok.

    when i install nextcloud it also installs php-7.3.31 and php-7.4.24,
    this is probably due to dev-php/imagick-3.5.1

    if i install roundcube with use="change-password" php-8.0.11 is needed.

    i used use="-imagemagick" for nextcloud, and
    all packages could agree on php-8.0.11.

    1.if an application requires 2 different versions this can't work,
    apache only uses one or?

    2.if in the ebuild of dev-php/imagick-3.5.1
    USE_PHP="php7-3 php7-4 php8-0"
    what does that mean?

    ty

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael Orlitzky@21:1/5 to zcampe@gmail.com on Wed Oct 20 21:50:02 2021
    On 2021-10-20 19:23:09, zcampe@gmail.com wrote:

    when i install nextcloud it also installs php-7.3.31 and php-7.4.24,
    this is probably due to dev-php/imagick-3.5.1


    PHP is slotted, so it's not too unusual for multiple versions to be
    installed at the same time. An "emerge --depclean" may later remove
    the older one. But this alone is no cause for alarm.


    if i install roundcube with use="change-password" php-8.0.11 is needed.

    i used use="-imagemagick" for nextcloud, and
    all packages could agree on php-8.0.11.

    1.if an application requires 2 different versions this can't work,
    apache only uses one or?

    No, you're right. Whichever one you've eselected (if you're using
    apache's mod_php) is the one that will be used, and not all of the
    options will work with every installed PHP application. It doesn't
    make a ton of sense, but PHP is relatively stable these days. So, uh,
    good luck.


    2.if in the ebuild of dev-php/imagick-3.5.1
    USE_PHP="php7-3 php7-4 php8-0"
    what does that mean?

    C-language extensions like pecl-imagick are compiled against PHP. The
    USE_PHP variable declares which versions they may be compiled
    against. Then the user-facing variable PHP_TARGETS says which ones you
    want. What you ultimately get is the intersection of USE_PHP and
    PHP_TARGETS.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From zcampe@gmail.com@21:1/5 to Michael Orlitzky on Thu Oct 21 01:00:02 2021
    1 day, 1 emerge --sync, 1 update later: php-7.4 is additionally
    installed. for a php application i would expect that 1 php version is
    enough. but depending on the use flag this is not the case for
    nextcloud and roundcube, 2 versions are installed each.


    On Wed, 20 Oct 2021 15:44:27 -0400
    Michael Orlitzky <mjo@gentoo.org> wrote:

    On 2021-10-20 19:23:09, zcampe@gmail.com wrote:

    when i install nextcloud it also installs php-7.3.31 and php-7.4.24,
    this is probably due to dev-php/imagick-3.5.1


    PHP is slotted, so it's not too unusual for multiple versions to be
    installed at the same time. An "emerge --depclean" may later remove
    the older one. But this alone is no cause for alarm.


    if i install roundcube with use="change-password" php-8.0.11 is
    needed.

    i used use="-imagemagick" for nextcloud, and
    all packages could agree on php-8.0.11.

    1.if an application requires 2 different versions this can't work,
    apache only uses one or?

    No, you're right. Whichever one you've eselected (if you're using
    apache's mod_php) is the one that will be used, and not all of the
    options will work with every installed PHP application. It doesn't
    make a ton of sense, but PHP is relatively stable these days. So, uh,
    good luck.


    2.if in the ebuild of dev-php/imagick-3.5.1
    USE_PHP="php7-3 php7-4 php8-0"
    what does that mean?

    C-language extensions like pecl-imagick are compiled against PHP. The
    USE_PHP variable declares which versions they may be compiled
    against. Then the user-facing variable PHP_TARGETS says which ones you
    want. What you ultimately get is the intersection of USE_PHP and
    PHP_TARGETS.


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael Orlitzky@21:1/5 to zcampe@gmail.com on Thu Oct 21 02:00:02 2021
    On 2021-10-21 00:53:55, zcampe@gmail.com wrote:

    1 day, 1 emerge --sync, 1 update later: php-7.4 is additionally
    installed. for a php application i would expect that 1 php version is
    enough. but depending on the use flag this is not the case for
    nextcloud and roundcube, 2 versions are installed each.

    If some application pulls in dev-lang/php when 7.3 is stable, you'll
    get 7.3. Then if later php-7.4 is marked stable, 7.4 will also be
    installed, alongside the existing 7.3 that is probably no longer
    needed afterwards.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)