Page MenuHomePhabricator

Phabricator doesn't run with PHP 7.0 (default on Stretch)
Closed, DeclinedPublic

Description

See https://secure.phabricator.com/T12101

There are several uses of pcntl_signal and register_tick_function in Phabricator's codebase which upstream has decided make PHP 7.0 unusable as a runtime.

For local test deploys this quick hack at least gets the core web app running:

diff --git i/src/applications/config/check/PhabricatorPHPPreflightSetupCheck.php w/src/applications/config/check/PhabricatorPHPPreflightSetupCheck.php
index 7c9653f4f..281ba8f5e 100644
--- i/src/applications/config/check/PhabricatorPHPPreflightSetupCheck.php
+++ w/src/applications/config/check/PhabricatorPHPPreflightSetupCheck.php
@@ -11,6 +11,7 @@ final class PhabricatorPHPPreflightSetupCheck extends PhabricatorSetupCheck {
   }

   protected function executeChecks() {
+/* https://secure.phabricator.com/T12101
     if (version_compare(phpversion(), 7, '>=') &&
         version_compare(phpversion(), 7.1, '<')) {
       $message = pht(
@@ -28,7 +29,7 @@ final class PhabricatorPHPPreflightSetupCheck extends PhabricatorSetupCheck {

       return;
     }
-
+*/
     $safe_mode = ini_get('safe_mode');
     if ($safe_mode) {
       $message = pht(

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

But then the PHD service won’t work as it uses a php 7.1+ function.

I guess we could use one of those pp repos (third party for this).

When using a pp for 7.2 then enabling the phabricator module, vagrant provision fails:

==> default: Error: /usr/local/bin/mwscript createAndPromote.php --wiki='wiki' 'Admin' 'vagrant' returned 255 instead of one of [0]
==> default: Error: /Stage[main]/Mediawiki/Mediawiki::User[admin_user_in_steward_suppress_on_wiki]/Mediawiki::Maintenance[mediawiki_user_Admin_wiki]/Exec[mediawiki_user_Admin_wiki]/returns: change from notrun to 0 failed: /usr/local/bin/mwscript createAndPromote.php --wiki='wiki' 'Admin' 'vagrant' returned 255 instead of one of [0]

When using a pp for 7.2 then enabling the phabricator module, vagrant provision fails:

Unfortunately the default Puppet error reporting does not tell us what is actually causing the failure. If you run vagrant ssh -- /usr/local/bin/mwscript createAndPromote.php --wiki='wiki' 'Admin' 'vagrant' you may get a better error message directly from the maintenance script. My guess is that either you are missing a required PHP extension or that there is some other configuration issue blocking your initial deployment.

Since both production and Vagrant have PHP 7.2 now, this can be closed?

Since both production and Vagrant have PHP 7.2 now, this can be closed?

Yeah. The reported issue is still technical true, but hopefully not a big blocker for Wikimedia folks.