【问题标题】:why php artisan in lumen not working?为什么流明中的 php artisan 不起作用?
【发布时间】:2017-08-19 17:18:24
【问题描述】:

当我运行php artisan migrate 时,结果是

[Symfony\Component\Debug\Exception\FatalThrowableError] 找不到类“Memcached”

是否有启用此命令的方法?

更多信息,我在centos 7和php 7版本下创建了我的项目。

【问题讨论】:

标签: php laravel lumen


【解决方案1】:
  1. 您的系统上缺少 memcached
  2. 这不是强制性的,如果您只是想让系统启动并运行

编辑您的.env 文件并将您的缓存驱动程序更改为file

CACHE_DRIVER=file

【讨论】:

    【解决方案2】:

    我在使用 lumen 5.5.2 时遇到了同样的问题,然后发现 config/cache.php 缺少以下代码:

     'array' => [
                'driver' => 'array',
            ],
    
            'file' => [
                'driver' => 'file',
                'path'   => storage_path('framework/cache/data'),
            ],
    

    添加以上代码后,效果很好。

    愉快的编码

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-11-26
      • 2021-01-03
      • 1970-01-01
      • 2015-08-04
      • 2017-04-06
      • 2015-06-25
      • 2017-09-18
      相关资源
      最近更新 更多