# perl not working

## rretz

I emerged perl

but still i can't read perl pages.

http://archibald.bitje.info/awstats/awstats.pl

anyone any idea's

thx a whole lot

----------

## WayHome

hi,

What do you mean when you say 'perl isn't working'? Have you written perl scripts that aren't working? How are you trying to read perl pages. Could you give a little more information.

William

----------

## rretz

yes i can sorry for my incoplete post.

i merged perl emere perl. Tis is al going well.

then i tried to emerge mod_perl but i think this is the one for apache 1.3.

as youcan see i installed awstat and this needs perl. well the page isn't translated.

first of all if you do emerge mod_perl it also merges ap[ache 1.3.xxxx. and now i don't kwon what to do?

thx for your reaction

----------

## WayHome

I could be wrong, because I don't use perl that much, but I'm not even sure mod_perl runs on apache2. I'm sorry I wasn't able to help more.

William

----------

## rretz

no prob, thx for trying.

i'm downloading it form the perl website mod_perl2 that is. Hope this works.

---

I need a cigar

----------

## yarick

Have you resolved the issue of .pl files not being parsed ?

And how ?

----------

## rretz

No i did not. resolve it yet

----------

## ShutterBC

Hello,

How have you configured your apache2.conf?  Are you telling Apache that you have mod_perl installed?

----------

## rretz

yes i did that.

every suggestion is welcome

thank you

----------

## thecooptoo

what happens when you access a perl script 

is it a *.pl or *.cgi script with the correct permissions (ownere apache:apache chmod 755)

does it comes as text ?

output of /tail/var/log/apche2/error_log?

have you got options ExecCGI for the relevant apache directory?

----------

## rretz

Yes it comes out as text

ofcourse i set 755 for the .pl file.

i never changed the owner before but did it now and it changes nothing

----------

## thecooptoo

have you got something like 

```
ScriptAlias /cgi-bin/ /var/www/localhost/cgi-bin/

```

in commonapahce2.conf

is+ExecCGI set for  the directory   that contained the script ?

assuming your script is  coming from /var/www/localhost/cgi-bin/

```

<Directory var/www/localhost/cgi-bin>

Options +ExecCGI

</Directory>

```

----------

## rretz

yes i've done all that

www.bitje.info/contact.html

if you klik "informatie verzenden" youl see !!!

only tekst.

parts from my common.conf

ScriptAlias /cgi-bin/ /var/www/site2/cgi-bin/

<IfModule mod_perl.c>

        #Provide two aliases to the same cgi-bin directory,

        #to see the effects of the 2 different mod_perl modes

        #for Apache::Registry Mode

        Alias /perl/ /var/www/site1/cgi-bin/

        #for Apache::Perlrun Mode

        Alias /cgi-perl/ /var/www/site2/cgi-bin/

</IfModule>

<Directory /var/www/site2/cgi-bin>

    AllowOverride All

    Options +ExecCGI

    <IfModule mod_access.c>

      Order allow,deny

      Allow from all

    </IfModule>

</Directory>

thx for the help so far

----------

## thecooptoo

niks to danken :wink: 

does any other perl script  do the correct thing  eg 

```
#!/usr/bin/perl

   print "Content-type: text/html\n\n";

   print "<tt>\n";

   foreach $key (sort keys(%ENV)) {

      print "$key = $ENV{$key}<p>";

   }

 
```

chmod/chown it and then call it and see what happens

----------

## ShutterBC

I was able to get mod_perl to work after following this howto:

http://gentoo-wiki.com/HOWTO_Apache2_with_perl

Have you read it?  It covered things like unmasking the version of mod_perl that works with Apache 2, and steps for how to edit the apache2 configuration files way gentoo has things set up.

Good luck.

----------

## rretz

i thought i knew something but it all falls to pieces

works

http://www.bitje.info/index2.php

doesn't work

http://www.bitje.info/test.php

----------

## bone

 *ShutterBC wrote:*   

> I was able to get mod_perl to work after following this howto:
> 
> http://gentoo-wiki.com/HOWTO_Apache2_with_perl
> 
> Have you read it?  It covered things like unmasking the version of mod_perl that works with Apache 2, and steps for how to edit the apache2 configuration files way gentoo has things set up.
> ...

 

Thanks for this bit of knowledge... I am not sure how my setup works now. As I do not have mod_perl emerged. All I did was alias .pl for .cgi and use them that way, and they seem to work fine. How is this different, or even working?

jt

----------

## ShutterBC

 *bone wrote:*   

>  All I did was alias .pl for .cgi and use them that way...

 

As far as I understand it, you can have Apache execute perl scripts even when mod_perl isn't emerged (type 'perl' at a prompt and see if you get anything; you should).  I have heard that mod_perl can provide a speed improvement over invoking perl from Apache but I'm a little out of my league for explaining how that works.  I believe I read this while looking through TWiki installation docs.

----------

