I’m having a bit of a tough time with something on this great platform of yours and was hoping someone here might be able to lend a hand. I’m struggling to set up an environment variable for my MongoDB connection, and it’s been a bit of a headache.
I did reach out to support, and they got back to me asking if I’m still facing the issue or if I’ve figured it out by now. I’m not sure how to respond to that - still stuck, unfortunately! I’m not the type to bother support without good reason, but I guess we all need a little extra help sometimes.
Here’s what I’ve been trying to do:
- I went into the ‘Deployments/Environment’ section and put in
MONGO_HOST='MY SECRET STRING'.
- Hit the ‘Sync’ button after that.
- Then, I deployed the app in the deployments section.
- In my PHP script, I’m trying to get the variable with
No luck though, it’s coming up empty no matter what I try - single quotes, double quotes, you name it. It’s been over two days of trial and error now.
I’m hoping someone here might have run into something similar or knows a trick or two. Any advice or tips would be super appreciated!
Thanks a bunch in advance!
P.S. It’s so strange, because the rest of the platform has been extremely intuitive and easy to use! This issue really stands out as an anomaly.