Welcome to Geeklog Thursday, December 13 2018 @ 02:23 am EST

Fix for broken polls on Mac OS X 10.2

  • Contributed by:
  • Views: 4,437
Geeklog.net Polls do not work correctly for virtual sites on Mac OS X 10.2 from a regular install of GeekLog, the only flaw I have yet detected.

Mac OS X sets the environment variable REMOTE_ADDR to the IP of the server, not the remote user! Thus all votes appear to come from the same IP number.

As polls are restricted to one vote per IP number, only one vote can be cast for the entire site.

A quick fix is to put the following line at the beginning
of lib-common.php
$REMOTE_ADDR=$HTTP_PC_REMOTE_ADDR;

which will set REMOTE_ADDR to the correct remote address.