Find the answer to your Linux question:
Results 1 to 3 of 3
The message is What should Firefox do with this file? etc" I am running SUSE 10.1 at home. With Firefox I open http://localhost/myscript.html , which includes <FORM METHOD="POST" ACTION="cgi-bin/myscript.cgi"> myscript.cgi ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2006
    Posts
    8

    Apache will not run cgi script


    The message is
    What should Firefox do with this file? etc"

    I am running SUSE 10.1 at home.
    With Firefox I open http://localhost/myscript.html, which includes
    <FORM METHOD="POST" ACTION="cgi-bin/myscript.cgi">

    myscript.cgi is a Perl script, beginning with
    #!/usr/bin/perl <-- path verified
    read(STDIN,$temp,$ENV{'CONTENT_LENGTH'});
    .... etc.

    When POST in the html file is executed, I get:
    "you have chosen to open myscript.cgi which is a CGI script from http://localhost
    What should Firefox do with this file? etc"

    When I put the same html and cgi files on a commercial server they work.

    Do I not have CGI enabled in Apache?

    /etc/apache2/default-server.conf contains this:

    ScriptAlias /cgi-bin/ "/hdb/www/cgi-bin/"
    <Directory "/hdb/www/cgi-bin">
    AllowOverride None
    Options +ExecCGI -Includes
    Order allow,deny
    Allow from all
    </Directory>

    I would greatly appreciate any suggestions.
    Peter

  2. #2
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077
    does the user apache runs as have execute permissions on the cgi file?
    chmod +x
    should do it if the apache user already owns the file

  3. #3
    Just Joined!
    Join Date
    May 2006
    Posts
    8
    Yes, I have tried both 755 and 777.
    Peter

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •