in reply to Ajax and CGI problem

Check your web server's error log. 403 Forbidden means what it says -- forbidden -- possibly a permissions issue, but it could be several different things: permissions on the directory (not just the script itself), web server configuration not allowing CGIs in this location, something denied in htaccess, etc. See the server log for details.

Aaron B.
My Woefully Neglected Blog, where I occasionally mention Perl.

Replies are listed 'Best First'.
Re^2: Ajax and CGI problem
by heatblazer (Scribe) on Mar 05, 2012 at 19:00 UTC

    I`ve tried to ran it as sudo even with sudo browse. I`ve checked the error log but did not get it at all...

    [Mon Mar 05 20:38:07 2012] [error] [client 127.0.0.1] script not found + or unable to stat: /opt/lampp/cgi-bin/ex2, referer: http://localhost +/form1.html [Mon Mar 05 20:46:15 2012] [error] Options ExecCGI is off in this dire +ctory/opt/lampp/cgi-bin/ex2.pl

    Any suggestions?

      The server error is fairly explicit about what's wrong: Options ExecCGI is off in this directory. Set it on in a config file apache will see at startup.

        I saw that, and tried to turn it on with Options ExecCGI in httpd.conf but nothing happens :(
        [Mon Mar 05 22:47:08 2012] [notice] Apache/2.2.21 (Unix) DAV/2 mod_ssl +/2.2.21 OpenSSL/1.0.0c PHP/5.3.8 mod_apreq2-20090110/2.7.1 mod_perl/2 +.0.5 Perl/v5.10.1 configured -- resuming normal operations [Mon Mar 05 22:47:18 2012] [error] [client 127.0.0.1] Premature end of + script headers: ex2, referer: http://localhost/form1.html
        Now I get error 500. I`ve browsed the net and they say to type in  Options ExecCGI but where to????