Hello, I've encountred a problem with my Laravel application. I'm developing a simple application with few forms in whole project and everything worked just fine on my local machine. However, when I deployed my app on a public server, I'm getting warnings over the whole page, something like this:
Warning: putenv() has been disabled for security reasons in /data/web/virtuals/98646/virtual/www/vendor/vlucas/phpdotenv/src/Dotenv.php on line 75
And the main problem, whenever I try to post a form, i get an error TokenMismatchException, what I believe is caused by disabled putenv().
Is there any way, how to fix it? Or maybe bypass it? (Provider will not enable putenv() function).
You could try to move your settings from .env
file to respective config files in config
directory and delete the .env
file.
You probably will only need to move APP_KEY
value to config/app.php
(and maybe enable debug, if you need it);
and DB_*
values to config/database.php
.
Xum said:
You could try to move your settings from
.env
file to respective config files inconfig
directory and delete the.env
file.You probably will only need to move
APP_KEY
value toconfig/app.php
(and maybe enable debug, if you need it); andDB_*
values toconfig/database.php
.
Thanks a lot!
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community