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

    Joined:
    Mar 18, 2011
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    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/wpmpg.com/cgi_environment.conf OR within the cgi-bin/.htaccess file.

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


    #!/usr/bin/perl

    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>";
     
Loading...

Share This Page