Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] configure Perl + Mod_Perl + apache2
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
chieuphu
Tux's lil' helper
Tux's lil' helper


Joined: 11 Aug 2004
Posts: 131

PostPosted: Wed Apr 12, 2006 2:40 pm    Post subject: [solved] configure Perl + Mod_Perl + apache2 Reply with quote

I got my apache2 working. I then install mod_perl and add -D PERL on my apache config file but it does not seem to understand *.pl. What else do I need to configure??
I am running
net-www/apache-2.0.55-r1
dev-lang/perl-5.8.7-r3
www-apache/mod_perl-1.27-r4


Last edited by chieuphu on Tue Aug 08, 2006 6:44 pm; edited 1 time in total
Back to top
View user's profile Send private message
orionrobots
Apprentice
Apprentice


Joined: 07 Oct 2003
Posts: 289
Location: London, Uk

PostPosted: Wed Apr 12, 2006 3:21 pm    Post subject: mime.types file Reply with quote

Have you considered addding the file extension into the mime.types config file? That may be what you require to handle it correctly.

Cheers,
Danny
_________________
Danny Staple, curator of http://orionrobots.co.uk
Adopt an unanswered post initiative https://forums.gentoo.org/search.php?search_id=unanswered
Back to top
View user's profile Send private message
chieuphu
Tux's lil' helper
Tux's lil' helper


Joined: 11 Aug 2004
Posts: 131

PostPosted: Wed Apr 12, 2006 5:50 pm    Post subject: Re: mime.types file Reply with quote

orionrobots wrote:
Have you considered addding the file extension into the mime.types config file? That may be what you require to handle it correctly.

Cheers,
Danny


could you tell me what line should be added? Thanks
Back to top
View user's profile Send private message
kashani
Advocate
Advocate


Joined: 02 Sep 2002
Posts: 2032
Location: San Francisco

PostPosted: Wed Apr 12, 2006 6:37 pm    Post subject: Reply with quote

You need mod_perl-2 and not mod_perl-1 if you're using Apache 2.0. I'd get that worked out first.

kashani
_________________
Will personally fix your server in exchange for motorcycle related shop tools in good shape.
Back to top
View user's profile Send private message
chieuphu
Tux's lil' helper
Tux's lil' helper


Joined: 11 Aug 2004
Posts: 131

PostPosted: Wed Apr 12, 2006 7:27 pm    Post subject: Reply with quote

kashani wrote:
You need mod_perl-2 and not mod_perl-1 if you're using Apache 2.0. I'd get that worked out first.

kashani


Apparently, it is the latest version on my server. Do I need to update portage to get the newer version of mod_perl??
Back to top
View user's profile Send private message
think4urs11
Bodhisattva
Bodhisattva


Joined: 25 Jun 2003
Posts: 6659
Location: above the cloud

PostPosted: Wed Apr 12, 2006 7:34 pm    Post subject: Reply with quote

chieuphu wrote:
Apparently, it is the latest version on my server. Do I need to update portage to get the newer version of mod_perl??

Time for emerge sync?

Code:
# ls -la /usr/portage/www-apache/mod_perl   
insgesamt 78
drwxr-xr-x   3 root root   520  8. Apr 22:38 .
drwxr-xr-x  27 root root   808 12. Apr 05:43 ..
-rw-r--r--   1 root root 12380  8. Apr 22:38 ChangeLog
drwxr-xr-x   5 root root   720 26. Feb 16:36 files
-rw-r--r--   1 root root  7849  8. Apr 22:38 Manifest
-rw-r--r--   1 root root   305  9. Mai 2005  metadata.xml
-rw-r--r--   1 root root  1387 12. Nov 17:38 mod_perl-1.27-r1.ebuild
-rw-r--r--   1 root root  1406 12. Nov 17:38 mod_perl-1.27-r2.ebuild
-rw-r--r--   1 root root  1781 12. Nov 17:38 mod_perl-1.27-r4.ebuild
-rw-r--r--   1 root root  1865 26. Feb 16:06 mod_perl-1.29.ebuild
-rw-r--r--   1 root root  3796 13. Feb 16:36 mod_perl-1.99.11.ebuild
-rw-r--r--   1 root root  3811 13. Feb 16:36 mod_perl-1.99.16.ebuild
-rw-r--r--   1 root root  4833 13. Feb 16:36 mod_perl-2.0.1-r1.ebuild
-rw-r--r--   1 root root  5290  8. Apr 22:38 mod_perl-2.0.1-r2.ebuild
-rw-r--r--   1 root root  5309 26. Feb 15:53 mod_perl-2.0.2.ebuild


