Issue : Trying to Access EC2 Variables for whole server.


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?

질문됨 일 년 전268회 조회
2개 답변

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
답변함 일 년 전
  • 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 ?


Any feedback please ?

답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