我正在尝试让 Phabricator 在 Solaris 上通过 apache 运行。该网站正在运行,但所有 cli 脚本都没有。例如,phd
。
第一个问题是它没有将参数传递给manage-daemons.php
它调用的底层脚本。查看phd
文件,这并不让我感到惊讶:
$> cat phd
../scripts/daemon/manage_daemons.php
现在,鉴于我的默认 shell 是bash
,这不会传递我的参数。为此,我修改了脚本:
#! /bin/bash
../scripts/daemon/manage_daemons.php $*
这现在将传递参数,但现在无法通过相对路径找到所需的交互脚本:
./phd start
Preparing to launch daemons.
NOTE: Logs will appear in '/var/tmp/phd/log/daemons.log'.
Launching daemon "PhabricatorRepositoryPullLocalDaemon".
[2014-05-09 19:29:59] EXCEPTION: (CommandException) Command failed with error #127!
COMMAND
exec ./phd-daemon 'PhabricatorRepositoryPullLocalDaemon' --daemonize --log='/var/tmp/phd/log/daemons.log' --phd='/var/tmp/phd/pid'
STDOUT
(empty)
STDERR
./phd-daemon: line 1: launch_daemon.php: not found
at [/XXX/XXX/libphutil/src/future/exec/ExecFuture.php:398]
#0 ExecFuture::resolvex() called at [/XXX/XXX/phabricator/src/applications/daemon/management/PhabricatorDaemonManagementWorkflow.php:167]
#1 PhabricatorDaemonManagementWorkflow::launchDaemon(PhabricatorRepositoryPullLocalDaemon, Array , false) called at [/XXX/XXX/phabricator/src/applications/daemon/management/PhabricatorDaemonManagementWorkflow.php:246]
#2 PhabricatorDaemonManagementWorkflow::executeStartCommand() called at [/XXX/XXX/phabricator/src/applications/daemon/management/PhabricatorDaemonManagementStartWorkflow.php:18]
#3 PhabricatorDaemonManagementStartWorkflow::execute(Object PhutilArgumentParser) called at [/XXX/XXX/libphutil/src/parser/argument/PhutilArgumentParser.php:396]
#4 PhutilArgumentParser::parseWorkflowsFull(Array of size 9 starting with: { 0 => Object PhabricatorDaemonManagementListWorkflow }) called at [/XXX/XXX/libphutil/src/parser/argument/PhutilArgumentParser.php:292]
#5 PhutilArgumentParser::parseWorkflows(Array of size 9 starting with: { 0 => Object PhabricatorDaemonManagementListWorkflow }) called at [/XXX/XXX/phabricator/scripts/daemon/manage_daemons.php:30]
XXX
请注意,当它们泄露敏感信息时,我已经掩盖了我的路径。
现在,显然我不应该修改这些脚本。这表明某些先决条件未正确设置。
我很清楚,Phabricator 正在对我的设置做出一些(大胆的)假设。但我不太确定是什么……?