By IGLIGHT
Hello everyone I need help regarding this error message: “The environment file is invalid: Dotenv values containing spaces must be surrounded by quotes”
I just finished setting up environment for my app according to the request of the wizard installer of the app. I input things like database credentials, mail credentials, google client ID and others. After that, upon visiting my website, I found this error. That made me to remember that when I was filling the forms, I spaced out my username when entering the mail credentials, so I don’t know if that is part of my problem now.
So, how do I access the Dotenv file according to the error instruction to check the files with spaces and correct them? OR Which command will I use to get rid of this once and for all?
In fact, how do I solve this problem?
Thanks, everyone. looking forward to hearing from you.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello,
Would you mind confirming which application exactly did you deploy? I can then confirm the exact location of the Dotenv file and the exact steps that you need to take to fix it.
But for example if you are using Laravel the default location of the .env file is at:
/var/www/html/.env
You need to open this file with your favorite text editor and find the username line:
nano /var/www/html/.env
Find the user name variable and add quotes around the value.
Regards, Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.