Issue : Trying to Access EC2 Variables for whole server.

0

I am trying to define certain variables on my EC2 to use on my site. I have created an environment file in etc , .htaccess and also tried in php.ini. I see these new variables when i type printenv on the server but when I print phpinfo() on my site i do not see these variables. Any ideas why they are not being shown please?

asked a year ago255 views
2 Answers
0

HI - What are these values? are custom like using SetEnv with key value pair. Any example of EC2 Variables that you are trying to use?

profile pictureAWS
EXPERT
answered a year ago
  • Hi, Thanks for responding, I am trying to pass DB Variables to use in a configuration file of my site. I have managed to do it for apache by using SetEnv however I'm having an issue for nginx. I have tried to use fastcgi_param DB_NAME value but cannot access the variable using $_SERVER['DB_NAME']; How can I output the variable ? or fastcgi_param isn't the right way ?

0

Any feedback please ?

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions