pinodex / openshift-cartridge-nginx-php7

DISCONTINUED (see https://blog.openshift.com/migrate-to-v3-v2-eol/). OpenShift Cartridge for Nginx and PHP 7.
Other
55 stars 32 forks source link

getenv function always returns null #4

Closed factorin-j closed 8 years ago

factorin-j commented 8 years ago

please help! using getenv function in your gear returns null if the env is set using rhc set-env command 🙇 I tried to restart the app but still no luck 🙇

pinodex commented 8 years ago

This can be fixed by adding clear_env = no to the php-fpm config file.

SSH to your app and edit ~/nginx-php7/etc/www.conf.erb then add this line:

clear_env = no

Followed by these commands:

$ build_config
$ service php-fpm restart

This was also addressed at @14119d67d1e4ab8ec2913c37bfa076073badbd0d. Be sure to restart your app or just the php-fpm through SSH after modifying your env.

factorin-j commented 8 years ago

oh, thank you very much 🙇