Phabricator fails to run with PHP 5.6 on a server with multiple PHP versions

Hello Phabricator community,

I have my phabricator installed on a machine that runs Centos7 and Apache httpd-2.4.6-88.el7.centos.x86_64.
The server has both PHP 5.6 and PHP 7.2 installed.

I need PHP 7.2 on the server since some websites cannot run with PHP 5.6.
When visiting my phabricator website, I get “PHP 7 Not Supported” error:

I installed PHP 5.6, with fast-cgi, and when I made it as a default PHP, phabricator worked, but I need PHP 7.2 to be the default PHP on the server, and phabricator run with php5.6.

This is my httpd.conf VirtualHost:

<Directory /var/www/html/my_phabricator/phabricator/webroot/>

< VirtualHost :80 >
ServerName http://myphab.domain.com
ServerAlias myphab.domain.com
DocumentRoot /var/www/html/my_phabricator/phabricator/webroot/
RewriteEngine on
#RewriteBase /
RewriteRule ^/rsrc/(.
) - [L,QSA]
RewriteRule ^/favicon.ico - [L,QSA]
RewriteRule ^/php5-fcgi - [L]
RewriteRule ^(.*)$ /index.php?path=$1 [B,L,QSA]
< /VirtualHost>
Include /etc/httpd/conf/httpd-phabricator.conf

How can I make phabricator work with PHP5.6 on a server with default PHP, 7.2 ???

What version of Phabricator are you running?

1 Like

Thank you for your answer. Sorry for not including this information but I cannot access my page to check it.
In my phabricator forder, I run

git show

and I get this information:

    commit 1afd8cbe0e0c7e1e66128658cf193f97e2fc7edc
        Author: Chad Little <chad@phacility.com>
        Date:   Sun Sep 18 18:16:58 2016 -0400

Remove old kdb CSS

Summary: Fixes T11654

Test Plan: Hit ? on home / differential

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T11654

Differential Revision: https://secure.phabricator.com/D16568

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
index ca33f2d..d4fd464 100644
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -9,7 +9,7 @@ return array(
   'names' => array(
 'conpherence.pkg.css' => '80a3fcb3',
 'conpherence.pkg.js' => '89b4837e',
-    'core.pkg.css' => '476e9330',
+    'core.pkg.css' => 'eb1298d4',
 'core.pkg.js' => '1d376fa9',
 'darkconsole.pkg.js' => 'e7393ebb',
 'differential.pkg.css' => '3fb7f532',
@@ -38,7 +38,7 @@ return array(
 'rsrc/css/application/base/notification-menu.css' => 'b3ab500d',
 'rsrc/css/application/base/phabricator-application-launch-view.css' => '95351601',
 'rsrc/css/application/base/phui-theme.css' => '027ba77e',
-    'rsrc/css/application/base/standard-page-view.css' => '2b592894',
+    'rsrc/css/application/base/standard-page-view.css' => '3026770e',
 'rsrc/css/application/chatlog/chatlog.css' => 'd295b020',
 'rsrc/css/application/conduit/conduit-api.css' => '7bc725c4',
 'rsrc/css/application/config/config-options.css' => '0ede4c9b',
@@ -869,7 +869,7 @@ return array(
 'phabricator-shaped-request' => '7cbe244b',
 'phabricator-slowvote-css' => 'a94b7230',
 'phabricator-source-code-view-css' => 'cbeef983',
-    'phabricator-standard-page-view' => '2b592894',
+    'phabricator-standard-page-view' => '3026770e',
 'phabricator-textareautils' => '320810c8',
 'phabricator-title' => 'df5e11d2',
 'phabricator-tooltip' => '6323f942',
diff --git a/webroot/rsrc/css/application/base/standard-page-view.css b/webroot/rsrc/css/application/base/standard-page-view.css
index e5d50dc..43215df 100644
--- a/webroot/rsrc/css/application/base/standard-page-view.css
+++ b/webroot/rsrc/css/application/base/standard-page-view.css
@@ -56,14 +56,6 @@ body.white-background {
   color: {$greytext};
 }

-.keyboard-shortcut-help kbd {
-  background: #222222;
-  padding: 6px;

I hope this helps.

Your version of Phabricator is more than two years out of date (September 2016). PHP 7.2 is supported by modern Phabricator (since January 2017), so the easiest fix is probably to upgrade Phabricator.

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

If you don’t want to upgrade Phabricator, this is not a supported configuration and outside of the scope of things we can help you with. A cursory googling suggests that there may be no way to load multiple versions of PHP as distinct Apache modules, although you can load them as FCGI and proxy requests separately. Conceivably, you could also run two servers and have one proxy requests to the other, or put a smart LB in front of two Apache processes and have it route requests. In either case, this setup is likely very complex.

1 Like

I am trying to upgrade my phabricator now.
I followed all the steps from here: https://secure.phabricator.com/book/phabricator/article/upgrading/

When I try to run this command:
./bin/storage upgrade

I get this error:

[2019-03-19 19:09:55] EXCEPTION: (Error) Call to undefined method PhabricatorDatabaseRef::getMasterDatabaseRef() at [<phabricator>/bin/storage:110]
arcanist(head=stable, ref.master=9e82ef979e81, ref.stable=4d22e0f89f10), phabricator(head=stable, ref.master=1afd8cbe0e0c, ref.stable=79d2a57b7d70, custom=1), phutil(head=stable, ref.master=fa6519f4cea1, ref.stable=564c7b305974)

I googled it a bit, but I find nothing similar.

ref.stable=79d2a57b7d70

This is not an upstream commit.

$ git show 79d2a57b7d70
fatal: ambiguous argument '79d2a57b7d70': unknown revision or path not in the working tree.
1 Like

Okay.
I will go back to my previous version and try to upgrade again.

I must have done something wrong when git pull because of conflict errors

Thank you very much for your help.
I retried upgrading my phabrigator and now everything works fine!

Just need to resolve some issues, but most of the work is done!

Thank you, again, for taking the time to guide me on this!