phpmysqlphabricator

Phabricator Installation Error with PHP 7.0


I am installing Phabricator on Ubuntu 16.04.

I have PHP 7.0.8-3 installed.

I am at the Setup section at https://secure.phabricator.com/book/phabricator/article/configuration_guide/

When I go to my site I am getting the error

1045: Access denied for user 'root'@'localhost' (using password: NO)

I tried to run the command

 phabricator/ $ ./bin/storage upgrade --user <user> --password <password>

But I just get the following error:

[2016-07-07 17:15:54] EXCEPTION: (Error) Call to undefined function mysql_real_escape_string() at [/src/aphront/storage/connection/mysql/AphrontMySQLDatabaseConnection.php:12] arcanist(head=master, ref.master=4d4d16f25985), phabricator(head=master, ref.master=ef13b0e52b46), phutil(head=master, ref.master=32c56dc20b39) #0 AphrontMySQLDatabaseConnection::escapeBinaryString(string) called at [/src/aphront/storage/connection/mysql/AphrontMySQLDatabaseConnection.php:8] #1 AphrontMySQLDatabaseConnection::escapeUTF8String(string) called at [/src/xsprintf/qsprintf.php:178] #2 xsprintf_query(AphrontMySQLDatabaseConnection, string, integer, string, integer) called at [/src/xsprintf/xsprintf.php:70] #3 xsprintf(string, AphrontMySQLDatabaseConnection, array) called at [/src/xsprintf/qsprintf.php:64] #4 qsprintf(AphrontMySQLDatabaseConnection, string, string, string, string) called at [/src/xsprintf/queryfx.php:5] #5 queryfx(AphrontMySQLDatabaseConnection, string, string, string, string) called at [/src/xsprintf/queryfx.php:11] #6 queryfx_all(AphrontMySQLDatabaseConnection, string, string, string, string) called at [/src/aphront/storage/connection/AphrontDatabaseConnection.php:26] #7 AphrontDatabaseConnection::queryData(string, string, string, string) called at [/src/infrastructure/storage/lisk/LiskDAO.php:535] #8 LiskDAO::loadRawDataWhere(string, string) called at [/src/infrastructure/storage/lisk/LiskDAO.php:476] #9 LiskDAO::loadAllWhere(string, string) called at [/src/infrastructure/env/PhabricatorConfigDatabaseSource.php:18] #10 PhabricatorConfigDatabaseSource::loadConfig(string) called at [/src/infrastructure/env/PhabricatorConfigDatabaseSource.php:7] #11 PhabricatorConfigDatabaseSource::__construct(string) called at [/src/infrastructure/env/PhabricatorEnv.php:232] #12 PhabricatorEnv::buildConfigurationSourceStack() called at [/src/infrastructure/env/PhabricatorEnv.php:95] #13 PhabricatorEnv::initializeCommonEnvironment() called at [/src/infrastructure/env/PhabricatorEnv.php:75] #14 PhabricatorEnv::initializeScriptEnvironment() called at [/scripts/init_script.php:21] #15 init_phabricator_script() called at [/scripts/init_script.php:24] #16 require_once(string) called at [/scripts/sql/manage_storage.php:5]

UPDATE:

As of June 1st, 2021, Phabricator is no longer being maintained or updated. Click here for more info.


Solution

  • You need the php7 mysql extensions installed

    sudo apt-get install php7.0-mysql