Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    51
    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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice