Use the technique demonstrated in Get default login environment. Your .profile is only executed when you log in via the shell, not when your CGI program is run, even if it is run under your user account.
In reply to Re: Access system ENV variables from within CGI Script
by Corion
in thread Access system ENV variables from within CGI Script
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |