Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I fix the MediaWiki error "Wiki uses cookies to log in users. You have cookies disabled. Please enable them and try again."?

The problem I am having is that I can not log on to my newly created wiki that I made using MediaWiki. I have searched the web for an answer, and the ones I found did not help with this specific issue (like this one: problem with mediawiki cookies) I have tried with multiple browsers and changed the setting to make sure that cookies are enabled, but I keep getting the same error:

"Wiki uses cookies to log in users. You have cookies disabled. Please enable them and try again."

I'm not sure whether this is a problem with my current version of PHP, which is currently 5.3, or a setting in my wiki.

like image 281
JesseG17 Avatar asked Apr 21 '13 04:04

JesseG17


2 Answers

The easiest solution, also recommended by Aaron Schulz, is generally to set

$wgSessionsInObjectCache = true;
$wgMainCacheType = CACHE_ANYTHING;

in your LocalSettings.php. In recent PHP you'll have OPcache enabled by default; if no accelerator is available, at worst this configuration will use the database.

See also cache documentation.

like image 152
Nemo Avatar answered Nov 15 '22 16:11

Nemo


I found a fix, I'll put it in steps:

  1. Open LocalSettings.php
  2. Go to the bottom of the page, and enter in the following code: session_save_path("tmp");
  3. Create a directory called tmp in the folder where you have MediaWiki installed.
like image 41
JesseG17 Avatar answered Nov 15 '22 16:11

JesseG17