[imp] Login (horde auth = 'imp') always returns "Login failed for some reason..."

James Nikolich jnikolic@compeuphoria.com
Wed, 31 Oct 2001 23:38:51 -0500


I couldn't sort out what was going wrong logging in, so I sliced into
the code some pretty crude debugging statements.  The results were
logged to a file, which I've pasted into this email below.  The scenario
I'm executing is to point my browser at
"http://www.example.com/horde/imp", after which I get the "welcome to
mail" login screen.  After I attempt to login (which my IMAP server log
indicates succeeded), I am sent back to the login screen with a "Login
failed for some reason..." message.

As near as I can tell, the three isset() and is_array() checks in
IMP::setupSession() fail.  Somehow, HTTP_SESSION_VARS is not getting
correctly populated.  I'm not quite sure how/where it is supposed to be
populated.  David Peoples offered the suggestion that I switch to
file-based session storage, but I haven't yet strapped on my
belt-and-suspenders.  Is it still advisable to do so, or does the
diagnostic output below give anyone a clue as to what's going wrong for
me?

Any help would be greatly appreciated,

Jim 


/var/www/html/horde/imp/index.php      2001/10/31 20:09:00:
------------------------------------ 
/var/www/html/horde/imp/index.php      2001/10/31 20:09:00:  Entering
"imp/index.php" 
/var/www/html/horde/imp/index.php      2001/10/31 20:09:00:
$imp_configured = [1] 
/var/www/html/horde/imp/index.php      2001/10/31 20:09:00:
empty($HTTP_SERVER_VARS['QUERY_STRING']]) == [1]
/var/www/html/horde/imp/redirect.php   2001/10/31 20:09:01:  Entering
"imp/redirect.php" 
/var/www/html/horde/imp/redirect.php   2001/10/31 20:09:01:  after
Horde::getFormData('action', ''), $action = []
/var/www/html/horde/imp/redirect.php   2001/10/31 20:09:01:
isset($HTTP_SESSION_VARS['imp']) == [0] 
/var/www/html/horde/imp/redirect.php   2001/10/31 20:09:01:
is_array($HTTP_SESSION_VARS['imp']) == [0] 
/var/www/html/horde/imp/redirect.php   2001/10/31 20:09:01:
isset($HTTP_POST_VARS['imapuser']) == [0] 
/var/www/html/horde/imp/redirect.php   2001/10/31 20:09:01:
isset($HTTP_POST_VARS['pass']) == [0] 
/var/www/html/horde/imp/redirect.php   2001/10/31 20:09:01:
empty($HTTP_SERVER_VARS['QUERY_STRING']) == [0]
/var/www/html/horde/imp/redirect.php   2001/10/31 20:09:01:  No login
set, and no login attempt - just going to login page
/var/www/html/horde/imp/redirect.php   2001/10/31 20:09:01:  Exiting
"imp/redirect.php" 
/var/www/html/horde/imp/login.php      2001/10/31 20:09:03:  Entering
"imp/login.php" 
/var/www/html/horde/imp/login.php      2001/10/31 20:09:03:  $reason =
[login] 
/var/www/html/horde/imp/login.php      2001/10/31 20:09:03:  $actionID =
[0] 
/var/www/html/horde/imp/login.php      2001/10/31 20:09:03:
isset($HTTP_SESSION_VARS['imp']) == [0] 
/var/www/html/horde/imp/login.php      2001/10/31 20:09:03:
is_array($HTTP_SESSION_VARS['imp']) == [0] 
/var/www/html/horde/imp/login.php      2001/10/31 20:09:03:
isset($HTTP_GET_VARS['action']) == [0] 
/var/www/html/horde/imp/login.php      2001/10/31 20:09:03:
$HTTP_GET_VARS['action'] == [] 
/var/www/html/horde/imp/login.php      2001/10/31 20:09:03:  $actionID
set to [105] 
/var/www/html/horde/imp/login.php      2001/10/31 20:09:03:  Exiting
"imp/login.php" 
/var/www/html/horde/imp/redirect.php   2001/10/31 20:09:09:  Entering
"imp/redirect.php" 
/var/www/html/horde/imp/redirect.php   2001/10/31 20:09:09:  after
Horde::getFormData('action', ''), $action = []
/var/www/html/horde/imp/redirect.php   2001/10/31 20:09:09:
isset($HTTP_SESSION_VARS['imp']) == [0] 
/var/www/html/horde/imp/redirect.php   2001/10/31 20:09:09:
is_array($HTTP_SESSION_VARS['imp']) == [0] 
/var/www/html/horde/imp/redirect.php   2001/10/31 20:09:09:
isset($HTTP_POST_VARS['imapuser']) == [1] 
/var/www/html/horde/imp/redirect.php   2001/10/31 20:09:09:
isset($HTTP_POST_VARS['pass']) == [1] 
/var/www/html/horde/imp/redirect.php   2001/10/31 20:09:09:
$HTTP_POST_VARS['mailbox'] set to [INBOX] 
/var/www/html/horde/imp/lib/IMP.php    2001/10/31 20:09:09:  Entering
IMP::createSession 
/var/www/html/horde/imp/lib/IMP.php    2001/10/31 20:09:09:
isset($HTTP_POST_VARS['imapuser']) == [1] 
/var/www/html/horde/imp/lib/IMP.php    2001/10/31 20:09:09:
isset($HTTP_POST_VARS['pass']) == [1] 
/var/www/html/horde/imp/lib/IMP.php    2001/10/31 20:09:09:
isset($HTTP_POST_VARS['server']) == [1] 
/var/www/html/horde/imp/lib/IMP.php    2001/10/31 20:09:09:
IMP::authenticate(OP_HALFOPEN) returned OK... 
/var/www/html/horde/imp/lib/IMP.php    2001/10/31 20:09:09:  exiting
IMP::createSession (returning true) 
/var/www/html/horde/imp/redirect.php   2001/10/31 20:09:09:  $entry =
[199.212.40.118 login success for jnikolic {localhost:143}]
/var/www/html/horde/imp/redirect.php   2001/10/31 20:09:09:
Horde::getFormData('redirect_url') returned []
/var/www/html/horde/imp/mailbox.php    2001/10/31 20:09:09:  Entering
"imp/mailbox.php" 
/var/www/html/horde/imp/mailbox.php    2001/10/31 20:09:09:  $actionID
== [105] 
/var/www/html/horde/imp/lib/IMP.php    2001/10/31 20:09:09:  Entering
IMP::setupSession 
/var/www/html/horde/imp/lib/IMP.php    2001/10/31 20:09:09:
isset($GLOBALS['HTTP_SESSION_VARS]['imp']) == [0]
/var/www/html/horde/imp/lib/IMP.php    2001/10/31 20:09:09:
is_array($GLOBALS['HTTP_SESSION_VARS]['imp']) == [0]
/var/www/html/horde/imp/lib/IMP.php    2001/10/31 20:09:09:
isset($GLOBALS['HTTP_SESSION_VARS]['imp']['user']) == [0]
/var/www/html/horde/imp/lib/IMP.php    2001/10/31 20:09:09:  Nothing
seems set - THIS CAN'T BE GOOD... 
/var/www/html/horde/imp/lib/IMP.php    2001/10/31 20:09:09:  Exiting
IMP::setupSession 
/var/www/html/horde/imp/mailbox.php    2001/10/31 20:09:09:  Failed
either IMP::setupSession or IMP::authenticate
/var/www/html/horde/imp/login.php      2001/10/31 20:09:10:  Entering
"imp/login.php" 
/var/www/html/horde/imp/login.php      2001/10/31 20:09:10:  $reason =
[failed] 
/var/www/html/horde/imp/login.php      2001/10/31 20:09:10:  $actionID =
[0] 
/var/www/html/horde/imp/login.php      2001/10/31 20:09:10:
isset($HTTP_SESSION_VARS['imp']) == [0] 
/var/www/html/horde/imp/login.php      2001/10/31 20:09:10:
is_array($HTTP_SESSION_VARS['imp']) == [0] 
/var/www/html/horde/imp/login.php      2001/10/31 20:09:10:
isset($HTTP_GET_VARS['action']) == [0] 
/var/www/html/horde/imp/login.php      2001/10/31 20:09:10:
$HTTP_GET_VARS['action'] == [] 
/var/www/html/horde/imp/login.php      2001/10/31 20:09:10:  $actionID
set to [105] 
/var/www/html/horde/imp/login.php      2001/10/31 20:09:10:  Exiting
"imp/login.php" 

-----Original Message-----
From: David Peoples [mailto:davidp@touringcyclist.com] 
Sent: Monday, October 29, 2001 1:01 PM
To: imp@lists.horde.org
Subject: Re: [imp] Login (horde auth = 'imp') always returns "Login
failed for some reason..."


James,

Are you using a MySQL table to store the PHP session data? If so, I
suspect PHP is not saving your session data, despite the apparent
success of test.php. Try
this: run the test.php page to be sure the variable increments. Then try
to log in to IMP. After the login fails, load the test.php page and try
refreshing again. See if the session-counter still increments. If it now
fails to increment, you have a problem with session data storage in PHP.

This happened to me and I solved it by switching PHP from MySQL-based to
file-based session storage for Horde. I'm not sure, but suspect a
problem in the code I'm using for PHP's SQL session storage, that can't
handle switching back and forth between the Horde database and the
database the session table is in.

David Peoples

---
David Peoples
The Touring Cyclist, 11816 St. Charles Rock Road, Bridgeton, MO 63044
tel: 314-739-4648  fax: 314-739-4972
davidp@touringcyclist.com  http://www.touringcyclist.com

----- Original Message -----
From: "James Nikolich" <jnikolic@compeuphoria.com>
To: <imp@lists.horde.org>
Sent: Monday, October 29, 2001 9:30 AM
Subject: Re: [imp] Login (horde auth = 'imp') always returns "Login
failed for some reason..."


> When I bring up an Exploder or Mozilla window and point to 
> "www.compeuphoria.com/horde/test.php", I see the session-counter 
> starts off at 1.  When I refresh the browser, it increments to 2, 3 4,

> etc.  When I click on "unregister" and then "Go Back", the counter 
> resets to 1.
>
>



-- 
IMP mailing list: http://horde.org/imp/
Archive: http://marc.theaimsgroup.com/?l=imp&r=1&w=2
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: imp-unsubscribe@lists.horde.org