For Programmers: Free Programming Magazines  


Home > Archive > PERL CGI Beginners > May 2004 > Perl on Apache









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Perl on Apache
Sumanth Sharma

2004-05-22, 11:32 am

Hi All,

Pls Bare with me If I am scratching some rudimental stuff here
I know perl lang Fundas. But...
----------------------------------------------------------------------------
-
[
Some Historical background for my problem ....
{History: I want a project management system, so I plan
to use Twiki.
So, to I plan to use some Perl/CGI to manage this. I have
Installed "Apache
2.0" on D:\\ApacheGroup\Apache2". I have also Installed
mod_perl over
Activestate 5.8.3 build 509 " }

I have also configured loop-back i.e 127.0.0.1:80
as my web-server
]
------------------------------------------------------------------------
Coming to my Question,

Now, I placed a file called host.pl, in the cgi-bin folder

but when I invoke http://127.0.0.1/cgi-bin/host.pl
My browser tries to download this file.

But I expected Apache/ or Perl to have executed this script.
[I have used Win2K pro SP4, ActiveState Perl 5.8.3 build 809, apache 2.0, IE
6.0, mod_perl 2.0]

Where have I gone wrong ??
or
How do I get my Perl scripts running on the web-server
Pls help me.



Thanks In Advance,
Sumanth



Geraint Jones

2004-05-22, 11:32 am

I'm not an apache guru, but I had a similar problem on Linux. You need to a=
dd=20
the following directive into a "conf" file. I've never installed apache on=
=20
Windows before so I'm not sure where you need to put it. On Linux I added i=
t=20
to "default-server.conf", but there might be a better place for it.

<Directory path_to_perl_script_directory>
=A0=A0=A0=A0=A0=A0=A0=A0Options +ExecCGI
=A0=A0=A0=A0=A0=A0=A0=A0AddHandler cgi-script .pl
</Directory>

I recommend you also join the apache mailing list, that's where I had help=
=20
with this problem. Actually, your question is more suited to that list than=
=20
this one.

http://httpd.apache.org/userslist.html

On Tuesday 04 May 2004 13:06, Sumanth Sharma wrote:
> Hi All,
>
> Pls Bare with me If I am scratching some rudimental stuff here
> I know perl lang Fundas. But...
> -------------------------------------------------------------------------=

=2D-
>- -
> [
> Some Historical background for my problem ....
> {History: I want a project management system, so I plan
> to use Twiki.
> So, to I plan to use some Perl/CGI to manage this. I have
> Installed "Apache
> 2.0" on D:\\ApacheGroup\Apache2". I have also Installed
> mod_perl over
> Activestate 5.8.3 build 509 " }
>
> I have also configured loop-back i.e 127.0.0.1:80
> as my web-server
> ]
> ------------------------------------------------------------------------
> Coming to my Question,
>
> Now, I placed a file called host.pl, in the cgi-bin folder
>
> but when I invoke http://127.0.0.1/cgi-bin/host.pl
> My browser tries to download this file.
>
> But I expected Apache/ or Perl to have executed this script.
> [I have used Win2K pro SP4, ActiveState Perl 5.8.3 build 809, apache 2.0,
> IE 6.0, mod_perl 2.0]
>
> Where have I gone wrong ??
> or
> How do I get my Perl scripts running on the web-server
> Pls help me.
>
>
>
> Thanks In Advance,
> Sumanth


=2D-=20
Geraint Jones

Wiggins D Anconia

2004-05-22, 11:32 am

Please bottom post...

> I'm not an apache guru, but I had a similar problem on Linux. You need

to add
> the following directive into a "conf" file. I've never installed

Apache on
> Windows before so I'm not sure where you need to put it. On Linux I

added it
> to "default-server.conf", but there might be a better place for it.
>
> <Directory path_to_perl_script_directory>
> Options +ExecCGI
> AddHandler cgi-script .pl
> </Directory>
>


Since this has now come up twice I thought I would at least remark on
it. Using ExecCGI is a hack that should not be taken lightly. If you
don't know what it does precisely then you probably don't need it, and
certainly shouldn't be using it. Better to use a ScriptAlias directory
when setting up a cgi-bin, for more information:

http://httpd.apache.org/docs/howto/...achetopermitcgi
http://httpd.apache.org/docs-2.0/howto/cgi.html

Certainly ExecCGI has its purposes, but don't think it applies here.

> I recommend you also join the apache mailing list, that's where I had

help
> with this problem. Actually, your question is more suited to that list

than
> this one.
>
> http://httpd.apache.org/userslist.html
>


Definitely a good suggestion.

http://danconia.org

> On Tuesday 04 May 2004 13:06, Sumanth Sharma wrote:
---------------------------------------------------------------------------[color=darkred]
I plan[color=darkred]
I have[color=darkred]
Installed[color=darkred]
2.0,[color=darkred]
>


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com