How to set Permanent Session for Token in Dreamfactory 2.2.0?

I am building Rest Api and made changes in df.php file by setting

'allow_forever_sessions' => env('DF_ALLOW_FOREVER_SESSIONS', true) 

and also use “remember_me”:true in code for eg.
“id” : 5,
“email” : "",
“password” : “Zxy”,

But, still facing token expiration issues. I want to make token life forever.
What can I do to make it alive ?.
Need help.


I would recommend against changing df.php
System settings should be changed in the .env file

After you make those changes, you may need to clear a cached configuration.

Backup the file bootstrap/cache/config.php; save it somewhere in case clearing the config cache causes problems.
Then run php artisan config:clear

I made changes in df.php file but didn’t find .env file anywhere.
I am working on Dreamfactory-2.2.0.

If this is a Bitnami install it will be in the htdocs folder.
For example, on Windows, this would default to C:\Bitnami\dreamfactory-2.2.0-0\apps\dreamfactory\htdocs\.env

Since the filename starts with a . it is likely hidden in your file browser. You will need to show hidden files to see it.

But where .env file is located ?

See the post right above yours

I tried all the 3 steps that you have mentioned in the post but i am getting

"allow_forever_sessions:false" after calling GET:[](

I am using Dreamfactory 2.9.0. Is that any issue with this version?

Please give me some help.

while running php artisan config:clear i’m facing this error
seyali-01@seyali-01:~/dreamfactory-2.12.0-0$ php artisan config:clear
The program ‘php’ can be found in the following packages:
* php7.0-cli
* hhvm
Try: sudo apt install
For this error as per the documentation i have to specify the full path of php but how to find the full path of php please help me over this.

@bhavin4538 Did you find your .env file? You want to uncomment (remove the # signs) in front of this line and change the value to true:


You should then be able to re-run the GET request you tried and see the default changed to true.

@Shivamurugan what install environment are you on?

Are you on a certain install step, or upgrade step? Is there another issue related to the php artisan config:clear command you typed?

Most times you can find the php path with the follow commands:

which php