1.29 + 2.0.1-r2 are marked stable
_________________
Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself
Back to top
View user's profile Send private message
chieuphu
Tux's lil' helper
Tux's lil' helper


Joined: 11 Aug 2004
Posts: 131

PostPosted: Wed Apr 12, 2006 8:30 pm    Post subject: Reply with quote

When I emerge mod_perl, I got this error
Code:
ACCESS DENIED  chmod:     /usr/lib/perl5/vendor_perl/5.8.7/i686-linux/Apache/test.pm
ACCESS DENIED  unlink:    /usr/lib/perl5/vendor_perl/5.8.7/i686-linux/Apache/test.pm
Cannot forceunlink /usr/lib/perl5/vendor_perl/5.8.7/i686-linux/Apache/test.pm: Permission denied at -e line 1
unlink /usr/lib/perl5/vendor_perl/5.8.7/i686-linux/Apache/test.pm
make: *** [nuke_Apache__test] Error 13

!!! ERROR: www-apache/mod_perl-2.0.1-r2 failed.
!!! Function src_install, Line 127, Exitcode 2
!!! (no error message)
!!! If you need support, post the topmost build error, NOT this status message.

--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/var/log/sandbox/sandbox-www-apache_-_mod_perl-2.0.1-r2-27546.log"

chmod:     /usr/lib/perl5/vendor_perl/5.8.7/i686-linux/Apache/test.pm
unlink:    /usr/lib/perl5/vendor_perl/5.8.7/i686-linux/Apache/test.pm
--------------------------------------------------------------------------------


I tried to do
Code:
FEATURES="-sandbox" emerge mod_perl
but it does not work. Please help.
Back to top
View user's profile Send private message
kashani
Advocate
Advocate


Joined: 02 Sep 2002
Posts: 2032
Location: San Francisco

PostPosted: Wed Apr 12, 2006 9:00 pm    Post subject: Reply with quote

There were some sandbox issues last month or two if you're running an older version of sandbox. I'd do an emerge -upv portage and see what it wants to install. If it doesn't look too onerous update portage and everything it depends on which will include sandbox and then try the emerge of mod_perl again.

Adding -sandbox to that field in /etc/make.conf doesn't work... I know I tried that when i had the same issue. :)

kashani
_________________
Will personally fix your server in exchange for motorcycle related shop tools in good shape.
Back to top
View user's profile Send private message
orionrobots
Apprentice
Apprentice


Joined: 07 Oct 2003
Posts: 289
Location: London, Uk

PostPosted: Wed Apr 12, 2006 9:22 pm    Post subject: Re: mime.types file Reply with quote

chieuphu wrote:

could you tell me what line should be added? Thanks


While it sounds like you may have bigger fish to fry first, this one is not too hard, you add a line that looks something like:
Code:
application/x-perl              pl pm


Danny
_________________
Danny Staple, curator of http://orionrobots.co.uk
Adopt an unanswered post initiative https://forums.gentoo.org/search.php?search_id=unanswered
Back to top
View user's profile Send private message
chieuphu
Tux's lil' helper
Tux's lil' helper


Joined: 11 Aug 2004
Posts: 131

PostPosted: Wed Apr 12, 2006 9:29 pm    Post subject: Reply with quote

kashani wrote:
There were some sandbox issues last month or two if you're running an older version of sandbox. I'd do an emerge -upv portage and see what it wants to install. If it doesn't look too onerous update portage and everything it depends on which will include sandbox and then try the emerge of mod_perl again.

Adding -sandbox to that field in /etc/make.conf doesn't work... I know I tried that when i had the same issue. :)

kashani


This is what I got
Code:
emerge -upv portage

These are the packages that I would merge, in order:

Calculating dependencies ...done!

Total size of downloads: 0 kB


