Symfony 5 Warning PutEnv has been disabled for security reasons

Website

http://experiments-101.epizy.com/public/index.php

Error Message

Warning: putenv() has been disabled for security reasons

Other Information

I’m new to symfony and don’t know very much about how the framework operates. I understand that you can’t enable putenv() on your server, so i was hoping you could give some suggestions to set some environment variables namely mysql database login information and app_environment
using other means.

Like the last 36 times that question was asked, no, this extension is not, will not and cannot be enabled on free hosting.

Please see Admin’s most recent reply for more Information as to why:

7 Likes

Does .env work here ?

I have a Laravel website who’s .env works fine.

1 Like

Okay this post was kinda stupid, I looked around the errors and what php was trying to do was set a environment variable, so I declared it in .env file and did some console updates and my site is running fine now. thanks for the support

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.