• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

TWiki Dakar 4.0.

mod_perl enabled.

With Template login I quite often get garbage numbers on top of the page - especially when logging out right after having edited a page.

With Apache login the WebLeftBar top keep on showing "Login Register" even though I have been authenticated. If I edit a page it sometimes finds out I am authenticated and shows my personal web bar and my name.

The minute I turn off mod_perl these errors go away

KJL


Please complete bugreport, stating full mod_perl setup.

-- SP

Here is more.

Here is the LocalSite.cfg

$TWiki::cfg{DataDir} = '/usr/local/apache2/dakar/data';
$TWiki::cfg{Password} = 'noneofyourbusiness';
$TWiki::cfg{Site}{Lang} = 'en';
$TWiki::cfg{LocalesDir} = '/usr/local/apache2/dakar/locale';
$TWiki::cfg{ScriptUrlPath} = '/dakar/bin';
$TWiki::cfg{DefaultUrlHost} = 'http://www.lavrsen.dk';
$TWiki::cfg{Site}{FullLang} = 'en-us';
$TWiki::cfg{PubUrlPath} = '/dakar/pub';
$TWiki::cfg{PubDir} = '/usr/local/apache2/dakar/pub';
$TWiki::cfg{TemplateDir} = '/usr/local/apache2/dakar/templates';
$TWiki::cfg{Site}{CharSet} = 'iso-8859-15';
$TWiki::cfg{AntiSpam}{EmailPadding} = 'PLEASENOSPAM';
$TWiki::cfg{Languages}{fr}{Enabled} = 0;
$TWiki::cfg{Languages}{da}{Enabled} = 0;
$TWiki::cfg{Languages}{nl}{Enabled} = 0;
$TWiki::cfg{Languages}{es}{Enabled} = 0;
$TWiki::cfg{Languages}{'zh-cn'}{Enabled} = 0;
$TWiki::cfg{Languages}{de}{Enabled} = 0;
$TWiki::cfg{Languages}{pt}{Enabled} = 0;
$TWiki::cfg{Languages}{'zh-tw'}{Enabled} = 0;
$TWiki::cfg{NumberOfRevisions} = 5;
$TWiki::cfg{Plugins}{WysiwygPlugin}{Enabled} = 1;
$TWiki::cfg{Plugins}{RenderListPlugin}{Enabled} = 1;
$TWiki::cfg{Plugins}{EmptyPlugin}{Enabled} = 1;
$TWiki::cfg{LoginManager} = 'TWiki::Client::ApacheLogin';
$TWiki::cfg{Plugins}{BlackListPlugin}{Enabled} = 1;
$TWiki::cfg{Plugins}{TWikiDrawPlugin}{Enabled} = 1;
1;

I have attached the dakar.conf which is included from the httpd.conf. The mod_perl module is loaded in httpd.conf.

Apache is version 2.0.55 and mod_perl is 2.0.2 - both compiled from Sources.

Note that I never see the issue with mod_perl off.

Let me know if there are additional info I can provide.

PS. I know I can try SpeedyCGI - but the purpose of this is to fix the bug.

KJL

/usr/local/apache2/conf/dakar-perl-uses.pl might have important info as well.

-- SP

I have attached the dakar-perl-uses.pl. I wonder if it needs some updating - I copied it from twiki.org two months ago. And are all these use::libs actually needed?

I have tried something.

I tried to only run view with mod_perl and then the login/logout works.

I will attach the modified apache config.

KJL

I currently run with a simpler dakar-perl-uses.pl

use strict;

# make sure we are in a sane environment.
#$ENV{GATEWAY_INTERFACE} =~ /^CGI-Perl/ or die "GATEWAY_INTERFACE not Perl!";
# check $ENV{MOD_PERL}, $ENV{GATEWAY_INTERFACE} is deprecated for mod_perl2
$ENV{MOD_PERL} =~ /mod_perl/ or die "MOD_PERL not used!";

# --
# set twiki lib path!
# --
use lib "/usr/local/apache2/dakar";
use lib "/usr/local/apache2/dakar/bin";
use lib "/usr/local/apache2/dakar/lib";
use lib "/usr/local/apache2/dakar/lib/CPAN/lib";

use CGI (); CGI->compile(':cgi');
use CGI::Carp ();

and with selective mod-perl so only "view" is mod-perl'ed

Here is my current httpd.conf included apache config file

PerlSwitches -T
Perlrequire /usr/local/apache2/conf/dakar-perl-uses.pl 
ScriptAlias /dakar/bin "/usr/local/apache2/dakar/bin" 
Alias /dakar "/usr/local/apache2/dakar"

<Directory "/usr/local/apache2/dakar/bin">

   # Password file for TWiki users
   AuthUserFile /usr/local/apache2/dakar/data/.htpasswd
   AuthName 'Enter your WikiName: (First name and last name, no space, no dots, capitalized, e.g. JohnSmith). Cancel to register if you do not have one.'
   AuthType Basic
   
   # File to return on access control error (e.g. wrong password)
   # By convention this is the TWikiRegistration page, that allows users
   # to register with the TWiki. Apache requires this to be a *local* path.
   ErrorDocument 401 /usr/local/apache2/dakar/bin/view/TWiki/TWikiRegistration

<FilesMatch "^(configure)$">
   SetHandler cgi-script
   Order deny,allow
   Deny from all
   Allow from 192.168.1.4 192.168.1.9 127.0.0.1
</FilesMatch>

<FilesMatch "(attach|edit|manage|rename|save|upload|mail|logon|.*auth).*">
   require valid-user
</FilesMatch>

<FilesMatch "^(view)$">
   Options +ExecCGI +FollowSymLinks
   SetHandler perl-script
   PerlResponseHandler ModPerl::Registry
   PerlSendHeader On
   PerlOptions +ParseHeaders   
</FilesMatch> 

   Options +ExecCGI +FollowSymLinks
   SetHandler cgi-script
   Allow from all
   
</Directory>

<Directory "/usr/local/apache2/dakar/pub">
    Options FollowSymLinks +Includes
    AllowOverride None
    Allow from all
</Directory> 

<Directory "/usr/local/apache2/dakar/data">
   deny from all
</Directory>

<Directory "/usr/local/apache2/dakar/templates">
   deny from all
</Directory>

<Directory "/usr/local/apache2/dakar/lib">
   deny from all
</Directory>

<Directory "/usr/local/apache2/dakar/locale">
   deny from all
</Directory>

and I have seen the error mode where the page has strange numbers in it and the fonts gets larger because of this.

It is a rare error. You have to try many times to see it. But somewhere there must be a global or on-initialized variable hiding in the code. I never see the error when mod_perl is disabled.

The problem where the "Login Register" does not change to the personal bar in the left bar does not happen when only "view" is mod-perl'ed.

KJL

You can review the use of globals in the TWiki code by searching for "use vars". I would be surprised if you can find any cases in the core where a global variable is used in a way that could cause the problem yous describe. That doesn't mean there are no globals; TWiki relies on a variety of CPAN modules, any one of which might carry the global virus.

I wonder if CGI has some memory of prior sessions?

CC

4.0.0 After installing a plugin while beeing logged in, no login/logout is possible any more. sounds similar

FerinandGassauer

Out of scope problem refactored to Item1627

DCK

I just installed the latest copy of dakar on a fairly stock FC4 system. The twiki is sitting in a directory protected with .htaccess. TWiki insists that I am logged in as the user authenticated via .htaccess despite trying to login to the TWiki with a TWiki name. I either end up not being able to logout (click logout and nothing happens) or being unable to login (authenticate via the template, success, but still showing up as the .htaccess user.)

DavidKovar

Out of scope problem refactored to Item1628

I do not think the errors reported by Ferinand and David has anything to do with the original bug report which is related to mod_perl. I have refactored them out in two new bug reports so we can keep the scope on this bug reports which is that login/logout in an environment where it works in non-mod-perl fails when you enable mod-perl (for all scripts and not only view).

KJL

It seems the original scope of this bug has gone lost because of all the noise some guys added to it.

This is the bug in short.

With Apache login the WebLeftBar top keep on showing "Login Register" even though I have been authenticated by clicking the login link. If I edit a page it normally finds out I am authenticated and shows my personal web bar and my name.

The minute I turn off mod_perl these errors go away

If I only run mod_perl with view this problem also goes away but then Item1576 kicks in.

KJL

Some good news.

When you run mod_perl the way it is described in TWiki:ModPerlUnix after it has been updated this bug does not show itself.

I have now my httpd config so the following scripts: attach|edit|manage|rename|save|upload|view|.*auth are running under mod_perl. login/logon are not

There may still be a global variable worth chasing but since there is a good workaround I change the status to LOW.

KJL

I am closing this.

The "there is probably a global variable to chase" is not a bug anyone can act one. New bugs will be raised if the bug somehow is still lurking somewhere.

KJL

ItemTemplate
Summary Login / logout fails with mod_perl
ReportedBy TWiki:Main.KennethLavrsen
Codebase

SVN Range Sun, 29 Jan 2006 build 8586
AppliesTo Engine
Component

Priority Low
CurrentState No Action Required
WaitingFor

Checkins

TargetRelease major
ReleasedIn

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatconf dakar-modperl-view-only.conf r1 manage 3.4 K 2006-02-03 - 21:45 KennethLavrsen Apache config for mod_perl with view only
Texttxt dakar-perl-uses.pl.txt r1 manage 2.8 K 2006-02-03 - 21:00 KennethLavrsen  
Unknown file formatconf dakar.conf r1 manage 3.3 K 2006-02-03 - 17:25 KennethLavrsen  
Edit | Attach | Watch | Print version | History: r16 < r15 < r14 < r13 < r12 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r16 - 2007-04-24 - KennethLavrsen
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback