RE: [Phplib-users] auth does not work and session only after a reload
Brought to you by:
nhruby,
richardarcher
From: bye <by...@gm...> - 2003-06-17 20:43:10
|
Hi Nathaniel, First thanx for your help. > I had a similar problem as well with the sessions (although not with the > user authentication), and it turned out to be due to some strange server > configuration where the version of PHP that I used didn't populate the > correct variables in $HTTP_SERVER_VARS > > From the archives, see: > http://sourceforge.net/mailarchive/forum.php?thread_id=2073141&for > um_id=808 > http://sourceforge.net/mailarchive/forum.php?thread_id=2073915&for > um_id=808 > http://sourceforge.net/mailarchive/forum.php?thread_id=2073916&for > um_id=808 > > The upshot is that in session.inc around lines 417 to 437 phplib uses some > variables in $HTTP_SERVER_VARS to set some cookies and handle the 'get' > fallback mode. On my setup this would fail because for some reason > $HTTP_SERVER_VARS was empty. Check to see if PHP is populating > $HTTP_SERVER_VARS by putting this on a script on your server: > > <?php var_dump($HTTP_SERVER_VARS); ?> I checked this and it's not empty : array(34) { .."Here was some more stuff".. ["REQUEST_METHOD"]=> string(3) "GET" ["QUERY_STRING"]=> string(0) "" ["REQUEST_URI"]=> string(1) "/" ["SCRIPT_NAME"]=> string(10) "/index.php" (...) ["PHP_SELF"]=> string(10) "/index.php" ["argv"]=> array(0) { } ["argc"]=> int(0) } > > If it's empty, you'll need to check the php docs to see what configuration > options you need to set for PHP to populate $HTTP_SERVER_VARS, or > alter the > code for session.inc to use (for example) $_SERVER instead, depending on > your setup. If you are using PHP3 or have register_globals set to > "on", the > server variables might be in the global variable space instead (i.e.: > $HTTP_SERVER_VARS['HTTP_HOST'] would be found with $GLOBALS['HTTP_HOST'] > instead). If $HTTP_SERVER_VARS is not empty, it must be some > other problem. > You might try disabling the get fallback mode as well (set > $fallback_mode to > false in local.inc), see if that solves some of the problem. I changed the fallback_mode entry in local.inc and checked the REQUEST_METHOD in SERVER_VARS. It was once GET and without Fallback POST. Seems to be ok. > > Unfortunately, I didn't have the problem you mentioned with the > authentication... if fixing the sessions doesn't fix the problem, you'll > want to go over the auth class that you are using in local.inc > and make sure > that everything is configured correctly, (i.e. make sure the name of your > auth_user table and of your columns are the same, that $classname > is set to > the same name as your auth class, and that $database_class is set to the > name of the class you are using for database access.) You may want to try > disabling any 'extras' like default authentication or challenge-response > authentication and see if it works to try and isolate the problem. Even this didn't really work. Without default auth it openend automatically the loginform.ihtml like it should. So everything is fine but prompted for a password it will never let me in (WITHOUT ANY ERROR MESSAGE hmmmm). > > Hope this helps... > > _________________________________ > Nathaniel Price <np...@te...> > Webmaster I will have a closer look at the links you gave me. Thanx again. Regards jens |