Installation Phabricator with PHP 7.2


#1

Dear community,

I was try install Phabricator executing your script code for Ubuntu in your Installation Guide.

I have this configurations settings:


Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial


The execution of this script in Install Guide of Phabricator, return me this answers:

“
PHABRICATOR UBUNTU INSTALL SCRIPT
This script will install Phabricator and all of its core dependencies.
Run it from the directory you want to install into.

Phabricator will be installed to: /root.
Press RETURN to continue, or ^C to cancel.

Testing sudo...
Installing dependencies: git, apache, mysql, php...

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package php5 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package php5-cli is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  php7.0-cli:i386 php7.0-cli

Package php5-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package php5-gd is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package php-apc is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'php5' has no installation candidate
E: Unable to locate package php5-mysqlnd
E: Package 'php5-gd' has no installation candidate
E: Package 'php5-dev' has no installation candidate
E: Unable to locate package php5-curl
E: Package 'php-apc' has no installation candidate
E: Package 'php5-cli' has no installation candidate
E: Unable to locate package php5-json
sudo: a2enmod: command not found
./phabinstall.sh: line 53: php: command not found
./phabinstall.sh: line 54: [: !=: unary operator expected
pcntl already installed
./phabinstall.sh: line 67: git: command not found
./phabinstall.sh: line 74: git: command not found
./phabinstall.sh: line 81: git: command not found


Install probably worked mostly correctly. Continue with the 'Configuration Guide':

    https://secure.phabricator.com/book/phabricator/article/configuration_guide/

You can delete any php5-* stuff that's left over in this directory if you want.”

How the system suggests install the PHP 7, I installed the this version:

----------------------------------------------------------------------------------------------------------------------------

PHP 7.2.4-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Apr  5 2018 08:53:57) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.4-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies

-----------------------------------------------------------------------------------------------------------------------

I continued with Phabricator installation:

$ mkdir /var/www/html/test 

$ cd /var/www/html/test/

$ git clone https://github.com/phacility/libphutil.git

$ git clone https://github.com/phacility/arcanist.git

$ git clone https://github.com/phacility/phabricator.git

$ chown -R www-data:www-data /var/www/html/test/

$  cd phabricator/

$ ./bin/config set mysql.host localhost

Set 'mysql.host' in local configuration.

$ ./bin/config set mysql.user root

Set 'mysql.user' in local configuration.

$ ./bin/config set mysql.pass toor

Set 'mysql.pass' in local configuration.

And in this stage that message appears:

$ ./bin/storage upgrade --user root --password toor

[2018-04-19 17:35:11] EXCEPTION: (Exception) About to call mysql_connect(), but the PHP MySQL extension is not available! at [<phutil>/src/aphront/storage/connection/mysql/AphrontMySQLDatabaseConnection.php:33]
arcanist(head=master, ref.master=73f5afd44110), phabricator(head=master, ref.master=a817aa6c7171), phutil(head=master, ref.master=20eff1c8d14f)
  #0 AphrontMySQLDatabaseConnection::connect() called at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:101]
  #1 AphrontBaseMySQLDatabaseConnection::establishConnection() called at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:124]
  #2 AphrontBaseMySQLDatabaseConnection::requireConnection() called at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:160]
  #3 AphrontBaseMySQLDatabaseConnection::executeRawQuery(string) called at [<phutil>/src/xsprintf/queryfx.php:8]
  #4 queryfx(AphrontMySQLDatabaseConnection, string) called at [<phabricator>/scripts/sql/manage_storage.php:162]

Apache Version:

Server version: Apache/2.4.18 (Ubuntu)
Server built: 2017-09-18T15:09:02

–---------------------------------------------------------------------------------------------------------------------

Mysql version:

mysql Ver 14.14 Distrib 5.7.21, for Linux (x86_64) using EditLine wrapper


I am not sure if this is a version incompatibility or something else? Any advice here would be appreciated

Thanks.


#2

