in reply to Re: Perl CGI problem. Help please!!!!
in thread Perl CGI problem. Help please!!!!

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
  • Comment on Re^2: Perl CGI problem. Help please!!!!

Replies are listed 'Best First'.
Re^3: Perl CGI problem. Help please!!!!
by cfreak (Chaplain) on Jul 27, 2005 at 14:21 UTC

    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

Re^3: Perl CGI problem. Help please!!!!
by Iron (Scribe) on Jul 27, 2005 at 14:29 UTC
    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.

        A 'file:///' url won't use a web server. It just opens the file in your browser. You can only test CGI programs by going through a browser.

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

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

Re^3: Perl CGI problem. Help please!!!!
by davorg (Chancellor) on Jul 27, 2005 at 14:16 UTC
    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