#61  
Old Oct 19 2009, 10:39 PM
ElennaHart ElennaHart is offline
Senior Member
 
Join Date: Jan 2007
Location: Missouri, USA
Posts: 115
Re: Official LOTRoster Release and Support Thread.

Quote:
Originally Posted by turdburgler View Post
The install process will rename that file for you provided you have file permissions set properly. My install correctly created a new settings.php file with all of the correct info at the correct location which is /sites/default/settings.php.

No errors in the error log, everything is nice and clean and users accounts are able to login fine. Navigating to the character claiming link you gave above, results in the following message:

"You must be a user and logged in to use this function."

So, it's not getting the cookie info is my guess, but I can't find anything in the log files to help me figure out what's wrong exactly. The roster and the Drupal site continue to work perfectly otherwise.
In the LOTRoster/auth/drupal.php file, find:
include_once($forum_config);

Replace with:
require($forum_config);


See if it gives an error message about a 'file not found'. Hopefully it will point us in the right direction. I think you might need to be logged in as Admin to see the error messages - also, check to make sure you have the verbose errors showing.
Reply With Quote
  #62  
Old Oct 24 2009, 01:53 PM
turdburgler turdburgler is offline
Junior Member
 
Join Date: Jul 2008
Posts: 10
Re: Official LOTRoster Release and Support Thread.

Quote:
Originally Posted by ElennaHart View Post
In the LOTRoster/auth/drupal.php file, find:
include_once($forum_config);

Replace with:
require($forum_config);


See if it gives an error message about a 'file not found'. Hopefully it will point us in the right direction. I think you might need to be logged in as Admin to see the error messages - also, check to make sure you have the verbose errors showing.
OK, finally found some time to try this. Changed the file per your instructions. I am now able to get to the character claiming page by going to "index.php?rm=rm_claim_char" if I am logged in as admin in lotroster. This does not work logged in as any other user, I get the "You must be a user and logged in to use this function." message. Verbose logging is turned on, still no error messages.
Reply With Quote
  #63  
Old Oct 25 2009, 05:01 PM
ElennaHart ElennaHart is offline
Senior Member
 
Join Date: Jan 2007
Location: Missouri, USA
Posts: 115
Re: Official LOTRoster Release and Support Thread.

A few questions from the developer:


The cookie handling code is almost directly taken from Drupal's own source code. I also re-tested it on my own Drupal site and it works correctly. The last few things I can think of, beside the obvious (incorrect database prefix and such):

- Is he referring to the correct settings.php file? If he has multiple copies of it (for example if he has multiple sites), his site might be using a different settings.php located elsewhere.

- Is he using https? Drupal uses different cookies whether you're logged using http or https. You need to access LOTRoster using the same protocol to ensure you access the right cookie.

- Have him make sure $base_url is properly set in Drupal's settings.php. It should be "http://site.com/core", with no trailing slash. LOTRoster relies on that parameter to build the correct cookie name.

- Does he have anything set in $cookiedomain in settings.php? I have only tested with this parameter being left commented out (so $cookiedomain is built dynamically by Drupal and LOTRoster)

Beside that, he'll have to check himself what's the name of the cookie his Drupal site sets when he's logged in (Firefox's cookie manager can easily let him do that, no idea about Internet Explorer or other browsers), and ensure it matches $cookiename auth/drupal.php is trying to look up on line 62. He can insert a:

echo $cookiename;

just before that line if he wishes to compare it with what cookie his browser has set.
Reply With Quote
  #64  
Old Oct 26 2009, 05:03 AM
turdburgler turdburgler is offline
Junior Member
 
Join Date: Jul 2008
Posts: 10
Re: Official LOTRoster Release and Support Thread.

Quote:
Originally Posted by ElennaHart View Post
A few questions from the developer:


The cookie handling code is almost directly taken from Drupal's own source code. I also re-tested it on my own Drupal site and it works correctly. The last few things I can think of, beside the obvious (incorrect database prefix and such):

- Is he referring to the correct settings.php file? If he has multiple copies of it (for example if he has multiple sites), his site might be using a different settings.php located elsewhere.

