in reply to Re: Linux - Perl problem
in thread Linux - Perl problem

I'm sorry if I am annoying you, but I am new at this.

I installed Apache and I am now able to access the files using the 'http://abc/abc' format. However, whenever I tried to run the Perl script, I get asked if I want to "save it as".

So, I went and tried to edit 'httpd.conf'. I put the following lines in hoping that it would allow me to run the scripts:

<Directory /myfolder> Options ExecCGI </Directory>

But that didn't work. I even put in the following instead:

<Directory /myfolder> AllowOverride None Options +ExecCGI -Include SetHandler cgi-script .cgi <IfDefine PERL> AddHandler perl-script .pl </IfDefine> </Directory>

...or something like that(I'm writing off the top of my head). Failure once again. Can you please help me out?

-- zdog (Zenon Zabinski)
   Go Bells!! '¿'

Update: I finally got it after hacking into 'httpd.conf' for three hours. Thank you for everybody's help.

Replies are listed 'Best First'.
RE: RE: Re: Linux - Perl problem
by chromatic (Archbishop) on Jun 24, 2000 at 22:44 UTC
    Be sure that you're returning a valid header to the browser before any content. The standard header for HTML is: Content-type: text/html, followed by two newlines. If you're using CGI.pm, you can use the following: print $q->header(); Since you're privileged enough to use a Unix-like system, the Idiot's Guide to Solving Perl CGI Problems may be of use to you. (I read it five or six times while making my first Perl CGI, and two times for the second. Don't mind the title.)
RE: (3) Linux - Perl problem (solution?)
by ybiC (Prior) on Jul 06, 2000 at 19:29 UTC
    I know this is Perl Monks, not Apache Monks :^P but am curious what resolution you found, zdog. I might be of some assistance in further tweaking your Apache configs.
        cheers,
        ybiC