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
- 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:
or to change the conditions in the block starting at line 12.Copy to clipboardif (isset($_SESSION['preferences'])) { $prefs = array_merge($prefs, $_SESSION['preferences']); }
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+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show2.tiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show.tikiwiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Ticket ID
- 4369
- Created
- Tuesday 29 January, 2013 10:04:51 UTC
by chw - LastModif
- Thursday 07 February, 2013 08:26:19 UTC