gpt4 book ai didi

php - Azure 上的 "Unable to kill the process"错误为 "php composer.phar install"

转载 作者:可可西里 更新时间:2023-10-31 22:12:50 25 4
gpt4 key购买 nike

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

现在,当我到达“配置 Symfony 应用程序”步骤时,我运行命令 phpcomposer.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

最佳答案

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

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

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

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

symfony new my_project

然后将项目部署到 Web 应用程序上。

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

"cd site\wwwroot"

"curl -sS https://getcomposer.org/installer | php"

"php composer.phar install"

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

对我来说效果很好。

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

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

2、我们可以在composer.json中设置命令执行超时选项。在composer.Json文件中,有这样的代码:

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

我们添加“process-timeout:0”来消除命令执行时间的限制。

关于php - Azure 上的 "Unable to kill the process"错误为 "php composer.phar install",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31672051/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com