While running following commands
./bin/storage upgrade
./bin/phd log --id 2670
or any other bin command system throwing me this stacktrace
[2017-05-19 09:48:37] EXCEPTION: (RuntimeException) Use of undefined constant STDOUT - assumed 'STDOUT' at [<phutil>/src/error/PhutilErrorHandler.php:221] arcanist(head=master, ref.master=a59cfca5f190), phabricator(head=master, ref.master=7e46d7ab6a6b), phutil(head=master, ref.master=a900d7b63e95) #0 PhutilErrorHandler::handleError(integer, string, string, integer, array) called at [<phutil>/src/console/PhutilConsoleServer.php:30] #1 PhutilConsoleServer::handleMessage(PhutilConsoleMessage) called at [<phutil>/src/console/PhutilConsole.php:204] #2 PhutilConsole::writeMessage(PhutilConsoleMessage) called at [<phutil>/src/console/PhutilConsole.php:187] #3 PhutilConsole::writeTextMessage(string, array) called at [<phutil>/src/console/PhutilConsole.php:143] #4 PhutilConsole::writeOut(string, string) called at [<phabricator>/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php:160] #5 PhabricatorStorageManagementWorkflow::doAdjustSchemata(PhabricatorStorageManagementAPI, boolean) called at [<phabricator>/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php:139] #6 PhabricatorStorageManagementWorkflow::adjustSchemata(PhabricatorStorageManagementAPI, boolean) called at [<phabricator>/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementUpgradeWorkflow.php:97] #7 PhabricatorStorageManagementUpgradeWorkflow::didExecute(PhutilArgumentParser) called at [<phabricator>/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php:107] #8 PhabricatorStorageManagementWorkflow::execute(PhutilArgumentParser) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:441] #9 PhutilArgumentParser::parseWorkflowsFull(array) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:333] #10 PhutilArgumentParser::parseWorkflows(array) called at [<phabricator>/scripts/sql/manage_storage.php:248]