laravel 尝试运行 artisan dump-autoload 时出现 proc_open 错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22671920/
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
proc_open error when try to run artisan dump-autoload
提问by user3175226
When I try to run php artisan dump-autoload, I got this error:
当我尝试运行 php artisan dump-autoload 时,出现此错误:
root@server:/var/mysite# php artisan dump-autoload
Generating optimized class loader
[Symfony\Component\Process\Exception\RuntimeException]
The Process class relies on proc_open, which is not available on your PHP installation.
dump-autoload
root@server:/var/mysite#
I'm on Ubuntu 12.10 x64 on DigitalOcean.
我在 DigitalOcean 上使用 Ubuntu 12.10 x64。
any idea?
任何的想法?
回答by ilpaijin
It seems that the proc_open
is disabled in your php.ini. Usually for security reason.
似乎proc_open
在您的 php.ini 中禁用了 。通常是出于安全原因。
To be sure search the disable_functions
directive in your php.ini and find out if proc_open
is in that list. Or try with function_exists('proc_open')
, this should return FALSE
确保disable_functions
在您的 php.ini 中搜索指令并找出是否proc_open
在该列表中。或尝试使用function_exists('proc_open')
,这应该返回 FALSE
Possible duplicate: laravel4 composer install got proc_open not available error
可能重复:laravel4 composer install got proc_open not available 错误
回答by Zahid Hassan Shaikot
Laravel 6 and higher (proc_open Error)
Laravel 6 及更高版本(proc_open 错误)
It is because of Flare error reporting service enabled in debug mode There is a workaround for this.
这是因为在调试模式下启用了 Flare 错误报告服务有一个解决方法。
Publish flare config file php artisan vendor:publish --tag=flare-config
发布耀斑配置文件 php artisan vendor:publish --tag=flare-config
and in config/flare.php
并在 config/flare.php
update
更新
'reporting' => [
'anonymize_ips' => true,
'collect_git_information' => false,
'report_queries' => true,
'maximum_number_of_collected_queries' => 200,
'report_query_bindings' => true,
'report_view_data' => true,
],
'send_logs_as_events' => false,