Follow-up to #2704303: META: PHP 7 Support .

After setting up a Web server with PHP 7 on Ubuntu 16.04:

sudo apt install nginx php7.0-cli php7.0-mysql php7.0-fpm php7.0-gd php-pear mariadb-client

I tried:

colan@dev.example.com[Thu 28 16:36]% sudo apt install aegir3                                                                                             
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 aegir3 : Depends: aegir3-provision (>= 3.4) but it is not going to be installed
          Depends: aegir3-hostmaster (>= 3.4) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
colan@dev.example.com[Thu 28 16:38]% sudo apt install aegir3 aegir3-provision aegir3-hostmaster                                                          
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 aegir3-hostmaster : Depends: php5-mysql but it is not installable
                     Depends: php5-gd but it is not installable
                     Depends: libapache2-mod-php5 but it is not installable or
                              php5-fpm but it is not installable
                     Recommends: php5 but it is not installable
 aegir3-provision : Depends: php5-cli (>= 5.3) but it is not installable
                    Depends: php5-mysql but it is not installable
E: Unable to correct problems, you have held broken packages.
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

colan created an issue. See original summary.

colan’s picture

Status: Active » Needs review
FileSize
2.53 KB

Here's a patch.

Haven't looked into how I could build/test this myself yet. Any pointers on how to do so would be appreciated.

All I did was replace each of the PHP 5 package names with the package name ORed with the PHP 7 version.

omega8cc’s picture

Title: Debian package aegir3 fails to install with PHP 7 » Add experimental support for PHP 7
Project: Provision » Hostmaster (Aegir)
Category: Bug report » Feature request
Priority: Critical » Normal
Issue tags: -aegir, -provision +ubuntu

This is expected, because Ubuntu 16.04 doesn't support Drupal 7 (yet), because Drupal 7 doesn't support PHP 7, so switching packages to use PHP 7 will not solve the problem. It is not Aegir specific.

For more details please check:

https://wiki.ubuntu.com/XenialXerus/ReleaseNotes
https://www.drupal.org/node/2656548#comment-11121273

The patch will be useful for testing/debugging only at this stage.

omega8cc’s picture

Project: Hostmaster (Aegir) » Provision

Changing back to Provision queue, because the patch belongs to Provision, even if the issue is about Hostmaster.

colan’s picture

@omega8cc: I believe you've confusing Drupal 7 (the application) with drupal7 (the Debian package). It's not necessary to run Drupal via the Debian package on Ubuntu. It's not officially supported, and I've never used it. (I've been doing this for 10 years.) Canonical is talking about the Debian package specifically. I let them know that it's generally not used when Nish@Canonical asked me to help with testing. Drupal 7, the application, is mostly working however.

If we allow PHP 7 Debian packages to be used, we can do 2 things:

  • Help with Drupal core issues that aren't finished yet. Most of them are green (RTBC, reviewed and tested by the community just waiting to be committed), and there are a couple of others that are yellow (need review).
  • Start figuring out what works with our Debian package, and what doesn't so we can start working on those issues. This isn't possible until we allow the PHP 7 packages.

The Drupal core issues will most likely get into the next release, or if not that one, the next one.

In any event, this is an Aegir-specific issue because even when the core issues get fixed, this still won't be installable as a Debian package. That's actually the issue here, irrespective of what's going on in Drupal 7 (the application). As we find more Aegir-specific issues after that, we can attach those to this parent tracker as well.

omega8cc’s picture

I don't think that I confuse anything here. I just provide a proof (well known) that Drupal 7 (core, not Aegir, so it is not Aegir specific problem) doesn't work with PHP 7. I know that Aegir 3 doesn't work with PHP 7, because we have added PHP 7 in BOA already, so we could test it. That is also why I support adding the patch proposed here, just not sure if it belongs to 7.x-3.x or 7.x-4.x

Supporting PHP 7 in Aegir is thus a feature request, not a bug report, so the patch doesn't fix any bug, but is required to test new feature, even if it will not work initially.

helmo’s picture

Patch looks good, the packages build fine locally.

I tried testing but 16.04 in vagrant virtualbox 5.0.20 is running really slow, booting took > 2 min. and mounting vboxfs failed on missing drivers.

helmo’s picture

I added a Jenkins test bases on code in
http://cgit.drupalcode.org/puppet-aegir/tree/tests/functional_tests/aegi...

The box is failing to start though :(

colan’s picture

@omega8cc: That makes sense. Sorry, I thought you were downplaying the issue.

ergonlogic’s picture

Title: Add experimental support for PHP 7 » Support PHP 7 in Debian package
Status: Needs review » Postponed

We have #2704303: META: PHP 7 Support to track overall efforts to support PHP7. Let's keep this issue focused on the Debian packaging aspects, and create (and link) additional issues, for anything more specific that needs to happen in our PHP code.

I'm all for helping Drupal 7 core and Drush support PHP 7, but I don't think there's too much we can accomplish in Aegir until those are fixed. So, I'm setting this issue to 'postponed'. Feel free to change that, if I've missed something.

  • helmo committed 70e3618 on 7.x-3.x authored by colan
    Issue #2715599 by colan: Add experimental support for PHP 7
    
helmo’s picture

Issue tags: +Aegir 3.5

The issue I had booting the vagrant 16.04 box is a known issue... https://github.com/mitchellh/vagrant/issues/7155

Manual workaround:

$ vagrant up
$ vagrant ssh

# In the vm
sudo su -c 'echo "127.0.1.1 ubuntu-xenial" > /etc/hosts'

$ quit  # to exit the vm.
$ vagrant provision

Then I get this error from the installer:

Array                                                                    [debug]
(
    [DRUSH_NOT_COMPLETED] => Array
        (
            [0] => Drush command terminated abnormally due to an
unrecoverable error.
Error: Uncaught Error: Call to undefined function
Drush\UpdateService\simplexml_load_file() in
phar:///usr/local/bin/drush/lib/Drush/UpdateService/Project.php:74
Stack trace:
#0
phar:///usr/local/bin/drush/lib/Drush/UpdateService/ReleaseInfo.php(64):
Drush\UpdateService\Project::getInstance(Array, 86400)
#1
phar:///usr/local/bin/drush/lib/Drush/UpdateService/ReleaseInfo.php(122):
Drush\UpdateService\ReleaseInfo->get(Array)
#2 phar:///usr/local/bin/drush/commands/make/make.drush.inc(528):
Drush\UpdateService\ReleaseInfo->selectReleaseBasedOnStrategy(Array,
'', 'ignore')
#3 phar:///usr/local/bin/drush/commands/make/make.drush.inc(563):
make_prepare_projects(false, Array, 'sites/all',
'/var/aegir/host...', '/usr/share/drus...')
#4 phar:///usr/local/bin/drush/commands/make/make.drush.inc(317):
make_projects(false, 'sites/all', Array, '/var/aegir/host...',
'/usr/share/drus...')
#5 phar:///usr/local/bin/drush/includes/command.inc(366):
drush_make('/usr/share/drus...', '/var/aegir/host...')
#6 phar:///usr/local/bin/drush/i in
phar:///usr/local/bin/drush/lib/Drush/UpdateService/Project.php, line
74
        )

    [DRUSH_APPLICATION_ERROR] => Array
        (
            [0] => The external command could not be executed due to
an application error.
        )

    [DRUSH_MAKE_FAILED] => Array
        (
            [0] => Could not download platform using drush make. No
platform present
        )

)

Looks like we're missing the 'php-xml' package ... but manually adding it did not help

colan’s picture

Shouldn't it be "php7.0-xml"? Try that one instead as they're both in the repo.

helmo’s picture

php-xml depends on php7.0-xml so that gets pulled in anyway.

However we can't add them as a dependency ... they do not exist as separate packages in php 5.x

  • helmo committed c7a38f8 on 7.x-3.x
    Issue #2715599 by colan, helmo: Support PHP 7 in Debian package
    
helmo’s picture

Status: Postponed » Needs review

I've fixed this by adding php5 | php7.0-xml to the Depends line.

#2792723: Install fails on enabling hosting-queued daemon vanilla 16.04 LTS Server is probably a duplicate of this.

helmo’s picture

Status: Needs review » Fixed

Please re-open or create a new issue if you run into problems with php7.

Status: Fixed » Closed (fixed)

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