Is anyone experienced at enabling CGI using XAMPP for Mac OS X? I would like to use perl to execute scripts from cgi-bin/. After having read the on-line manuals, asked around, and read the on-line manuals again, the server is still giving me:

Error 403 Access forbidden! You don't have permission to access the requested object. It is either read-protected or not readable by the server.

Which obviously tells me this is a permissions issue.

I believe my permissions are correct:

In cgi-bin/

-rwxr-xr-x 1 root admin 43 Jan 28 07:06 form_query.pl

In the error_log:

in error_log: Options ExecCGI is off in this directory/Applications/XAMPP/xamppfiles/cgi-bin/form_query.pl

So, I go to httpd.conf to turn ExecCGI on:

Lines from httpd.conf file:

ScriptAliasMatch ^/cgi-bin/((?!(?i:webobjects)).*$) "/Library/WebServe +r/CGI-Executables/$1"

(That looks funny, btw, but I have not changed it...

AddHandler cgi-script .cgi .pl # "/Library/WebServer/CGI-Executables" should be changed to whatever y +our ScriptAliased # CGI directory exists, if you have that configured. # <Directory "/Library/WebServer/CGI-Executables"> AllowOverride None Options ExecCGI Order allow,deny Allow from all </Directory>

That did not work, so I tried enabling CGI in the directory that my cgi executable files are in:

<Directory "/Applications/XAMPP/xamppfiles/cgi-bin/"> AllowOverride None Options Indexes FollowSymLinks MultiViews ExecCGI Order allow,deny Allow from all </Directory>

But still the 403 error persists

Could the problem be here? When calling ls -l in the XAMPP directory:

drwxr-xr-x 3 user admin 102 Aug 16 07:35 XAMPP Control.app lrwxr-xr-x 1 user admin 18 Sep 27 09:49 cgi-bin -> xamppfiles/cgi +-bin lrwxr-xr-x@ 1 user admin 14 Sep 27 09:49 etc -> xamppfiles/etc lrwxr-xr-x 1 user admin 17 Sep 27 09:49 htdocs -> xamppfiles/htdo +cs lrwxr-xr-x@ 1 user admin 15 Sep 27 09:49 logs -> xamppfiles/logs drwxr-xr-x@ 23 root admin 782 Aug 16 07:36 xamppfiles

Is there a problem with the Symlinks? Any help would be very much appreciated.

I am running Mac OS X 10.5.7, with XAMPP for Mac OS X (Apache 2.0, Perl5, mod_perl 2.0.4)

Thank you!


In reply to Enabling CGI using XAMPP for Mac OS X by Shuraski

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.