The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SetEnv for cgi-bin

Discussion in 'General Discussion' started by jabowery, Mar 18, 2011.

  1. jabowery

    jabowery Registered

    Mar 18, 2011
    Likes Received:
    Trophy Points:
    The 'SetEnv' directive appears to have no effect whether I place it within the virtual host directive directly at http.conf (verboten, yes I know), within the (recommended) file at /usr/local/apache/conf/userdata/std/2/wpmpg/ OR within the cgi-bin/.htaccess file.

    I determine its effect by executing a script in cgi-bin/printenv.cgi consisting of:


    print "Content-type: text/html\n\n";
    print "<BODY BGCOLOR=black>\n";
    print "<FONT COLOR=white><P>";
    print `whoami`.'<br>';
    print $].'<br>';
    print "<tt>\n";

    foreach $key (sort keys(%ENV)) {
    print "$key = $ENV{$key}<BR>\n";

    print "</FONT></BODY>";

Share This Page