Tags:
create new tag
view all tags

Question

I have installed apache 2.0.48 with mod_perl 1.99_11 on a Gentoo Linux system. The testenv script at http://www.theoretic.com/bin/testenv says that mod_perl is installed in Apache and that the script is using it, so all good on that front. And visiting http://www.theoretic.com/bin/view is nice and speedy, so that seems to be working, too.

However, when I visit a web or topic under the base view script ( such as http://www.theoretic.com/bin/view/Ransom/Home ), I get an Error 500, and the following in the Apache error log:

Feb 21 22:50:18 mathaw apache2[18620]: [error] [client 209.16.240.20] Error reading
'/var/www/theoretic/bin/view': 9:Bad file descriptor  at
/usr/lib/perl5/vendor_perl/5.8.2/i686-linux/Apache2/ModPerl/RegistryCooker.pm line 528. ,
referer: http://www.theoretic.com/bin/view

If I reload, then the Error 500 is replaced by the correct mod_perl generated page (so I assume), but the Error 500 occurs everytime I visit a new URL under the view script until I yet again reload.

Here is the excerpt of the VirtualHost section of my httpd.conf:

<VirtualHost 66.45.74.31:80>
        ServerAdmin root@theoretic.com
        DocumentRoot /var/www/theoretic
        ServerName www.theoretic.com
        ServerAlias theoretic.com *.theoretic.com

        PerlOptions +ParseHeaders +SetupEnv
        PerlRequire "/etc/apache2/conf/modules.d/apache2-mod_perl-startup.pl"
        PerlModule Apache2::ModPerl::Registry
        PerlWarn On

        ErrorDocument 401 /bin/oops/System/Registration?template=oopsauth

<IfModule mod_dir.c>
        DirectoryIndex Home.html index.html index.php
</IfModule>
#<IfModule mod_log_config.c>
#       LogFormat
#</IfModule>
<IfModule mod_alias.c>
        ScriptAlias /bin/ "/var/www/theoretic/bin/"
        Alias / "/var/www/theoretic/"
        Alias /icons/ /var/www/localhost/icons/
        Alias /doc /usr/share/doc
</IfModule>

<Directory /var/www/theoretic>
        Options FollowSymLinks +Includes
        AllowOverride None
        Allow from all
</Directory>
<Directory /var/www/theoretic/bin>
        SetHandler perl-script
        PerlResponseHandler ModPerl::Registry
        Options -Indexes ExecCGI
        PerlSendHeader On
        Allow from all

        AuthName 'Enter your Theoretic username and password'
        AuthType Basic

        AuthLDAPEnabled on
        AuthLDAPUrl ldap://theoretic.com:389/ou=persons,dc=theoretic?uid?one

<Files ~ "[^/]*\.html$">
       SetHandler blabla
       allow from all
</Files>

<Files "viewauth">
       require valid-user
</Files>

<Files "edit">
       require valid-user
</Files>

<Files "preview">
       require valid-user
</Files>

<Files "save">
       require valid-user
</Files>

<Files "attach">
       require valid-user
</Files>

<Files "upload">
       require valid-user
</Files>

<Files "rename">
       require valid-user
</Files>

<Files "rdiffauth">
       require valid-user
</Files>

<Files "manage">
       require valid-user
</Files>

<Files "installpasswd">
       require valid-user
</Files>

<Files "*">
       allow from all
</Files>

</Directory>
<Directory "/var/twiki/theoretic">
        Deny from all
</Directory>
<Directory "/usr/share/twiki/templates">
        Deny from all
</Directory>
</VirtualHost>

Environment

TWiki version: TWikiBetaRelease
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Gentoo Linux
Web server: Apache 2.0.48
Perl version: 5.8.2 with mod_perl 1.99_11
Client OS:  
Web Browser:  

-- AdamTheo - 23 Feb 2004

Answer

This seems specific to PATH_INFO - doing the PATH_INFO test on your testenv gives the same error. Since testenv is quite simple code that only loads TWiki.pm to check the version, this may help to narrow down the problem. Maybe a google for PATH_INFO problems would help, as would linking to this on ModPerl, and asking on a mod_perl list?

The error was not cleared when I reloaded, on either testenv or the TWiki page, but then when I tried http://www.theoretic.com/bin/view?topic=Ransom/Home I got intermittent errors on the pages linked from that.

UPDATE: This is apparently fixed in a later version of mod_perl - let us know if that solves the problem, and which version you install (mod_perl 1.99_12 is available), so I can ImproveTestenv with a check for using an old mod_perl 2.0 version.

-- RichardDonkin - 23 Feb 2004

I have tried with mod_perl 1.99_12 from the dev tarball at the perl.apache.org website. That didn't change the situation. I had seen the same link as you, and even though the error is the exact same as mine, the solution didn't help me.

I'll poke around some more, though. Thanks.

-- AdamTheo - 23 Feb 2004

Oh well... Worth following up on that thread, though, perhaps the developer only managed to do a partial fix.

-- RichardDonkin - 23 Feb 2004

Problem solved. Seems I had not installed mod_perl 1.99_12 properly last time. I went back and did so again, using alot of the command-line args for building. Since I run Gentoo, it has installed perl and its modules in some precise locations. The default build did not install into these locations, so my setup wasn't seeing it.

Now with mod_perl 1.99_12 installed properly, the error is no longer occuring, and the setup is running fine.

Thanks, Richard.

-- AdamTheo - 25 Feb 2004

I've checked in an updated version of testenv at CVSget:bin/testenv (will be updated in 24 hours, direct CVS access is up to date) that checks the mod_perl 2.0 version. Can you give this a try? It should say your version is OK, and editing the recommended version to be 1.99_13 should say it is too old.

-- RichardDonkin - 26 Feb 2004

1.99_10-dev works OK for me.

-- CrawfordCurrie - 29 Feb 2004

Thanks for the update. It seems from the mod_perl site that 1.99_10-dev is a development version leading up to 1.99_10 final release, so presumably 1.99_10 final is OK. Hence it seems that only 1.99_11 is broken. Would be good to get some more confirmation, but for now I'll update testenv to only warn on 1.99_11, not on lower or higher versions.

-- RichardDonkin - 01 Mar 2004

Version 1.99_13 also works for me.

-- AdamTheo - 09 May 2004

Edit | Attach | Watch | Print version | History: r9 < r8 < r7 < r6 < r5 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r9 - 2004-05-09 - AdamTheo
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.