Which installation instructions are you following? The next step after cloning the code is supposed to be “set up apache to serve Phabricator”, not “update database”.

Once you set up apache, navigate to your install - you should see a page describing the issue (no php-mysql) and how to fix it (And other guidance about what to do next).


#3

Hi,

I tried follow this instructions of installation:

I followed your advice and setup apache to serve Phabricator after cloning the code. A this did’t happen again, but this appeared:


root@ubuntu:/var/www/html/test/phabricator# ./bin/storage upgrade --user root --password toor

MySQL Credentials Not Configured

Unable to connect to MySQL using the configured credentials. You must configure standard credentials before you can upgrade storage. Run these commands to set up credentials:

phabricator/ ./bin/config set mysql.host __host__ phabricator/ ./bin/config set mysql.user username
phabricator/ $ ./bin/config set mysql.pass password

These standard credentials are separate from any administrative credentials
provided to this command with –user or –password, and must be
configured correctly before you can proceed.

Raw MySQL Error: #1045: Access denied for user ‘root’@‘localhost’ (using
password: YES)

root@ubuntu:/var/www/html/test/phabricator# ./bin/config set mysql.host localhost
Set ‘mysql.host’ in local configuration.

root@ubuntu:/var/www/html/test/phabricator# ./bin/config set mysql.user root
Set ‘mysql.user’ in local configuration.

root@ubuntu:/var/www/html/test/phabricator# ./bin/config set mysql.pass toor
Set ‘mysql.pass’ in local configuration.

And this appeared again:


root@ubuntu:/var/www/html/test/phabricator# ./bin/storage upgrade --user root --password toor
MySQL Credentials Not Configured

Unable to connect to MySQL using the configured credentials. You must
configure standard credentials before you can upgrade storage. Run these
commands to set up credentials:

phabricator/ ./bin/config set mysql.host __host__ phabricator/ ./bin/config set mysql.user username
phabricator/ $ ./bin/config set mysql.pass password

These standard credentials are separate from any administrative credentials
provided to this command with –user or –password, and must be
configured correctly before you can proceed.

Raw MySQL Error: #1045: Access denied for user ‘root’@‘localhost’ (using
password: YES)


I choiced uninstall MySql and install Mariadb.


root@ubuntu:~# mysql -v

Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 32
Server version: 10.0.34-MariaDB-0ubuntu0.16.04.1 Ubuntu 16.04

Copyright © 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Reading history-file /root/.mysql_history
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

MariaDB [(none)]>


With MariaDB I was able to complete the other stages of installation of the Phabricator:


root@ubuntu:~# cd phabricator/

root@ubuntu:~/phabricator# ./bin/storage upgrade --user root --password toor

Before running storage upgrades, you should take down the Phabricator web
interface and stop any running Phabricator daemons (you can disable this
warning with --force).

Are you ready to continue? [y/N] y

