Welcome to Geeklog, Anonymous Tuesday, October 15 2024 @ 08:37 pm EDT
Geeklog Forums
Login Troubles
Status: offline
anuenue
Forum User
Junior
Registered: 02/01/03
Posts: 32
I have a total of 4 geeklog sites up and running. Two of them are hosted on the Internet and I have no problems. The other two are hosted on separate servers on my local network. On the local sites I am having problems logging in. A search of the articles here have not revealed any insights.
On System A
Win2K, Gl 1.37sr1, php 4.2.2, mySQL 3.23.39
When I login I am shown in the Who's Online block, but no features from the Logged-in Users group appear anywhere. The only way I can login to this site is to access the admin page. Then I must login twice before I can get into the site and get access to all features of groups the member belongs.
System B
Win2K, GL 1.37sr1, php4.2.2, mySQL 3.23.39
When I login to this site I am listed in the who's online block, but none of the features of the Logged-in Users group appear. Nothing I do will truly give me access.
Any ideas on how to proceed?
8
9
Quote
Status: offline
anuenue
Forum User
Junior
Registered: 02/01/03
Posts: 32
Well lets see if this get any more ideas going. Hopefully it will get seen, even it it's buried on page 5 or 6.
After logging into the site the variable $_USER['uid'] is set to 2 (administrator). This is at the prior to the code in user.php that redirects to index.php. After getting redirected to index.php, the variable $_USER['uid'] is empty.
Should this be set to 2 at this time?
7
7
Quote
Anonymous
Anonymous
Do you have cookies enabled? Did you set this variable on those systems? $_CONF['cookiedomain'] = '';
8
10
Quote
Status: offline
anuenue
Forum User
Junior
Registered: 02/01/03
Posts: 32
Ok, these changes have seemed to help...
I made sure that $_CONF['cookiedomain'] had a unique name (i.e. the server name), and I changed $_CONF['cookie_session'] to a variation of the website name.
Now I can login to both sites, but only when logging into the admin folder.
10
9
Quote
Anonymous
Anonymous
What do you mean by only the admin folder? Isn't it keeping you logged in when you go page to page?
7
8
Quote
Status: offline
rawdata
Forum User
Full Member
Registered: 02/17/03
Posts: 236
You said by making $_CONF['cookiedomain'] and $_CONF['cookie_session'] unique you're now able to login to both sites. I'm not sure if it makes a difference or not, but you might want to try making the rest of these unique and see what happens:
$_CONF['cookie_name'] = 'geeklog';
$_CONF['cookie_password'] = 'password';
$_CONF['cookie_theme'] = 'theme';
$_CONF['cookie_language'] = 'language';
$_CONF['cookie_lastvisit'] = 'LastVisit';
$_CONF['cookie_lastvisittemp'] = 'LastVisitTemp';
If that doesn't allow you to login from the main page, then how about if you try fixing your cookies? I brought this up before, but it was for a different issue. When Geeklog sets cookies, in several areas it doesn't use all the parameters. Perhaps if you add the "missing" ones it might fix your problem. If it works, then you can do the same in the remaining two files (usersettings.php and pollbooth.php). If not, you can roll back the changes.
Step 1: Make a backup copy of /public_html/users.php, /public_html/admin/auth.inc, and /system/lib-session.php. This will make it easier to recover if the test fails.
Step 2: If you're using a domain name in $_CONF['cookiedomain'] make sure a dot precedes it (e.g. .yourdomainname.com). The preceding dot makes the cookie available on all subdomains. According to the php manual, the dot is not required but makes it compatible with more browsers.
Step 3: Make the following replacements inside /public_html/users.php:
Replace lines 610 & 611:
setcookie($_CONF['cookie_session'],'',time() - 10000,$_CONF['cookie_path']);
setcookie($_CONF['cookie_name'],'',time() - 10000,$_CONF['cookie_path']);
with these two:
setcookie($_CONF['cookie_session'],'',time() - 10000,$_CONF['cookie_path'],$_CONF['cookiedomain'],$_CONF['cookiesecure']);
setcookie($_CONF['cookie_name'],'',time() - 10000,$_CONF['cookie_path'],$_CONF['cookiedomain'],$_CONF['cookiesecure']);
Replace lines 669 & 670:
setcookie($_CONF['cookie_name'],$_USER['uid'],time() + $cooktime,$_CONF['cookie_path']);
setcookie($_CONF['cookie_password'],md5($passwd),time() + $cooktime,$_CONF['cookie_path']);
with these two:
setcookie($_CONF['cookie_name'],$_USER['uid'],time() + $cooktime,$_CONF['cookie_path'],$_CONF['cookiedomain'],$_CONF['cookiesecure']);
setcookie($_CONF['cookie_password'],md5($passwd),time() + $cooktime,$_CONF['cookie_path'],$_CONF['cookiedomain'],$_CONF['cookiesecure']);
Replace 694:
setcookie($_CONF['cookie_theme'],$_USER['theme'],time() + 31536000,$_CONF['cookie_path']);
with this one:
setcookie($_CONF['cookie_theme'],$_USER['theme'],time() + 31536000,$_CONF['cookie_path'],$_CONF['cookiedomain'],$_CONF['cookiesecure']);
Step 4: Make the following replacement inside /public_html/admin/auth.inc:
Replace line 63:
setcookie($_CONF["cookie_name"],$_USER['uid'],time() + $cooktime,$_CONF["cookie_path"]);
with this one:
setcookie($_CONF["cookie_name"],$_USER['uid'],time() + $cooktime,$_CONF['cookie_path'],$_CONF['cookiedomain'],$_CONF['cookiesecure']);
Step 5: Make the following replacements inside /system/lib-sessions.php:
Replace line 171:
setcookie($_CONF['cookie_lastvisittemp'], $temptime ,$expiredate2, $_CONF['cookie_path'], $_CONF['site_url'], $_CONF['cookiesecure']);
with this one:
setcookie($_CONF['cookie_lastvisittemp'], $temptime ,$expiredate2, $_CONF['cookie_path'], $_CONF['cookiedomain'], $_CONF['cookiesecure']);
Replace line 273:
setcookie($cookiename,$sessid,0,$cookiepath);
with this one:
setcookie($cookiename,$sessid,0,$cookiepath, $cookiedomain, $cookiesecure);
Step 6: Save the files. Overwrite the ones on the server with these changed ones. Cross your fingers and test the login again.
8
11
Quote
Anonymous
Anonymous
Hello
I have a similar problem but i am not able to loggin at all.
I get this error mesage when atempting to loggin:
---- DEBUG ---- loginname [admin]
passwd [password]
---------------
Warning: Cannot add header information - headers already sent by (output started at C:FoxServwwwEHA_inventoryusers.php:54) in C:FoxServwwwEHA_inventorygeeklogsystemlib-sessions.php on line 273
Warning: Cannot add header information - headers already sent by (output started at C:FoxServwwwEHA_inventoryusers.php:54) in C:FoxServwwwEHA_inventoryusers.php on line 669
Warning: Cannot add header information - headers already sent by (output started at C:FoxServwwwEHA_inventoryusers.php:54) in C:FoxServwwwEHA_inventoryusers.php on line 670
Warning: Cannot add header information - headers already sent by (output started at C:FoxServwwwEHA_inventoryusers.php:54) in C:FoxServwwwEHA_inventoryusers.php on line 694
The modifications that you sugest seam to addres the same lines as the ones reported by the errror mesage. However they (the modifications) did not help.
And the problem defenetly might have somm thing to doe with cookies, since i do not reseve any.
Since I do not know any PHP as of yet I have no ide what users.php:54 does but perhaps the problem is to be found here.
Does any of you have any idea of what might be wrong ?
/Ricardo
6
8
Quote
hi, i also have a similar problem, i have 1 geeklog site but it has 2 slightly different urls, one ends in .com and one ends in .co.uk, i can log into the site.co.uk fine but when i try to log into the site.com it does not give me access to the site, but im listed in the who's online block and the user fuctions block just stays the same as if i wasn't logged in. why could this be? can somebody help me please
cheers
cheers
12
9
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by Stubdoo: i have 1 geeklog site but it has 2 slightly different urls, one ends in .com and one ends in .co.uk
You need to decide on one domain to use. I'd suggest you then create a redirect for the other.
E.g. if you decide to go with the .co.uk domain, and someone comes in through the .com domain, they should be redirected to the .co.uk.
The problem is with the cookies - the domain in the cookies and the domain of the site you're trying to log in to have to match.
The FAQ has some background information.
bye, Dirk
10
7
Quote
All times are EDT. The time is now 08:37 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