I try to emerge sandbox again and then emerge mod_perl but the problem is still there.
Back to top
View user's profile Send private message
chieuphu
Tux's lil' helper
Tux's lil' helper


Joined: 11 Aug 2004
Posts: 131

PostPosted: Thu Apr 13, 2006 2:10 pm    Post subject: Reply with quote

chieuphu wrote:
kashani wrote:
There were some sandbox issues last month or two if you're running an older version of sandbox. I'd do an emerge -upv portage and see what it wants to install. If it doesn't look too onerous update portage and everything it depends on which will include sandbox and then try the emerge of mod_perl again.

Adding -sandbox to that field in /etc/make.conf doesn't work... I know I tried that when i had the same issue. :)

kashani


This is what I got
Code:
emerge -upv portage

These are the packages that I would merge, in order:

Calculating dependencies ...done!

Total size of downloads: 0 kB


I try to emerge sandbox again and then emerge mod_perl but the problem is still there.


I unmerge the older version and then emerge mod_perl runs alright, but still cannot have *.pl files understood yet.
Back to top
View user's profile Send private message
GrimSage
n00b
n00b


Joined: 13 Sep 2004
Posts: 42

PostPosted: Fri Jul 14, 2006 1:07 pm    Post subject: Reply with quote

Have you gotten this to work? I have yet been able to get mine to work either.
Back to top
View user's profile Send private message
Thavian
n00b
n00b


Joined: 20 Jul 2006
Posts: 13

PostPosted: Thu Jul 20, 2006 1:48 am    Post subject: Reply with quote

chieuphu wrote:
I unmerge the older version and then emerge mod_perl runs alright, but still cannot have *.pl files understood yet.


GrimSage wrote:
Have you gotten this to work? I have yet been able to get mine to work either.


Check your mod_perl.conf file in /etc/apache2/modules.d/ should have a name like 75_mod_perl.conf

You should find a line that looks something like:
Code:

    <Location /cgi-perl/*.pl>
        SetHandler perl-script
        PerlResponseHandler ModPerl::PerlRun
        Options -Indexes ExecCGI
        PerlSendHeader On
    </Location>



I'm no apache guru but im pretty sure this restrict .pl files to only being parsed when in the said /cgi-perl/ directory. I caught a piece of code from the gentoo-wiki http://gentoo-wiki.com/Apache_Modules_mod_perl which states if you use this

Code:
   
   <Files ~ "\.(pl)$">
       SetHandler perl-script
       PerlResponseHandler ModPerl::PerlRun
       Options +ExecCGI
       PerlSendHeader On
   </Files>



then you can use pl files anywhere you want.

Hope this helps.
Back to top
View user's profile Send private message
chieuphu
Tux's lil' helper
Tux's lil' helper


Joined: 11 Aug 2004
Posts: 131

PostPosted: Mon Jul 31, 2006 2:25 pm    Post subject: Reply with quote

Thavian wrote:
chieuphu wrote:
I unmerge the older version and then emerge mod_perl runs alright, but still cannot have *.pl files understood yet.


GrimSage wrote:
Have you gotten this to work? I have yet been able to get mine to work either.


Check your mod_perl.conf file in /etc/apache2/modules.d/ should have a name like 75_mod_perl.conf

You should find a line that looks something like:
Code:

    <Location /cgi-perl/*.pl>
        SetHandler perl-script
        PerlResponseHandler ModPerl::PerlRun
        Options -Indexes ExecCGI
        PerlSendHeader On
    </Location>



I'm no apache guru but im pretty sure this restrict .pl files to only being parsed when in the said /cgi-perl/ directory. I caught a piece of code from the gentoo-wiki http://gentoo-wiki.com/Apache_Modules_mod_perl which states if you use this

Code:
   
   <Files ~ "\.(pl)$">
       SetHandler perl-script
       PerlResponseHandler ModPerl::PerlRun
       Options +ExecCGI
       PerlSendHeader On
   </Files>



then you can use pl files anywhere you want.

Hope this helps.


I am having www-apache/mod_perl-2.0.1-r2, dev-lang/perl-5.8.8-r2 and net-www/apache-2.0.58 now. The web browser still does not understand *.pl file. Please help.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum