Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#2 | provision-allow_php7_deb_packages-2715599-2.patch | 2.53 KB | colan |
Comments
Comment #2
colanHere'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.
Comment #3
omega8cc CreditAttribution: omega8cc commentedThis 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.
Comment #4
omega8cc CreditAttribution: omega8cc commentedChanging back to Provision queue, because the patch belongs to Provision, even if the issue is about Hostmaster.
Comment #5
colan@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:
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.
Comment #6
omega8cc CreditAttribution: omega8cc commentedI 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.
Comment #7
helmo CreditAttribution: helmo at Initfour websolutions commentedPatch 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.
Comment #8
helmo CreditAttribution: helmo at Initfour websolutions commentedI 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 :(
Comment #9
colan@omega8cc: That makes sense. Sorry, I thought you were downplaying the issue.
Comment #10
ergonlogicWe 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.
Comment #12
helmo CreditAttribution: helmo at Initfour websolutions commentedThe issue I had booting the vagrant 16.04 box is a known issue... https://github.com/mitchellh/vagrant/issues/7155
Manual workaround:
Then I get this error from the installer:
Looks like we're missing the 'php-xml' package ... but manually adding it did not help
Comment #13
colanShouldn't it be "php7.0-xml"? Try that one instead as they're both in the repo.
Comment #14
helmo CreditAttribution: helmo at Initfour websolutions commentedphp-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
Comment #16
helmo CreditAttribution: helmo at Initfour websolutions commentedI'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.
Comment #17
helmo CreditAttribution: helmo at Initfour websolutions commentedPlease re-open or create a new issue if you run into problems with php7.