G'day Chuma,

I'm runnng Mac OS X 10.10.3 (Yosemite). Your version, Mac OS X 10.11.x (El Capitan), has quite a few restrictions which are new: just be aware that information I've provided below may not be valid for your version. I don't believe these restrictions are related to your current issue (although I make no guarantees); however, as this is your "newest mac", it would be a good idea to acquaint yourself with them. The overall change is called "System Integrity Protection" (SIP). Here's a good article about SIP, with links to further information.

Simply running `sudo apachectl start` may not be sufficient. You may need to stop first; then start. I have the following sourced by .bash_profile:

alias bounce_apache='sudo apachectl stop 2> /dev/null; sudo apachectl +start'

I set this up some years ago (under Mac OS X 10.7.x, I think) and it's always worked well for me. Take a look at /usr/sbin/apachectl for other options.

I followed the instructions in http://editrocket.com/articles/perl_apache_mac.html and got the same results as you, i.e. just a program listing.

I then made the following changes to /etc/apache2/httpd.conf:

After running bounce_apache, http://localhost/cgi-bin/test.pl displays: Test Page

You may require slightly different changes depending on your setup but, I think, that should get you on track.

[Aside: Please markup URLs as links (see "Shortcuts for Markup Links" if you're unfamiliar with how to do this). Also note, my title has "Mac OS X" while yours has "Mac OS" which, I believe, is rather ancient (in computer terms).]

— Ken


In reply to Re: CGI on Mac OS X 10.11 by kcott
in thread CGI on Mac OS 10.11 by Chuma

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.