- Is he using https? Drupal uses different cookies whether you're logged using http or https. You need to access LOTRoster using the same protocol to ensure you access the right cookie.

- Have him make sure $base_url is properly set in Drupal's settings.php. It should be "http://site.com/core", with no trailing slash. LOTRoster relies on that parameter to build the correct cookie name.

- Does he have anything set in $cookiedomain in settings.php? I have only tested with this parameter being left commented out (so $cookiedomain is built dynamically by Drupal and LOTRoster)

Beside that, he'll have to check himself what's the name of the cookie his Drupal site sets when he's logged in (Firefox's cookie manager can easily let him do that, no idea about Internet Explorer or other browsers), and ensure it matches $cookiename auth/drupal.php is trying to look up on line 62. He can insert a:

echo $cookiename;

just before that line if he wishes to compare it with what cookie his browser has set.
Figured out why I wasn't seeing error messages, I was setting the wrong tick box. There is only one site installed and there is only one settings.php file.

I get three errors now:

Notice: Undefined variable: cookie_domain in /home/pofnnet/public_html/core/lotroster/auth/drupal.php on line 51

Notice: Undefined variable: base_url in /home/pofnnet/public_html/core/lotroster/auth/drupal.php on line 55

Notice: Undefined offset: 1 in /home/pofnnet/public_html/core/lotroster/auth/drupal.php on line 55

I set the base URL and cookie domain and the errors go away, but..still not able to claim characters. Not sure why the default settings for cookie domain are working for you and not me, but then I don't know how this is built dynamically by Drupal and Lotroster. Leaving it commented results in the first error.

Not sure if I'm understanding the last suggestion correctly, but adding echo $cookiename; to drupal.php results in the following:

Notice: Undefined variable: cookiename in /home/pofnnet/public_html/core/lotroster/auth/drupal.php on line 50
Reply With Quote
  #65  
Old Oct 26 2009, 11:23 AM
ElennaHart ElennaHart is offline
Senior Member
 
Join Date: Jan 2007
Location: Missouri, USA
Posts: 115
Re: Official LOTRoster Release and Support Thread.

Edit your settings.php and set both $base_url and $cookiedomain.

Log off of Drupal and back on (to reset the cookie) and then go to LOTROster.
Reply With Quote
  #66  
Old Oct 26 2009, 05:40 PM
turdburgler turdburgler is offline
Junior Member
 
Join Date: Jul 2008
Posts: 10
Re: Official LOTRoster Release and Support Thread.

Quote:
Originally Posted by ElennaHart View Post
Edit your settings.php and set both $base_url and $cookiedomain.

Log off of Drupal and back on (to reset the cookie) and then go to LOTROster.
I did do that, I also logged in as a couple of other users on three different browsers to see if there was any difference. No errors, but also no character claiming.
Reply With Quote
  #67  
Old Nov 05 2009, 06:28 PM
Silinar's Avatar
Silinar Silinar is offline
Member
 
Join Date: Aug 2007
Posts: 69
Re: Official LOTRoster Release and Support Thread.

I am running the following cron job and nothing seems to be happening:

/usr/local/bin/php /home/users/web/b169/sl.battlelo/public_html/lotroster/update.php

Lotroster only seems to update when I use the forceupdate link, not when my cron job runs, even when I force it to. I get no errors either.
~ Remnant ~
Valdaglerion (60) Elf Champion ~ Edelwulf (60) Man Captain
Silinar (60) Elf Hunter ~ Kelghrom (60) Dwarf Minstrel ~ Frodigard (60) Hobbit Guardian

Last edited by Silinar; Nov 06 2009 at 04:14 PM.
Reply With Quote
  #68  
Old Nov 07 2009, 03:16 AM
ElennaHart ElennaHart is offline
Senior Member
 
Join Date: Jan 2007
Location: Missouri, USA
Posts: 115
Re: Official LOTRoster Release and Support Thread.

You may need to check with your hosting company, as the Cron Job command line will be different.

Mine looks like this:


/ramdisk/bin/php5 -q /home5/(my site here)/lotroster/update.php
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Forum Jump


All times are GMT -5. The time now is 02:08 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.