";无法终止进程";"错误";php composer.phar install


"Unable to kill the process" error with "php composer.phar install" on Azure

我正在尝试将我的Symfony 2应用程序部署到Microsoft Azure网站云。为此,我遵循本指南中的步骤http://symfony.com/doc/current/cookbook/deployment/azure-website.html#configure-symfony应用

现在,当我进入步骤"配置Symfony应用程序"时,我运行命令php composer.phar install。我省略了-d extension=php_intl.dll开关,因为扩展已经加载。实际上我两种都试过了,没什么区别。

现在,当运行安装后命令时,我得到以下错误:

[Symfony'Component'Process'Exception'RuntimeException]
Unable to kill the process                              

我尝试增加max_execution_time(但无论如何都设置为0(,还尝试将app_settings中的SCM_COMMAND_IDLE_TIMEOUT参数设置为3600这样的值。仍然不起作用。

有什么想法吗?以下是完整输出:

D:'home'site'wwwroot>php composer.phar install
 Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
Nothing to install or update
Generating autoload files
> Incenteev'ParameterHandler'ScriptHandler::buildParameters
Updating the "app/config/parameters.yml" file
> Sensio'Bundle'DistributionBundle'Composer'ScriptHandler::buildBootstrap
> Sensio'Bundle'DistributionBundle'Composer'ScriptHandler::clearCache
Script Sensio'Bundle'DistributionBundle'Composer'ScriptHandler::clearCache handling the post-install-cmd event terminated with an exception



  [Symfony'Component'Process'Exception'RuntimeException]  
  Unable to kill the process                              



install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-    progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [--ignore-platform-reqs] [packages1] ... [packagesN]



Fatal error: Uncaught exception 'Symfony'Component'Process'Exception'RuntimeException' with message 'Unable to kill the process' in phar://D:/home/site/wwwroot    /composer.phar/vendor/symfony/process/Symfony/Component/Process/Process.php:801
Stack trace:
#0 phar://D:/home/site/wwwroot/composer.phar/vendor/symfony/process/Symfony/Component/Process/Process.php(177): Symfony'Component'Process'Process->stop()
#1 [internal function]: Symfony'Component'Process'Process->__destruct()
#2 {main}
  thrown in phar://D:/home/site/wwwroot/composer.phar/vendor/symfony/process/Symfony/Component/Process/Process.php on line 801

我曾试图重现您的问题,但失败了,作曲家在我的Azure项目中运行良好。请尝试以下步骤:

1,在Azure上创建一个带有MySQL数据库的Web应用程序,并从git设置部署。

2,通过cmdlet在本地创建一个新的symfony 2.7项目:

php -r "readfile('http://symfony.com/installer');" > symfony
symfony new my_project

然后在Web应用程序上部署该项目。

3、切换回酷都应用的在线控制台,执行以下命令:

"cd site'wwwroot"
"curl -sS https://getcomposer.org/installer | php"
"php composer.phar install"

4、回答composer安装过程中提示的问题。

它对我来说很好。

顺便说一句,当composer清理项目环境中的缓存时,timeoutRuntimeException似乎有问题。有两种处理方法:

1,我们可以在部署到Azure之前手动清理缓存。

2、我们可以在composer.json中设置命令执行超时选项。在作曲家身上。Json文件,有代码:

"config": {
   "bin-dir": "bin",
   "process-timeout":0 
}, 

我们添加了"进程超时:0"来消除命令执行时间的限制。

我在尝试重新编程时遇到了同样的错误。安装以下两项导致超时:

"Sensio''Bundle''DistributionBundle''Composer''ScriptHandler::clearCache","Sensio''Bundle''DistributionBundle''Composer''ScriptHandler::installAssets",

尝试解决方案:

  1. 从composer.json中删除ClearCache和InstallAsset,安装成功

  2. 把这两个组件加回来,重新安装,就成功了。

  3. 由于Windows不支持符号链接,因此出现了有关符号链接的警告。这应该是另一个问题。

FYI

我又测试了一次,看起来composer.lock引起了一些问题。我删除了composer.lock,然后运行了install,它成功通过了。

FYI

这是Symfony的官方下载网站,https://symfony.com/doc/current/book/installation.html#installing-symfony安装程序

若要在Azure上安装,请按照windows的下载说明进行操作。希望能有所帮助。