我正在尝试在 OVH 上部署一个 Rest API。我用 symfony2 开发了它。
一切都在我的本地服务器上运行,但在 OVH 服务器上,我很难使用“作曲家更新”。
首先我修改了“.bashrc”以添加“alias php5='php.ORIG.5_4 -c /usr/local/lib/php.ini-2'”
但是当我使用“php5 composer.phar update”时它返回:
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Removing jms/serializer-bundle (1.0.0)
- Installing jms/serializer-bundle (1.1.0)
Downloading: 100%
Writing lock file
Generating autoload files
> Incenteev\ParameterHandler\ScriptHandler::buildParameters
Updating the "app/config/parameters.yml" file
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap
X-Powered-By: PHP/4.4.9
Content-type: text/html
<br />
<b>Parse error</b>: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in <b>/home/findexpocq/Rest/vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php</b> on line <b>13</b><br />
Script
Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap handling the post-update-cmd event terminated with an exception
[RuntimeException]
An error occurred when generating the bootstrap file.
update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--] [<packages>]...
X-Powered-By: PHP/5.4.38
Content-type: text/html
Warning: Composer should be invoked via the CLI version of PHP, not the cgi-fcgi SAPI
我不知道为什么 buildBootstrap 运行 PHP 4
谢谢你的帮助