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?

已提问 1 年前266 查看次数
2 回答
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
专家
已回答 1 年前
  • 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 ?

已回答 1 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则