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

前端 未结 12 2330
春和景丽
春和景丽 2021-02-14 02:03

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 w

12条回答
  •  礼貌的吻别
    2021-02-14 02:41

    I'm adding a new answer because my setup was slightly different, and the steps I took were similar but not identical to everyone else's.

    I installed MediaWiki on CentOS with NGINX. After running it successfully for a few months, I started to get the same cookie error out of nowhere.

    The issue I had was that the php-fpm user lacked access to the session.save_path folder. I don't know why it happened, but here's now I fixed it.

    I ran a variation of SprintCycle's command to identify where the sessions were stored:

    php-fpm -i|grep --color save_path
    

    In my case, it was /var/lib/php/session.

    Then I changed directories and set permissions:

    cd /var/lib/php
    chmod -R 1777 session
    

    I restarted the services, and everything worked again.

    service nginx restart
    service php-fpm restart
    

提交回复
热议问题