Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #189547 > unrolled thread

Re: Upgraded to stretch but apache2 still uses php5

Started by"x9p" <debian@x9p.org>
First post2017-12-04 13:00 +0100
Last post2017-12-04 22:30 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.debian.user


Contents

  Re: Upgraded to stretch but apache2 still uses php5 "x9p" <debian@x9p.org> - 2017-12-04 13:00 +0100
    Re: Upgraded to stretch but apache2 still uses php5 Rick Macdonald <rickmacd@shaw.ca> - 2017-12-04 22:30 +0100

#189547 — Re: Upgraded to stretch but apache2 still uses php5

From"x9p" <debian@x9p.org>
Date2017-12-04 13:00 +0100
SubjectRe: Upgraded to stretch but apache2 still uses php5
Message-ID<uSXzI-4oD-17@gated-at.bofh.it>
The downside of upgrading php5 -> php7 is.. some apps can break. Still,
there are some workarounds to make them work with php7 (most of cases).

check if you have libapache2-mod-php7.0 installed. remove/purge any other
previous versions of this package and restart apache2.

after that, check if there is still something there with:

# egrep -rs php5 /etc/apache2/

also in hole system:

dpkg -l | egrep php5

If so, repeat process of upgrade the packages, restart apache2

PS: Assuming your apps works with php7

cheers.

x9p

> I thought I'd try a better webmail than squirrelmail, so I tried to
install roundcube. After many hours I gave up (missing php pdo modules),
purged it all, and then tried a non-debian package: rainloop. I spent
may hours with it, trying to solve missing php curl modules.
> What had me going in circles in both cases was that php was telling me
that the missing modules were in fact there.
> I finally realized that the php cli is v7.0, whereas apache2 runs runs
with php5. There are all sorts of apache2 config files for php7 but
apache2 is still using php5. php7 has the pdo and curl modules, but I
think the php5 modules were uninstalled during the upgrade to stretch. I
don't know if it is intentional that the apache2 environment didn't
change to the newer php7? If it should be using php7, how do I go about
forcing the change, and is there any downside to doing this?
> Regards,
> Rick

[toc] | [next] | [standalone]


#189563

FromRick Macdonald <rickmacd@shaw.ca>
Date2017-12-04 22:30 +0100
Message-ID<uT6tk-1Je-9@gated-at.bofh.it>
In reply to#189547

[Multipart message — attachments visible in raw view] — view raw

On 04/12/17 04:51 AM, x9p wrote:
> The downside of upgrading php5 -> php7 is.. some apps can break. Still,
> there are some workarounds to make them work with php7 (most of cases).
>
> check if you have libapache2-mod-php7.0 installed. remove/purge any other
> previous versions of this package and restart apache2.

I had both installed:

# dpkg --get-selections |grep libapache2-mod-php
libapache2-mod-php5                             install
libapache2-mod-php7.0                           install

>
> after that, check if there is still something there with:
>
> # egrep -rs php5 /etc/apache2/
# egrep -rs php5 /etc/apache2/
/etc/apache2/mods-available/php7.0.load:# Conflicts: php5
/etc/apache2/mods-available/php5.load:LoadModule php5_module 
/usr/lib/apache2/modules/libphp5.so

It didn't seem necessary to uninstall any php5, so I did this:

  # a2dismod php5
  # a2enmod php7.0
  # systemctl restart apache2

Now apache2 is using php7.0, and the apps that I checked all seem to 
work. I re-installed roundcube and installed the missing dependency 
php-net-idna2 ( https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=866895 
) and now roundcube works!

Just curious, should the upgrade to stretch have done this for me or is 
it known that this switch is to be done manually?

Thanks for the help!

Rick

> also in hole system:
>
> dpkg -l | egrep php5
>
> If so, repeat process of upgrade the packages, restart apache2
>
> PS: Assuming your apps works with php7
>
> cheers.
>
> x9p
>
>> I thought I'd try a better webmail than squirrelmail, so I tried to
> install roundcube. After many hours I gave up (missing php pdo modules),
> purged it all, and then tried a non-debian package: rainloop. I spent
> may hours with it, trying to solve missing php curl modules.
>> What had me going in circles in both cases was that php was telling me
> that the missing modules were in fact there.
>> I finally realized that the php cli is v7.0, whereas apache2 runs runs
> with php5. There are all sorts of apache2 config files for php7 but
> apache2 is still using php5. php7 has the pdo and curl modules, but I
> think the php5 modules were uninstalled during the upgrade to stretch. I
> don't know if it is intentional that the apache2 environment didn't
> change to the newer php7? If it should be using php7, how do I go about
> forcing the change, and is there any downside to doing this?
>> Regards,
>> Rick
>
>
>
>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web