Loading quickstart template onto “localhost”…
Applying patch “phabricator:20170914.ref.01.position.sql” to host “localhost”…
Applying patch “phabricator:20170915.ref.01.migrate.php” to host “localhost”…
Applying patch “phabricator:20170915.ref.02.drop.id.sql” to host “localhost”…
Applying patch “phabricator:20170915.ref.03.drop.closed.sql” to host “localhost”…
Applying patch “phabricator:20170915.ref.04.uniq.sql” to host “localhost”…
Applying patch “phabricator:20170918.ref.01.position.php” to host “localhost”…
Applying patch “phabricator:20171002.cngram.01.maniphest.sql” to host “localhost”…
Applying patch “phabricator:20171002.cngram.02.event.sql” to host “localhost”…
Applying patch “phabricator:20171002.cngram.03.revision.sql” to host “localhost”…
Applying patch “phabricator:20171002.cngram.04.fund.sql” to host “localhost”…
Applying patch “phabricator:20171002.cngram.05.owners.sql” to host “localhost”…
Applying patch “phabricator:20171002.cngram.06.passphrase.sql” to host “localhost”…
Applying patch “phabricator:20171002.cngram.07.blog.sql” to host “localhost”…
Applying patch “phabricator:20171002.cngram.08.post.sql” to host “localhost”…
Applying patch “phabricator:20171002.cngram.09.pholio.sql” to host “localhost”…
Applying patch “phabricator:20171002.cngram.10.phriction.sql” to host “localhost”…
Applying patch “phabricator:20171002.cngram.11.project.sql” to host “localhost”…
Applying patch “phabricator:20171002.cngram.12.user.sql” to host “localhost”…
Applying patch “phabricator:20171002.cngram.13.repository.sql” to host “localhost”…
Applying patch “phabricator:20171002.cngram.14.commit.sql” to host “localhost”…
Applying patch “phabricator:20171026.ferret.01.ponder.doc.sql” to host “localhost”…
Applying patch “phabricator:20171026.ferret.02.ponder.field.sql” to host “localhost”…
Applying patch “phabricator:20171026.ferret.03.ponder.ngrams.sql” to host “localhost”…
Applying patch “phabricator:20171026.ferret.04.ponder.cngrams.sql” to host “localhost”…
Applying patch “phabricator:20171026.ferret.05.ponder.index.php” to host “localhost”…
Applying patch “phabricator:20171101.diff.01.active.sql” to host “localhost”…
Applying patch “phabricator:20171101.diff.02.populate.php” to host “localhost”…
Applying patch “phabricator:20180119.bulk.01.silent.sql” to host “localhost”…
Applying patch “phabricator:20180120.auth.01.password.sql” to host “localhost”…
Applying patch “phabricator:20180120.auth.02.passwordxaction.sql” to host “localhost”…
Applying patch “phabricator:20180120.auth.03.vcsdata.sql” to host “localhost”…
Applying patch “phabricator:20180120.auth.04.vcsphid.php” to host “localhost”…
Applying patch “phabricator:20180121.auth.01.vcsnuke.sql” to host “localhost”…
Applying patch “phabricator:20180121.auth.02.passsalt.sql” to host “localhost”…
Applying patch “phabricator:20180121.auth.03.accountdata.sql” to host “localhost”…
Applying patch “phabricator:20180121.auth.04.accountphid.php” to host “localhost”…
Applying patch “phabricator:20180121.auth.05.accountnuke.sql” to host “localhost”…
Applying patch “phabricator:20180121.auth.06.legacydigest.sql” to host “localhost”…
Applying patch “phabricator:20180121.auth.07.marklegacy.sql” to host “localhost”…
Applying patch “phabricator:20180124.herald.01.repetition.sql” to host “localhost”…
Applying patch “phabricator:20180207.mail.01.task.sql” to host “localhost”…
Applying patch “phabricator:20180207.mail.02.revision.sql” to host “localhost”…
Applying patch “phabricator:20180207.mail.03.mock.sql” to host “localhost”…
Applying patch “phabricator:20180208.maniphest.01.close.sql” to host “localhost”…
Applying patch “phabricator:20180208.maniphest.02.populate.php” to host “localhost”…
Applying patch “phabricator:20180209.hook.01.hook.sql” to host “localhost”…
Applying patch “phabricator:20180209.hook.02.hookxaction.sql” to host “localhost”…
Applying patch “phabricator:20180209.hook.03.hookrequest.sql” to host “localhost”…
Applying patch “phabricator:20180210.hunk.01.droplegacy.sql” to host “localhost”…
Applying patch “phabricator:20180210.hunk.02.renamemodern.sql” to host “localhost”…
Applying patch “phabricator:20180212.harbor.01.receiver.sql” to host “localhost”…
Applying patch “phabricator:20180214.harbor.01.aborted.php” to host “localhost”…
Applying patch “phabricator:20180215.phriction.01.phidcol.sql” to host “localhost”…
Applying patch “phabricator:20180215.phriction.02.phidvalues.php” to host “localhost”…
Applying patch “phabricator:20180215.phriction.03.descempty.sql” to host “localhost”…
Applying patch “phabricator:20180215.phriction.04.descnull.sql” to host “localhost”…
Applying patch “phabricator:20180215.phriction.05.statustext.sql” to host “localhost”…
Applying patch “phabricator:20180215.phriction.06.statusvalue.sql” to host “localhost”…
Applying patch “phabricator:20180218.fact.01.dim.key.sql” to host “localhost”…
Applying patch “phabricator:20180218.fact.02.dim.obj.sql” to host “localhost”…
Applying patch “phabricator:20180218.fact.03.data.int.sql” to host “localhost”…
Applying patch “phabricator:20180222.log.01.filephid.sql” to host “localhost”…
Applying patch “phabricator:20180223.log.01.bytelength.sql” to host “localhost”…
Applying patch “phabricator:20180223.log.02.chunkformat.sql” to host “localhost”…
Applying patch “phabricator:20180223.log.03.chunkdefault.sql” to host “localhost”…
Applying patch “phabricator:20180223.log.04.linemap.sql” to host “localhost”…
Applying patch “phabricator:20180223.log.05.linemapdefault.sql” to host “localhost”…
Applying patch “phabricator:20180228.log.01.offset.sql” to host “localhost”…
Applying patch “phabricator:20180305.lock.01.locklog.sql” to host “localhost”…
Applying patch “phabricator:20180306.opath.01.digest.sql” to host “localhost”…
Applying patch “phabricator:20180306.opath.02.digestpopulate.php” to host “localhost”…
Applying patch “phabricator:20180306.opath.03.purge.php” to host “localhost”…
Applying patch “phabricator:20180306.opath.04.unique.sql” to host “localhost”…
Applying patch “phabricator:20180306.opath.05.longpath.sql” to host “localhost”…
Applying patch “phabricator:20180306.opath.06.pathdisplay.sql” to host “localhost”…
Applying patch “phabricator:20180306.opath.07.copypaths.sql” to host “localhost”…
Applying patch “phabricator:20180309.owners.01.primaryowner.sql” to host “localhost”…
Applying patch “phabricator:20180312.reviewers.01.options.sql” to host “localhost”…
Applying patch “phabricator:20180312.reviewers.02.optionsdefault.sql” to host “localhost”…
Applying patch “phabricator:20180322.lock.01.identifier.sql” to host “localhost”…
Applying patch “phabricator:20180322.lock.02.wait.sql” to host “localhost”…
Applying patch “phabricator:20180326.lock.03.nonunique.sql” to host “localhost”…
Applying patch “phabricator:20180403.draft.01.broadcast.php” to host “localhost”…
Applying patch “phabricator:20180410.almanac.01.iface.xaction.sql” to host “localhost”…
Storage is up to date. Use “storage status” for details.
Synchronizing static tables…
Verifying database schemata on “localhost”…

