#Env variable can't be read by laravel
10 messages · Page 1 of 1 (latest)
Project ID: aa2a5d94-9bd2-48c1-9fc2-09c09a301603
project id: aa2a5d94-9bd2-48c1-9fc2-09c09a301603
@latent tree - I'm pretty sure you've faced this issue before right? could you lend a hand here? (silent ping failed me)
Mine was raw php, I was using getenv() and $_ENV to get the env vars, but the correct way was using $_SERVER
Why? good question, i'm not that good with PHP I just mantain an archaic codebase but my guess is that it is 'cause the envs are provided by railway (the server, instead of a client session)
so is there any workaround?
please read medim's message
Thank you for marking this question as solved!
Iam using laravel framework, changing getenv() or $_ENV will not be only in one place. But ok if that's the only solution for now, thanks!