I have a PHP script that runs as an Apache2 module, and uses the VeriSign PayFlow Pro library to process credit card transactions. The PayFlow Pro library needs the environment variable PFPRO_CERT_PATH set. I tried using Apache SetEnv directives, but later found out that SetEnv is used for setting HTTP environment variables, not OS environment variables. So currently I am stuck with allowing access to PFPRO_ environment variables (PHP is running in safe mode) and calling putenv() before using the functions. I don't want to do that.
In short, I need to set an environment variable for the "nobody" user. How do I do that?
[edit]
Apparently adding the following to /etc/profile helped:
Code:
PFPRO_CERT_PATH=/usr/local/verisign/payflowpro/linux/certs
export PFPRO_CERT_PATH
I su'd to nobody and typed "env |grep PF_", and PFPRO_CERT_PATH was set to the proper value. I then restarted Apache and everything was fine.
Sorry to clutter the BB!