Laravel Lumen Memcached not found

后端 未结 12 1731
無奈伤痛
無奈伤痛 2021-01-31 01:55

Ok, I just started with Lumen and I\'m trying to use the Auth, but a call to either Auth::check or any other function of Auth.. leads to the below Error Fatal error: Cla

相关标签:
12条回答
  • 2021-01-31 02:40

    For me, the issue was that I used the php-7 branch of homestead repository which does not have PHP memcached ready.

    0 讨论(0)
  • 2021-01-31 02:41

    If you have a new lumen installation, you must rename .env.example to .env . So it can read your configurations!

    0 讨论(0)
  • 2021-01-31 02:42

    in your .env file, you can also use CACHE_DRIVER=file instead of CACHE_DRIVER=memcached

    0 讨论(0)
  • 2021-01-31 02:44

    I spent 3 hours on this problem today. With the help of the post of demve in this topic, I found the solution. Very simple! I hope it won't affect me later in my development.

    Just to it, in the .env file :

    CACHE_DRIVER=array
    SESSION_DRIVER=array
    QUEUE_DRIVER=array
    

    Ok, I make an UPDATE because I was faced with a new problem about the session. In fact, when you set the previous parameters, your session won't be persistent, like said in the documentation: array - sessions will be stored in a simple PHP array and will not be persisted across requests.

    So I have to change it, always in .env a file like that :

    SESSION_DRIVER=cookie
    

    With a var_dump(Session::all()); I now can see the whole values of my session

    0 讨论(0)
  • 2021-01-31 02:47

    In .env file replace

    #This line:- 
      CACHE_DRIVER = memcached
    
    #With this:- 
       CACHE_DRIVER = array
    
    0 讨论(0)
  • 2021-01-31 02:47

    This happens if your .env file is owned by another user than the one trying to run the artisan command.

    0 讨论(0)
提交回复
热议问题