GitHub Codespaces environment variables are not available to www-data Apache user #123435
Unanswered
battye
asked this question in
Codespaces
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Select Topic Area
Question
Body
The environment variables listed at https://docs.github.com/en/codespaces/developing-in-a-codespace/default-environment-variables-for-your-codespace are great, but are not consistently accessible. Here's a simple example I'm using on a Codespace set up to run PHP through Apache:
If I run that php file through the terminal, then it outputs
present
and the var dump will show'CODESPACES' => string(4) "true"
as I expect.If I run that same php file through the browser, it outputs
not present
and none of the GitHub environment variables are in the dump. This is a problem for me and I don't know how to overcome it.My best guess is the www-data Apache user does not have access to GitHub's environment variables.
Does anyone know a solution to make the Apache user aware of the GitHub environment variables?
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions