Please could I have step by step instructions to set the authentication.json file as environment variable instead of having the json file in my project location
For example:
$jsonAuth = getenv('JSON_AUTH');
Running CentOS Linux 7.9.2009 with Apache
2
Answers
Ideally, you want to encode the json to base 64. Its easier as base64 gets rid of the printable characters that need to be escaped. After that, you can do the following in PHP.:
check this).
<VirtualHost>
for your application, and addSetEnv JSON_AUTH your_token_here
, and as many other auth variables youneed to set.
apachectl -k graceful
or via init.d).$jsonAuth = apache_getenv('JSON_AUTH');
.