Re: Help getting Perl/CGI running on OS X localhost with apache



petermichaux@xxxxxxxxx <petermichaux@xxxxxxxxx> wrote:

> I am trying to learn about perl and cgi.


Have you checked the Perl FAQs that mention the CGI?

perldoc -q CGI

Where can I learn about CGI or Web programming in Perl?

What is the correct form of response from a CGI script?

My CGI script runs from the command line but not the browser. (500
Server Error)

How can I get better error messages from a CGI program?

How do I make sure users can't enter values into a form that cause my
CGI script to do bad things?

How do I decode a CGI form?


> The only difference from that webpage is my configure file will parse
> ".shtml" files instead of ".html" files.


Get it to work with .html first.

Once that is working, then move on to getting it to work with secure HTML.


> print "Content-type: text/html\n\n";
> print "Hello, World!\n";


You shouldn't say that you will be giving HTML unless you actually
give HTML.

Your output looks a lot more line text/plain than text/html.


> At the terminal command line I can successfully run the command "perl
> first.cgi".


Then you do not have a Perl problem, your problem is somewhere else.


> When i point my browser to "http://localhost/~peter/first.cgi"; I get
> the following message
>
> Forbidden
> You don't have permission to access /~peter/first.cgi on this server.


> Is apache
> not configured correctly?


Yes, your web server appears to be not configured correctly.


> Do i need any extra files in my sites folder?


I dunno, we help with Perl here.

Folks that can help with server setup hang out somewhere else.


> Any help greatly appreciated!!!!!


Ask Perl questions in a Perl newsgroup.

Ask server setup questions in a server newsgroup, such as:

comp.infosystems.www.servers.mac


--
Tad McClellan SGML consulting
tadmc@xxxxxxxxxxxxxx Perl programming
Fort Worth, Texas
.



Relevant Pages

  • Re: arrange form data in same order as on form
    ... > CGI invocation need in comparison? ... mod_perl is of course suitable in order to further reduce the server ... would allow 5 times when only the Perl part is taken into account. ... > need no advice from me. ...
    (comp.lang.perl.misc)
  • Re: start_table problem
    ... Fabian Pilkowski wrote: ... and end_tag_name functions are not generated automatically when you use CGI. ... when using ActiveState's Perl all these informations are ... already available in HTML format. ...
    (comp.lang.perl.misc)
  • Re: Why does Perl use more resource than Php?
    ... > server process. ... amount of required RAM just as executing a pure CGI process would. ... Perl and/or Apache API to exchange information with the server, ...
    (comp.lang.perl.misc)
  • Creating status bar
    ... It has been some time since I posted, mainly because I do not have many Perl ... to a destination server utilizing rsync. ... # perlPromote.cgi by John Pretti ... # Create New CGI Object ...
    (perl.beginners)
  • Re: [HELP] code modification
    ... Getting a program to run under CGI can be difficult, ... There is also more risk if the script involves sending e-mail or ... version of perl you are using. ... Investigate the CGI module for acquiring HTML form data. ...
    (comp.lang.perl.misc)