Loading...
 
Skip to main content

No access to tiki wiki due to session problems

Status
Closed
Subject
No access to tiki wiki due to session problems
Version
10.x
9.x
Category
  • Error
  • Less than 30-minutes fix
Feature
Accessibility
Resolution status
Fixed or Solved
Submitted by
chw
Volunteered to solve
chw
Lastmod by
chw
Rating
(0)
Description

Hi,

This bug affects version 9.x, but after having a short look at the 10.x source code, that version is probably also affected.

It happened after upgrading from version 3.9 to 9.3.

When accessing my.host or my.host/index.php, tikiwiki should redirect to tiki-index.php but gets stuck in an endless redirection loop by redirecting to my.host.

When accessing my.host/tiki-index.php directly,the following error message is displayed:
"Error
Required features: feature_wiki. If you do not have the privileges to activate these features, ask the site administrator."

Similar errors when accessing other features.

Solution

The problem is related to the session. In lib/setup/user_prefs.php, the preferences are expected to be stored in the session as $_SESSION'preferences', but due to some unknown reasons, this becomes null in my setup.

At line 59 of that php file, we have

Copy to clipboard
$prefs = array_merge($prefs, $_SESSION['preferences']);

which becomes null.
Therefore the string 'tiki-index.php' used to construct the redirection location stored in prefs becomes null.

A simple fix would be to change to line 59 into:

Copy to clipboard
if (isset($_SESSION['preferences'])) { $prefs = array_merge($prefs, $_SESSION['preferences']); }
or to change the conditions in the block starting at line 12.


I have not checked why my session does not contain the keys expected by the code, but I could reproduce the problem several times in the past.

Importance
9 high
Easy to solve?
10 easy
Priority
90
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
4369
Created
Tuesday 29 January, 2013 10:04:51 UTC
by chw
LastModif
Thursday 07 February, 2013 08:26:19 UTC


Show PHP error messages