Database Table Name Issues
phabricator_auth auth_password key_role Missing Key
phabricator_auth auth_password key_phid Missing Key
phabricator_conpherence conpherence_index Better Table Engine Available
phabricator_daemon daemon_locklog key_lock Missing Key
phabricator_daemon daemon_locklog key_created Missing Key
phabricator_daemon daemon_logevent key_epoch Missing Key
phabricator_drydock drydock_lease key_status Missing Key
phabricator_fact fact_intdatapoint key_dimension Missing Key
phabricator_fact fact_intdatapoint key_object Missing Key
phabricator_file file key_engine Missing Key
phabricator_harbormaster harbormaster_buildartifact key_index Missing Key
phabricator_harbormaster harbormaster_buildlogchunk key_log Surplus Key
phabricator_harbormaster harbormaster_buildlogchunk key_offset Missing Key
phabricator_harbormaster harbormaster_buildmessage key_buildtarget Surplus Key
phabricator_harbormaster harbormaster_buildmessage key_receiver Missing Key
phabricator_herald herald_webhook key_status Missing Key
phabricator_herald herald_webhook key_phid Missing Key
phabricator_herald herald_webhookrequest key_ratelimit Missing Key
phabricator_herald herald_webhookrequest key_collect Missing Key
phabricator_herald herald_webhookrequest key_phid Missing Key
phabricator_maniphest maniphest_task key_closed Missing Key
phabricator_maniphest maniphest_task key_closer Missing Key
phabricator_owners owners_path packageID Surplus Key
phabricator_owners owners_path key_repository Missing Key
phabricator_phriction phriction_content key_phid Missing Key
phabricator_ponder ponder_question_fdocument key_object Missing Key
phabricator_ponder ponder_question_fdocument key_author Missing Key
phabricator_ponder ponder_question_fdocument key_owner Missing Key
phabricator_ponder ponder_question_fdocument key_created Missing Key
phabricator_ponder ponder_question_fdocument key_modified Missing Key
phabricator_ponder ponder_question_ffield key_documentfield Missing Key
phabricator_ponder ponder_question_fngrams key_ngram Missing Key
phabricator_ponder ponder_question_fngrams key_object Missing Key
phabricator_repository repository_pushevent requestIdentifier Wrong Column Type
phabricator_repository repository_pushevent key_identifier Missing Key
phabricator_repository repository_pushlog key_epoch Missing Key
phabricator_repository repository_refcursor key_cursor Surplus Key
phabricator_search search_documentfield Better Table Engine Available
Applying schema adjustments…
Done.
Completed applying all schema adjustments.
ANALYZE Analyzing tables…
Done.
ANALYZED Analyzed 505 table(s).


