Welcome to Geeklog, Anonymous Wednesday, November 13 2024 @ 10:02 pm EST
Geeklog Forums
Geeklog in endless loop
0kapi
Anonymous
So what happened here? We had Geeklog
running for most of 2002, and one day it
just stopped. It kept recycling a blank white
homepage (refresh 0 seconds). Tech support
suggested commenting the following if-clause
from index.php, allowing Geeklog to load.
Anyone care to elucidate, thanks?
0kapi
========================
preg_match ("///([^/]*)/", $_CONF['site_url'], $server);
/*** COMMENTING OUT if-CLAUSE ***
if ($HTTP_SERVER_VARS['HTTP_HOST'] != $server[1]) {
// this may be a case of a www. vs. non-www. URL ...
if (!empty ($QUERY_STRING)) {
$query = '?' . $QUERY_STRING;
} else {
$query = '';
}
echo COM_refresh ($_CONF['site_url'] . '/index.php' . $query);
exit;
}
*********************************/
$display = ''; // End of snip.
========================
And a Happy & Prosperous New Year to Tony
and everyone else out there in Geekland!
22
7
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
This piece of code was added to ensure that Geeklog starts at the correct URL when people try to log in, thus avoiding the popular problem where users were listed on the Who's Online block but didn't have the User Functions block.
However, it seems some setups don't have the $HTTP_SERVER_VARS['HTTP_HOST'] variable set, so this code will fail and result in an endless loop, as you noticed. We'll try to come up with a more compatible solution in the next release.
bye, Dirk
8
6
Quote
0kapi
Anonymous
Thanks Dirk -
You are saying that the code expects certain system
variables, that may not be properly set or present on
some hosts. In such cases the effects will be pretty
serious -- an endlessly looping blank white page.
Is it safe to simply disable the if statement? ie this
is not a security issue? Thanks for the help.
0k
3
6
Quote
Status: offline
tingo
Forum User
Chatty
Registered: 06/05/02
Posts: 57
Location:Oslo, Norway
I hope that a working 8and good) solution will be found for this problem. Here is an example that explains why it is important (all names in this example are made up):
I have one server which is located on a small LAN behind my firewall. On this LAN, the server is known as 'internal' (actually 'internal.fake-domain.no' but that isn't important). This server uses a dynamic DNS service (for example DynDNS.org) so that it can have a presence on the internet. The public known name is 'external.dyndns.org'. Geeklog is installed, and the name of the site (site_url) is set to 'external.dyndns.org'. So in order to stop the endless looping I had to disable that code in index.php completely.
I have one server which is located on a small LAN behind my firewall. On this LAN, the server is known as 'internal' (actually 'internal.fake-domain.no' but that isn't important). This server uses a dynamic DNS service (for example DynDNS.org) so that it can have a presence on the internet. The public known name is 'external.dyndns.org'. Geeklog is installed, and the name of the site (site_url) is set to 'external.dyndns.org'. So in order to stop the endless looping I had to disable that code in index.php completely.
5
6
Quote
All times are EST. The time is now 10:02 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content