How to get Perl CGI working on Mac OS 10.5?

V

vol30w60

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?
 
V

vol30w60

vol30w60 said:
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)
 
S

szr

Keith said:
Then you probably have an Apache problem, not a Perl problem.


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>
 
C

Charlton Wilbur

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
 
S

szr

Sherman said:
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. :) )
 
S

szr

Charlton said:
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.
 
R

Randal L. Schwartz

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.
 
S

szr

Randal said:
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 :)
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top