【问题标题】:proc_open error when try to run artisan dump-autoload尝试运行 artisan dump-autoload 时出现 proc_open 错误
【发布时间】:2014-05-05 12:00:00
【问题描述】:

当我尝试运行 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#

我在 DigitalOcean 上使用 Ubuntu 12.10 x64。

有什么想法吗?

【问题讨论】:

    标签: php ubuntu laravel composer-php


    【解决方案1】:

    您的 php.ini 中似乎禁用了 proc_open。通常出于安全原因。

    确保在您的 php.ini 中搜索 disable_functions 指令并找出 proc_open 是否在该列表中。或者尝试使用function_exists('proc_open'),这应该返回 FALSE

    可能重复:laravel4 composer install got proc_open not available error

    【讨论】:

      【解决方案2】:

      Laravel 6 及更高版本(proc_open 错误)

      这是因为在调试模式下启用了Flare错误报告服务有一个解决方法。

      发布flare配置文件php artisan vendor:publish --tag=flare-config

      在 config/flare.php 中

      更新

      '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,
      

      【讨论】:

      • 我没有使用 Flare 但出现此错误。
      猜你喜欢
      • 2018-07-17
      • 2013-12-14
      • 2017-01-04
      • 1970-01-01
      • 2018-09-09
      • 2013-09-17
      • 2017-04-04
      • 2018-05-28
      • 1970-01-01
      相关资源
      最近更新 更多