laravel laravel4 作曲家安装得到 proc_open 不可用错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19911737/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
laravel4 composer install got proc_open not available error
提问by Felix
Now I am trying to use composer to install my php package but I got this error message: $ composer install
现在我正在尝试使用 composer 来安装我的 php 包,但我收到此错误消息:$ composer install
Loading composer repositories with package information
Installing dependencies (including require-dev)
- Installing filp/whoops (1.0.7)
Downloading: 100%
[Symfony\Component\Process\Exception\RuntimeException]
The Process class relies on proc_open, which is not available on your PHP installation.
edit :
编辑 :
after enable the proc_open function I got this error and also set my php memory_limit to 384M :
启用 proc_open 功能后,我收到此错误并将我的 php memory_limit 设置为 384M :
Fatal error: Uncaught exception 'ErrorException' with message 'proc_open(): fork failed - Cannot allocate memory' in phar:///usr/local/bin/composer/vendor/symfony/console/Symfony/Component/Console/Application.php:990
Stack trace:
#0 [internal function]: Composer\Util\ErrorHandler::handle(2, 'proc_open(): fo...', 'phar:///usr/loc...', 990, Array)
#1 phar:///usr/local/bin/composer/vendor/symfony/console/Symfony/Component/Console/Application.php(990): proc_open('stty -a | grep ...', Array, NULL, NULL, NULL, Array)
#2 phar:///usr/local/bin/composer/vendor/symfony/console/Symfony/Component/Console/Application.php(832): Symfony\Component\Console\Application->getSttyColumns()
#3 phar:///usr/local/bin/composer/vendor/symfony/console/Symfony/Component/Console/Application.php(797): Symfony\Component\Console\Application->getTerminalDimensions()
#4 phar:///usr/local/bin/composer/vendor/symfony/console/Symfony/Component/Console/Application.php(731): Symfony\Component\Console\Application->getTerminalWidth()
#5 phar:///usr/local/bin/com in phar:///usr/local/bin/composer/vendor/symfony/console/Symfony/Component/Console/Application.php on line 990
回答by cyb0k
You should use php-cli to by-pass disable_functionstemporarily.
您应该使用 php-cli暂时绕过disable_functions。
php -d "disable_functions=" /path/to/composer install
回答by Antonio Carlos Ribeiro
Edit your php.ini
file and search for the line
编辑您的php.ini
文件并搜索该行
disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait...
It should be disabled there and you must enabled it. This a security precaution.
它应该在那里被禁用,你必须启用它。这是一项安全预防措施。