1

Debian 9 stretch introduced a mechanism for two PHP versions to co-exist on one server. This makes sense when newer applications demand PHP 7.x (in my case Yii 2.0.12) while others (older) require 5.x.

A similar question has been asked here, and answered "assuming ... to use php-fpm instead of Apache module". Now I want to continue using apache modules because of the experience with this setup, so other users and me don't want to switch to FPM.

Currently I have both php5-common and php7.1-common (plus related) packages installed. Apache serves PHP5, based on libapache2-mod-php5.

Now I installed:

apt-get install libapache2-mod-php7.1

which ended sucessfully but with the hint: "php5 module already enabled, not enabling PHP 7.1"

This sounds as if the two modules can only work exclusively.

I searched the debian docs but did not find hints on how to activate both and switch between them, per virtualhost. Same for the web, all howto's refer to FPM only.

Ed Doerr
  • 61
  • 5
  • use fpm with different ports – exussum Aug 24 '17 at 21:23
  • So it is not possible with apache-mod at all? – Ed Doerr Aug 25 '17 at 08:34
  • I have never run 2 differnt mod apaches at the same time. It could be possible but I dont know how – exussum Aug 25 '17 at 11:06
  • possible duplicate of https://stackoverflow.com/questions/46845963/running-two-php-versions-on-the-same-server-stretch and / or https://stackoverflow.com/questions/45033511/how-to-select-php-version-5-and-7-per-virtualhost-in-apache-2-4-on-debian – erwan Feb 01 '18 at 16:52

0 Answers0