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
Check if memcached
is installed, if not install it by running:
apt-get install php5-memcached
In my case i added Add CACHE_DRIVER=array
in .env file
Then
Dotenv::load(__DIR__.'/../');
in my bootstrap/app.php
and the .env
file started working.
I had a similar problem now, I couldn't track it down but my guess is that it has something to do with the fact that the defaults configurations are stored in the vendor/laravel/lumen-framework/config
folder, the DotEnv::$inmutable
setting and the artisan serve
server.
The solution that worked for me was:
Add in bootstrap/app.php
the following:
Dotenv::makeMutable();
Dotenv::load(__DIR__.'/../');
Dotenv::makeImmutable();
in the .env
file, set all the configuration to "basic drivers" (array, file) even if you are not going to use them, because you w
You may need to restart your server, especially if you're using php artisan serve
.
Lumen doesn't appear to pick up .env
changes per-request.
I had exactly the same issue - trying to use file cache, but received errors regarding Memcached - restarting the server reloads the .env
file.
Make sure not to get caught out by your .env file not being loaded, which by default it's commented out in Lumen. So if you are specifying a different cache driver in your .env, do the following.
Note: If you are using the .env file to configure your application, don't forget to uncomment the Dotenv::load() method in your bootstrap/app.php file.
Source: http://lumen.laravel.com/docs/cache
This issue resolved when i installed this package so try at least
First i tried this and it works fine
CACHE_DRIVER = array
but then thought about what is memcached
Then i tried this and it works fine without changing driver memcached
apt-get install php-memcached