How to get Perl CGI working on Mac OS 10.5?

Discussion in 'Perl Misc' started by vol30w60, Jul 10, 2008.

  1. vol30w60

    vol30w60 Guest

    I've tried searching this topic and only found a few tutorials on this,
    but I still cannot get CGI working.

    The machine is Mac OS 10.5.3

    I do have Perl installed by default:
    perl -v
    This is perl, v5.8.8 built for darwin-2level


    I've set-up my Apache config files with the following options:

    <Directory "/Users/mike/Sites/">
    Options MultiViews Indexes SymLinksIfOwnerMatch Includes ExecCGI
    DirectoryIndex index.html index.shtml index.php
    AllowOverride FileInfo AuthConfig Limit
    AddHandler cgi-script .cgi
    <Limit GET POST OPTIONS PROPFIND>
    Order allow,deny
    Allow from all
    </Limit>
    <LimitExcept GET POST OPTIONS PROPFIND>
    Order deny,allow
    Deny from all
    </LimitExcept>
    </Directory>


    When I try to access a cgi script, it outputs the code (does not process
    the script):

    http://127.0.0.1/~mike/cgi-bin/test.cgi

    Output:
    #!/usr/bin/perl -wT
    print "Content-type: text/html\n\n";
    print "<h2>Hello, World!</h2>\n";


    file is set to:
    -rwxr-xr-x


    What am I missing?
    vol30w60, Jul 10, 2008
    #1
    1. Advertising

  2. vol30w60

    vol30w60 Guest

    vol30w60 wrote:
    > I've tried searching this topic and only found a few tutorials on this,
    > but I still cannot get CGI working.
    >
    > The machine is Mac OS 10.5.3
    >


    This problem has been solved.

    FYI, there are two configuration directories:
    /etc/httpd
    /etc/apache2

    Changes need to be made in /etc/apache2
    The files in /etc/httpd are ignored (and probably should just be deleted)
    vol30w60, Jul 10, 2008
    #2
    1. Advertising

  3. vol30w60

    szr Guest

    Keith Keller wrote:
    > On 2008-07-10, vol30w60 <> wrote:
    >> I've tried searching this topic and only found a few tutorials on
    >> this, but I still cannot get CGI working.

    >
    > Then you probably have an Apache problem, not a Perl problem.
    >
    >> When I try to access a cgi script, it outputs the code (does not
    >> process the script):

    >
    > Then you definitely have an Apache problem, not a Perl problem.
    >
    > Since you have an Apache problem, I suggest you try asking your
    > question in an Apache newsgroup. (I believe alt.apache.configuration
    > might be a good bet.)



    <side question>
    I never understood why that news group wasn't created up the 'comp.*'
    hierarchy and why it was made under 'alt.*', was there any particular
    reason for this?
    </side question>

    --
    szr
    szr, Jul 11, 2008
    #3
  4. >>>>> "szr" == szr <> writes:

    szr> <side question> I never understood why that news group
    szr> [alt.apache.configuration] wasn't created up the 'comp.*'
    szr> hierarchy and why it was made under 'alt.*', was there any
    szr> particular reason for this? </side question>

    Most likely, because there's a lengthy and involved process for creating
    groups under comp.*, but creating an alt.* group only requires a single
    sysadmin issuing a command.

    Charlton




    --
    Charlton Wilbur
    Charlton Wilbur, Jul 11, 2008
    #4
  5. vol30w60

    szr Guest

    Sherman Pendley wrote:
    > "szr" <> writes:
    >
    >> I never understood why that news group wasn't created up the 'comp.*'
    >> hierarchy and why it was made under 'alt.*', was there any particular
    >> reason for this?

    >
    > Huh? You posted this to comp.lang.perl.misc. There *is* an alt.perl
    > group, but this ain't it. :)


    I wasn't directing this at the 'alt.*' hierarchy, but rather the
    'comp.*' hierarchy. I am just curious of why it was created in 'alt.*'
    and not 'comp.*' like many other major languages, db, protocol and such,
    are. I would of thought a dedicated apache news group would have been a
    ripe candidate for the 'comp.*' hierarchy.

    (And I don't think I've ever used or seen the word "hierarchy" so much
    in a single short paragraph before. :) )

    --
    szr
    szr, Jul 11, 2008
    #5
  6. vol30w60

    szr Guest

    Charlton Wilbur wrote:
    >>>>>> "szr" == szr <> writes:

    >
    > szr> <side question> I never understood why that news group
    > szr> [alt.apache.configuration] wasn't created up the 'comp.*'
    > szr> hierarchy and why it was made under 'alt.*', was there any
    > szr> particular reason for this? </side question>
    >
    > Most likely, because there's a lengthy and involved process for
    > creating groups under comp.*, but creating an alt.* group only
    > requires a single sysadmin issuing a command.


    I am aware of that, but it didn't seem to be much of a problem for the
    hundreds of programming, database, web, and other such groups that are
    well established. It just always felt odd that a group for a major open
    source software like Apache ended up in the 'alt' realm. Oh well.

    --
    szr
    szr, Jul 11, 2008
    #6
  7. >>>>> "szr" == szr <> writes:

    szr> <side question>
    szr> I never understood why that news group wasn't created up the 'comp.*'
    szr> hierarchy and why it was made under 'alt.*', was there any particular
    szr> reason for this?
    szr> </side question>

    Not sure what that alt. group is doing there, but
    comp.infosystems.www.servers.unix has always been the apache group to me.

    --
    Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
    <> <URL:http://www.stonehenge.com/merlyn/>
    Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
    See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
    Randal L. Schwartz, Jul 11, 2008
    #7
  8. vol30w60

    szr Guest

    Randal L. Schwartz wrote:
    >>>>>> "szr" == szr <> writes:

    >
    > szr> <side question>
    > szr> I never understood why that news group wasn't created up the
    > szr> 'comp.*' hierarchy and why it was made under 'alt.*', was there
    > szr> any particular reason for this?
    > szr> </side question>
    >
    > Not sure what that alt. group is doing there, but
    > comp.infosystems.www.servers.unix has always been the apache group to
    > me.


    Ah I completely forgot about that group, although it's not precisely a
    dedicated apache group, believe it's close enough :)

    --
    szr
    szr, Jul 13, 2008
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jürgen Exner

    Re: CGI Perl "use CGI" statement fail

    Jürgen Exner, Jul 31, 2003, in forum: Perl
    Replies:
    0
    Views:
    1,287
    Jürgen Exner
    Jul 31, 2003
  2. praba kar

    Python-cgi or Perl-cgi script doubt

    praba kar, Jul 30, 2005, in forum: Python
    Replies:
    1
    Views:
    551
    Michael Sparks
    Jul 30, 2005
  3. excord80
    Replies:
    17
    Views:
    648
    J Kenneth King
    Jan 29, 2009
  4. GMI
    Replies:
    5
    Views:
    130
    Sherm Pendley
    Jun 16, 2005
  5. kath
    Replies:
    4
    Views:
    586
    J. Gleixner
    Apr 9, 2007
Loading...

Share This Page