$ bin/config set --database storage.upload-size-limit 2M [2015-01-09 19:37:49] EXCEPTION: (AphrontQueryException) #1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key = 'storage.upload-size-limit'' at line 1 at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:308] #0 AphrontBaseMySQLDatabaseConnection::throwQueryCodeException(integer, string) called at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:275] #1 AphrontBaseMySQLDatabaseConnection::throwQueryException(mysqli) called at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:181] #2 AphrontBaseMySQLDatabaseConnection::executeRawQuery(string) called at [<phutil>/src/xsprintf/queryfx.php:7] #3 queryfx(AphrontMySQLiDatabaseConnection, string, string, string, string, string) #4 call_user_func_array(string, array) called at [<phutil>/src/xsprintf/queryfx.php:17] #5 queryfx_all(AphrontMySQLiDatabaseConnection, string, string, string, string, string) #6 call_user_func_array(string, array) called at [<phutil>/src/aphront/storage/connection/AphrontDatabaseConnection.php:20] #7 AphrontDatabaseConnection::queryData(string, string, string, string, string) #8 call_user_func_array(array, array) called at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:509] #9 LiskDAO::loadRawDataWhere(string, string, string) #10 call_user_func_array(array, array) called at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:473] #11 LiskDAO::loadOneWhere(string, string, string) called at [<phabricator>/src/applications/config/management/PhabricatorConfigManagementSetWorkflow.php:117] #12 PhabricatorConfigManagementSetWorkflow::execute(PhutilArgumentParser) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:396] #13 PhutilArgumentParser::parseWorkflowsFull(array) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:292] #14 PhutilArgumentParser::parseWorkflows(array) called at [<phabricator>/scripts/setup/manage_config.php:21]
Looks like line 117 in phabricator/src/applications/config/management/PhabricatorConfigManagementSetWorkflow.php should be
->loadOneWhere('namespace = %s AND configKey = %s', 'default', $key),
(currently it has key instead of configKey). Anyway, changing it the line isn't enough to fix the issue:
$ ./config set --database storage.upload-size-limit 2M [2015-01-09 19:38:52] EXCEPTION: (InvalidArgumentException) Argument 2 passed to PhabricatorConfigEditor::storeNewValue() must be an instance of PhabricatorConfigEntry, null given, called in /home/phab/phabricator/src/applications/config/management/PhabricatorConfigManagementSetWorkflow.php on line 119 and defined at [<phutil>/src/error/PhutilErrorHandler.php:200] #0 PhutilErrorHandler::handleError(integer, string, string, integer, array) called at [<phabricator>/src/applications/config/editor/PhabricatorConfigEditor.php:117] #1 PhabricatorConfigEditor::storeNewValue(PhabricatorUser, NULL, string, PhabricatorContentSource) called at [<phabricator>/src/applications/config/management/PhabricatorConfigManagementSetWorkflow.php:119] #2 PhabricatorConfigManagementSetWorkflow::execute(PhutilArgumentParser) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:396] #3 PhutilArgumentParser::parseWorkflowsFull(array) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:292] #4 PhutilArgumentParser::parseWorkflows(array) called at [<phabricator>/scripts/setup/manage_config.php:21]