in reply to Re: Incorrect output from CGI script
in thread Incorrect output from CGI script

Oops, sorry it should be http://localhost/cgi-bin/myfirst_cgi.pl , I change the code name 'on the fly', really sorry. So no, I am calling the right script.

What do you mean by ENV script btw? How/where can I get it?

Replies are listed 'Best First'.
Re^3: Incorrect output from CGI script
by davido (Cardinal) on Jan 26, 2005 at 17:27 UTC

    Try naming the script "myfirst_cgi.cgi" instead of ".pl". Sometimes webservers are configured to expect that. Make sure permissions are set properly for the script to be executed by your webserver also. Sometimes webservers are of group "nobody", for example. And make sure the shebang line is correct.


    Dave

Re^3: Incorrect output from CGI script
by injunjoel (Priest) on Jan 26, 2005 at 20:21 UTC
    Greetings all,
    The ENV script is a script written to print out all of the name=value pairs of the the %ENV hash. The %ENV hash contains elements relating to your environment, which in most cases differs depending on where a particular script is run (i.e. executed from a web server vs. from the command line.). The output you posted looks like an ENV script as described above and the reason test.pl was mentioned is that the environment variables SCRIPT_NAME and REQUEST_URI are both set to /cgi-bin/test.pl. If this was your script it would be set to /cgi-bin/myfirst_cgi.pl.

    -InjunJoel
    "I do not feel obliged to believe that the same God who endowed us with sense, reason and intellect has intended us to forego their use." -Galileo