I am trying to figure out what to do.

I have to pin my php version to php5.6+ on my server.

All is good in the world until I try to install aegir3. It wants me to download php5.

Here is what it looks like but I do have the 5.6 versions of all the requested modules enabled already:

sudo apt-get install aegir3
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  aegir3-hostmaster aegir3-provision libapache2-mod-php5 mysql-client php5
  php5-cli php5-common php5-gd php5-json php5-mysql php5-readline
Suggested packages:
  php5-user-cache
The following NEW packages will be installed:
  aegir3 aegir3-hostmaster aegir3-provision libapache2-mod-php5 mysql-client
  php5 php5-cli php5-common php5-gd php5-json php5-mysql php5-readline
0 upgraded, 12 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/5,188 kB of archives.
After this operation, 22.0 MB of additional disk space will be used.

1) can I have multiple php versions actually working under apache2? I have done this:

sudo a2dismod php5
Module php5 already disabled
~$ sudo a2enmod php5.6
Considering dependency mpm_prefork for php5.6:
Considering conflict mpm_event for mpm_prefork:
Considering conflict mpm_worker for mpm_prefork:
Module mpm_prefork already enabled
Considering conflict php5 for php5.6:
Module php5.6 already enabled
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

SocialNicheGuru created an issue. See original summary.

bgm’s picture

Category: Bug report » Feature request
Status: Active » Needs review
FileSize
2.66 KB

Is this Ubuntu 16.04 ? Ondrej's PPA for packages of older PHP versions ?

Aegir currently supports the version of PHP officially supported by Ubuntu 16.04, which is PHP 7.

Depends: debconf (>= 0.5) | debconf-2.0, php5-mysql | php7.0-mysql, php5-gd | php7.0-gd, apache2 | nginx, libapache2-mod-php5 | libapache2-mod-php7.0 | php5-fpm | php7.0-fpm, aegir3-provision (>= 3.7), git-core, unzip, lsb-base (>= 3.0-6)
Recommends: php5 | php7.0

I suspect the Debian control file will need the attached patch. However, I have no way to test this.

Can you test using the following instructions?
http://docs.aegirproject.org/en/3.x/community/release-process/debian-pac...

helmo’s picture

Title: Ubuntu aegir install does not support php5.6 » Support custom php version packages
Status: Needs review » Needs work

I'm hesitant to add this ... now it's 5.6 but what's next .... special packages for 5.7, 7.1, 7.2 8.*

That list would become hard to maintain.

Isn't there a meta package we can depend on that the ppa also offers?

Alternatively there are ways to create a dummy package for the dependencies yourself to make this work.

SocialNicheGuru’s picture

ok. I figured it out.

I downlaoded provision 3.8
cd /var/aegir/.drush/
mv /var/aegir/.drush/provision /var/aegir/.drush/provision-11-7-16
wget https://ftp.drupal.org/files/projects/provision-7.x-3.8.tar.gz
wget https://www.drupal.org/files/issues/0001-Issue-2791095-Add-support-for-PHP5.6-on-Ubuntu-16.04.patch
git apply 0001-Issue-2791095-Add-support-for-PHP5.6-on-Ubuntu-16.04.patch
drush hostmaster-migrate hostmaster /var/aegir/hostmaster-<date>
helmo’s picture

I don't see how applying that patch helps in #4. After applying it you'd need to build new Debian packages for it to have any effect.

You've effectively done a manual upgrade ... :) I think Debian will still complain.

SocialNicheGuru’s picture

and the patch is not right.
it still has php5-mysql instead of php5.6-mysql

Edit: delete last comment

NWOM’s picture

PHP 7.1 is also now officially released, which currently does not work with Aegir3. #3 sounds like a good option:

Isn't there a meta package we can depend on that the ppa also offers?
helmo’s picture

I haven't been able to find a suitable meta package.

This issue seems to be related ... https://github.com/gplessis/dotdeb-php/issues/102

Maybe you their ask his advise on how to handle this.

NWOM’s picture

Just as a workaround, here is a new patch for both provision and hostmaster for php7.2, php5.x-mysqlnd, and php7.x-mysqlnd support.

NWOM’s picture

Title: Support custom php version packages » Support php5.6, php7.2 and phpx.x-mysqlnd packages
NWOM’s picture

FileSize
4.95 KB

Here is a new patch that includes the php socket changes for both php7.1 and php7.2. It also appears I had forgotten to add php5.6 from the previous patch into my patch.

  • colan committed 5f96acb on 7.x-3.x
    Issue #2791095 by NWOM, bgm, colan: Allow for dynamic PHP 7 socket file...
colan’s picture

Status: Needs work » Needs review

Thanks for working on this, but there are some problems with #11:

  • It doesn't apply cleanly because it conflicts with #2951662: Support Ubuntu Bionic 18.04. The Debian packaging was already updated for PHP 7.2.
  • The PHP 7 socket files are hard-coded; this isn't very sustainable.
  • If multiple socket files are available, the oldest one will be used. It's better to grab the newest one.

My commit handles these issues. You still deserve credit though; don't worry. ;)

What's missing is the php5.6 addition from above. Do we still need that? If so, please provide a patch.

NWOM’s picture

Thanks for updating the patch. Yeah, I wasn't a fan of hard coding it either, but since I don't know PHP, it was the best I could do by using other pieces of code as a reference :P

My patch also updated the package to contain php*-mysqlnd. Has this been updated as well?

colan’s picture

Good catch! I missed that entirely as I didn't even know about it.

Yes, would be good to add support for that (and php5.6 if we still need it) as well.

NWOM’s picture

Yeah, php*-mysqlnd works great with Asynchronous Prefetch Database Query Cache. Should a new patch be created in this issue, or are you guys committing it in a different way?

colan’s picture

I'm fine with doing it here as it should just be a one or two line change.

helmo’s picture

Status: Needs review » Needs work
helmo’s picture

Status: Needs work » Fixed

After discussing in IRC this seems fixed with the exception of phpx.x-mysqlnd

It would be better to create a new issue to focus on that... however I don't see php7 related mysqlnd packages in Debian. Is this still relevant?

NWOM’s picture

@helmo I've been working on other projects as of late, so that is fine. I'll try and whip up a new patch in a new issue soon, once I go back to that original project.

@colan Thanks for committing the rest. :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.