Opened 7 years ago

Closed 7 years ago

#1975 closed defect (fixed)

problem with wiki requiring cookies even if they are already allowed

Reported by: hellik Owned by: christian, sac@…
Priority: major Milestone:
Component: SysAdmin/Wiki Keywords:
Cc: astrodog, madi

Description

taken from ML

mail1 and mail2 and tested here with wiki

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

with several IPs and computers; cookies are enabled.

Change History (13)

comment:1 by strk, 7 years ago

Cc: astrodog added

Also reported as #1976 and I confirm having the problem with multiple browsers too (cannot login, system says I don't have cookies enabled, which I clearly have)

Harrison, Christian, Jeff: did you guys change anything recently ?

comment:2 by Jeff McKenna, 7 years ago

I didn't make any recent changes, not sure why this occurred.

It seems that this is a common issue though, and one of the solutions is to modify php.ini with the following change:

session.referer_check = off

I restarted Apache and now I can login.

It is a quick-n-dirty solution, maybe the original error is due to a session file trying to write to a write-protected folder? (not sure why the permissions would change suddenly though).

Or maybe someone did an update on that VM and PHP was upgraded? Not sure.

Let me know if this change is enough.

comment:3 by Jeff McKenna, 7 years ago

Cc: madi added

comment:4 by strk, 7 years ago

I just received an email from the Cron daemon on that machine: no space left on device. That explains impossibility to write cookies ! Do we want another ticket to deal with that Jeff ?

comment:5 by Jeff McKenna, 7 years ago

that would explain this. sorry for my mistake.

comment:6 by Jeff McKenna, 7 years ago

sandro, since you found it, do you want to tackle??

comment:7 by Jeff McKenna, 7 years ago

i am re-enabling that setting now...

in reply to:  2 comment:8 by hellik, 7 years ago

Replying to Jeff McKenna:

I didn't make any recent changes, not sure why this occurred.

It seems that this is a common issue though, and one of the solutions is to modify php.ini with the following change:

session.referer_check = off

I restarted Apache and now I can login.

It is a quick-n-dirty solution, maybe the original error is due to a session file trying to write to a write-protected folder? (not sure why the permissions would change suddenly though).

Or maybe someone did an update on that VM and PHP was upgraded? Not sure.

Let me know if this change is enough.

-first try: login possible

  • second try after removing osgeo wiki cookie: login possible

comment:9 by Jeff McKenna, 7 years ago

i have reset: session.referer_check = on

comment:10 by Jeff McKenna, 7 years ago

Here is the space available on that VM:

Filesystem            Size  Used Avail Use% Mounted on
/dev/vda3              16G   13G  2.3G  85% /
tmpfs                 2.0G     0  2.0G   0% /lib/init/rw
udev                   10M  112K  9.9M   2% /dev
tmpfs                 2.0G     0  2.0G   0% /dev/shm
/dev/vda1              99M   25M   70M  27% /boot

Looks fine to me. Maybe someone is making space now as I type?

comment:11 by strk, 7 years ago

I hadn't touched the machine, and it looks like we're the only one who logged in the last few hours (but the wtmp is *really* short)

For the record, the received mail:

Date: Mon, 24 Jul 2017 06:25:28 -0700 (PDT)                                                         
From: Cron Daemon <root@osgeo.org> 
Subject: Cron <root@wiki> test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily 
        ) (failed)        

/etc/cron.daily/man-db:                                  
/usr/bin/mandb: can't write to /var/cache/man/30183: No space left on device                
run-parts: /etc/cron.daily/man-db exited with return code 2   

comment:12 by Jeff McKenna, 7 years ago

for now the initial fix of 'session.referer_check = off' is working. until we find a better one :)

comment:13 by strk, 7 years ago

Resolution: fixed
Status: newclosed

I confirm it is working, although documentation seems to suggest the value of that variable should be a substring to be found in the HTTP_REFERER: http://php.net/manual/en/session.configuration.php#ini.session.referer-check

BTW, it's documented to default to the empty string

The file /etc/php5/apache2/php.ini is not part of the libapache2-mod-php5 package, so I wonder how it got there in the first place.

Now the directory is under a local git repository (for the future)

Note: See TracTickets for help on using tickets.