in reply to Perl CGI problem. Help please!!!!

If you're getting the code instead of it running it means you have a webserver configuration problem, not a Perl problem. Bug your sysadmin and/or consult the documentation for whatever webserver. See also the somewhat dated but still useful The Idiot's Guide to Solving Perl CGI Problems.

--
We're looking for people in ATL

Replies are listed 'Best First'.
Re^2: Perl CGI problem. Help please!!!!
by chakkaln (Sexton) on Jul 27, 2005 at 14:12 UTC
    Thank you davorg and Fletch I think what you pointed out about the webserver setting seems to be right. I have now moved the script to cgi-bin folder (file:///usr/local/apache/cgi-bin/simpleImage.cgi) and repeated chmod 755. It still does the same (showing the code). Does this mean that just putting the code in cgi-bin does not solve the purpose. The major issue is that we donot have a sys admin which means I should learn the hard way :( Thanks Nagesh

      Its not the directory that matters. If you're using Apache, it has to be told that the directory (cgi-bin) is allowed to execute code. It should look something like this in the httpd.conf file:

      <Directory /path/to/your/cgi-bin> Options ExecCGI Order allow,deny Allow from all </Directory>

      If you have IIS I'm not sure of the options

      Silly question.
      Did you use this url: file:///usr/local/apache/cgi-bin/simpleImage.cgi?
        Yes. is there some thing wrong in it. I presume the "?" should not really matter as I am no passing any parameters to it.
      I have now moved the script to cgi-bin folder (file:///usr/local/apache/cgi-bin/simpleImage.cgi) and repeated chmod 755. It still does the same (showing the code). Does this mean that just putting the code in cgi-bin does not solve the purpose.

      Sounds that way to me.

      Do you have _any_ CGI programs working on this web server? It looks like your server isn't configured to run CGI programs at all. If you told us which web server you were using, someone might be able to help you fix that.

      --
      <http://www.dave.org.uk>

      "The first rule of Perl club is you do not talk about Perl club."
      -- Chip Salzenberg

        I have no cgi scripts running on the webserver. This would be the first one Thanks