After this changes, I can’t access the web interface of Phabricator to create my first account.


#4

Please follow this manual: https://secure.phabricator.com/book/phabricator/article/installation_guide/

It will guide you through the process, including configuring Apache to serve Phabricator.


#5

Hi,

Thank you for your help. I was able to complete the installation when I changed PHP 7.2 for PHP 5.6.


#6

You can definitely use PHP 7.2 with Phabricator if you want to, although I have to admit that personally I ran into subtle but annoying problems last time I tried and so have stuck with 5.6 instead for now myself as well.


#7

Hi, I can’t go back to PHP5.6 because I need PHP7.2 on my server with Apache.

I followed the guide ( https://secure.phabricator.com/book/phabricator/article/configuration_guide/ ).

The virtualhost for Apache is created and I can go to my domain name. Here’s the result : http://shiki.fr/screenshots/data/ea3e6de980a67efc8f2ccc52.png

So I tried the command to change user and password and get :

./bin/config set mysql.user phabricator
./bin/config: 1: ./bin/config: ../scripts/setup/manage_config.php: not found

If I modified the path in bin/config (removing the starting ..), I get :

./bin/config set mysql.user phabricator
NAME
      manage_config.php - manage configuration

SYNOPSIS
      config command [options]
          Manage Phabricator configuration.


WORKFLOWS

      delete key
      Delete a local configuration value.

      done activity
      Mark a manual upgrade activity as complete.

      get key
      Get a local configuration value.

      help [command]
      Show this help, or workflow help for command.

      list
      List all configuration keys.

      migrate
      Migrate file-based configuration to more modern storage.

      set key value
      set key --stdin < value.json
      Set a local configuration value.


Use help command for a detailed command reference.
Use --show-standard-options to show additional options.

Actually, any command via ./bin displays the help…

Any idea?


#8
  1. Please create a new post for new issues.
  2. You’re installation of phabricator is broken. ./bin/config is supposed to be a symlink to manage_config.php. When installing correctly (https://phurl.io/u/install), it’s a link. If you copied files over from Windows or something, you lose the symlink and it becomes a text file pointing to the target. Your fix doesn’t pass the arguments to the target, so it doesn’t work.

#9
  1. Sorry about that. I thought it was the same problem
  2. I did follow this tutorial. The git clone command didn’t create those symlink. I’m on debian 9. I can recreate them myself now that I know that. Thanks !