LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Setting environment variables for "nobody" (https://www.linuxquestions.org/questions/linux-software-2/setting-environment-variables-for-nobody-88492/)

player_2 09-02-2003 01:39 PM

Setting environment variables for "nobody"
 
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! :o


All times are GMT -5. The time now is 05:54 AM.