public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] php different version
@ 2021-10-20 17:23 zcampe
  2021-10-20 19:44 ` Michael Orlitzky
  0 siblings, 1 reply; 4+ messages in thread
From: zcampe @ 2021-10-20 17:23 UTC (permalink / raw
  To: Gentoo Users List

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user] php different version
  2021-10-20 17:23 [gentoo-user] php different version zcampe
@ 2021-10-20 19:44 ` Michael Orlitzky
  2021-10-20 22:53   ` zcampe
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Orlitzky @ 2021-10-20 19:44 UTC (permalink / raw
  To: gentoo-user

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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user] php different version
  2021-10-20 19:44 ` Michael Orlitzky
@ 2021-10-20 22:53   ` zcampe
  2021-10-20 23:53     ` Michael Orlitzky
  0 siblings, 1 reply; 4+ messages in thread
From: zcampe @ 2021-10-20 22:53 UTC (permalink / raw
  To: gentoo-user


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.
> 



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user] php different version
  2021-10-20 22:53   ` zcampe
@ 2021-10-20 23:53     ` Michael Orlitzky
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Orlitzky @ 2021-10-20 23:53 UTC (permalink / raw
  To: gentoo-user

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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-10-20 23:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-20 17:23 [gentoo-user] php different version zcampe
2021-10-20 19:44 ` Michael Orlitzky
2021-10-20 22:53   ` zcampe
2021-10-20 23:53     ` Michael Orlitzky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox