Question
on my job, we use TWiki with great pleasure. A collegue and I are the wikiwebmaster; once in a while some problems occur we cannot solve. Some time ago, we had to install the SessionPlugin. We installed it and indeed, it was the answer to the problems.
To be able to play around with twiki, I have installed it on locally on my linux pc. I installed there the session plugin too, but the strange thing is that although I installed it exactly the same way, the local install behaves different.
When I first edit a topic, I am asked to log on, and I do so as RuudGrosmann. In the diffs page I can see that the modifier of the new version really is RuudGrosmann. However, TWiki keeps saying that I am not logged on (using
%SESSION_IF_AUTHENTICATED%<div>Logged on as:</div>
<div id="loggedin"><b>%USERNAME%</b></div>
%SESSION_ELSE%<div>Not logged on.<br />
Click to [[%SESSIONLOGONURL%][log on]], or *[[TWiki.TWikiRegistration][to register]]*</div>
%SESSION_ENDIF%
)
When I follow the %SESSIONLOGONURL% link, nothing happens: I stay on the same page.
Of course my user settings are never used: TWiki probably thinks I am guest or so.
I followed the instructions carefully: logon is executable, I installed the mentioned perl module. But with no result. Does anybody have a clue for me?
thanks in advance,
Ruud Grosmann
Environment
--
TWikiGuest - 24 Mar 2005
Answer
Have you tried simply
%LOGON_OR_WELCOME%
If you visit the
SessionPlugin topic on your site, where the documentation and configuration topic of
SessionPlugin is installed, you will see a table under the sub-heading 'Syntax Rules". If the plugin is installed correctly the values will appear there.
You should also check to see if the session files are being created in
/tmp (or
data/.session depending on how you have the plugin configured)
Finally, or perhaps first of all, check that your browser is supporting cookies. I use Firefox and it allows me to inspect the cookies that it has accepted. I can make sure that the value of the session cookie it has matches the one that the 'Syntax Rules' table says I should have.
--
AntonAylward - 26 Mar 2005
reply to answer
Your suggestion about the session files was the trigger to solve
the problem: I could not find any session files. After a quick look
in the apache error.log something seemed wrong with Session.pm. It
appeared that the install of CGI::Session was broken.
In het installation instructions two possibilities for installing CGI::Session were stated: the
second one (downloading from cpan and installing it) results in a
situation that doesnt work: perl/auto/CGI isn't created.
Maybe this possibility should be removed from the SessionPlugin topic.....
thanks very much for your help.
--
TWikiGuest - 29 Mar 2005
The code supports an alterntaive location for the session files. If I recall, it is
/data/.session/. You may have a problem that the access control settings for Apache won't let you write outside the space defined for TWiki.
Are you running under
mod_perl? There is a discussion in
SessionPluginDev about a problem with the
flush() under
mod_perl.
Could you extract the
exact error mesasge string from the logs please.
--
AntonAylward - 30 Mar 2005
The
exact message was:
[Tue Mar 29 13:33:01 2005] view: (in cleanup) Can't call method "store" on an undefined value at /usr/local/share/perl/5.8.4/CGI/Session.pm line 318 during global destruction.
Anyway, as I said before, the problem is solved and was caused by
an incomplete installation of CGI::Session.
Thanks for helping! Ruud
--
TWikiGuest - 31 Mar 2005