For Programmers: Free Programming Magazines  


Home > Archive > PERL CGI Beginners > June 2006 > Problems with CGI and mod_perl









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 Problems with CGI and mod_perl
Sfantar

2006-06-17, 7:56 am

Hello everyone

I have started since today learning how to write cgi in Perl with this
doc : http://users.easystreet.com/ovid/cg...lesson_one.html

I am running ubuntu on my pc and I installed the package mod_perl made
by ubuntu a few days ago and I was able to run Perl scripts from the
Apache. I read this doc to do it :
http://perl.apache.org/docs/2.0/use...start_fast.html

But while keeping on reading docs about Perl programming, I discovered
that it is possible to install modules directly from the command line
'perl -MCPAN -e shell'.

After installing some modules I didn't find in Ubuntu packages, the path
to per changed from originally /usr/bin/perl to /usr/local/bin/perl .

As a consequence,on my server where the perl scripts, I changed the path
to the Perl interpreter from /usr/bin/perl to /usr/local/bin/perl.

I have also reinstalled the Ubuntu mod_perl package but no change.
Finally, each time I want to run a simple Perl script on my server, my
browser asks me to download it.

I don't know what to do.
Thanks you very much for your help.

Sami
Jonathan Mangin

2006-06-17, 7:56 am


----- Original Message -----
From: "sfantar" <sfantar@laposte.net>
To: <beginners-cgi@perl.org>
Sent: Tuesday, June 06, 2006 1:21 PM
Subject: Problems with CGI and mod_perl


> Hello everyone
>
> I have started since today learning how to write cgi in Perl with this
> doc : http://users.easystreet.com/ovid/cg...lesson_one.html
>
> I am running ubuntu on my pc and I installed the package mod_perl made
> by ubuntu a few days ago and I was able to run Perl scripts from the
> Apache. I read this doc to do it :
> http://perl.apache.org/docs/2.0/use...start_fast.html
>
> But while keeping on reading docs about Perl programming, I discovered
> that it is possible to install modules directly from the command line
> 'perl -MCPAN -e shell'.
>
> After installing some modules I didn't find in Ubuntu packages, the path
> to per changed from originally /usr/bin/perl to /usr/local/bin/perl .
>
> As a consequence,on my server where the perl scripts, I changed the path
> to the Perl interpreter from /usr/bin/perl to /usr/local/bin/perl.
>
> I have also reinstalled the Ubuntu mod_perl package but no change.
> Finally, each time I want to run a simple Perl script on my server, my
> browser asks me to download it.
>
> I don't know what to do.
> Thanks you very much for your help.
>
> Sami
>

I don't know why paths would change after installing modules
with CPAN but /usr/bin/perl is typically a symbolic link to
/usr/local/bin/perl.

ln -s /usr/local/bin/perl /usr/bin/perl

JM

boyd

2006-06-17, 7:56 am

In article <010e01c68993$85600c60$7a01a8c0@rover>,
jon.mangin@comcast.net (Jonathan Mangin) wrote:

> ----- Original Message -----
> From: "sfantar" <sfantar@laposte.net>
> To: <beginners-cgi@perl.org>
> Sent: Tuesday, June 06, 2006 1:21 PM
> Subject: Problems with CGI and mod_perl
>
>
> I don't know why paths would change after installing modules
> with CPAN but /usr/bin/perl is typically a symbolic link to
> /usr/local/bin/perl.
>
> ln -s /usr/local/bin/perl /usr/bin/perl
>
> JM


I would try just the opposite, since on my Ubuntu, the default location
of perl is /usr/bin/perl, and it is not a symbolic link. So you can try
fixing your problem with:
sudo ln -s /usr/bin/perl /usr/local/bin/perl

When you ran perl -MCPAN -e shell
the first time, it probably asked you lots of questions and you probably
answered with the default answers. If you go into your cpan directory,
usually your home_directory/.cpan, and look in .cpan/CPAN, you can edit
MyConfig.pm to try to fix a difficulty.

I think, however, that the CPAN module checks perl -V output to see
where to install the new modules. You might tell us what you see when
you type:
which perl
perl -V
to help solve your problem.

Boyd
Sponsored Links







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

Copyright 2008 codecomments.com