After going through the install procedure, I am unable to login as admin. The database connection appears to work since admin shows up in the member list. I have verified that the hashed password in mysql is equal to $salt . MD5($salt . $password).
Where else should I look for the problem? How can I get better debugging info in order to determine where the authentication is failing?
Posts: 3
I found the debug option in config.php. 'admin' has a userID of 5 according to mysql, however I notice that the bottom SQL is asking about userID = '4', and 'guest' is not in groupID = '2'. Any tips?
file_exists(/var/local/lib/gallery2/sessions/google) clearstatcache() filesize(/var/local/lib/gallery2/sessions/google) fopen(/var/local/lib/gallery2/sessions/google, rb, 0) flock(Resource id #18, 6, ) fread(Resource id #18, 2091) flock(Resource id #18, 3, ) fclose(Resource id #18) file_exists(/var/local/lib/gallery2/cache/module/core/0/0/0.inc) Initializing navigation Branched navigation: xc96ea973 file_exists(/usr/local/share/gallery2/modules/core/classes/helpers/../../../../modules/core/module.inc) realpath(/usr/local/share/gallery2/modules/core/classes/../../..) Binding text domain: modules_core -> /usr/local/share/gallery2/modules/core/locale file_exists(/var/local/lib/gallery2//versions.dat) file(/var/local/lib/gallery2//versions.dat, ) [1105378542] can't guarantee 5 -- extending! file_exists(/var/local/lib/gallery2/cache/entity/0/0/4.inc) file_exists(/var/local/lib/gallery2/cache/module/_all/0/0/GalleryPluginHelper_fetchPluginStatus.inc) file_exists(/usr/local/share/gallery2/modules/core/classes/../../../modules/core/UserLogin.inc) file_exists(/usr/local/share/gallery2/modules/core/classes/../../../modules/core/UserLogin.inc) (mysql): SELECT g2_User.g_id FROM g2_User WHERE g2_User.g_userName = 'admin' file_exists(/var/local/lib/gallery2/cache/entity/0/0/5.inc) file_exists(/usr/local/share/gallery2/modules/core/classes/../../../modules/core/UserAdmin.inc) file_exists(/usr/local/share/gallery2/modules/core/classes/../../../modules/core/UserAdmin.inc) realpath(/usr/local/share/gallery2/modules/core/classes/../../..) file_exists(/usr/local/share/gallery2/modules/core/classes/helpers/../../../../modules/cart/module.inc) realpath(/usr/local/share/gallery2/modules/core/classes/../../..) Binding text domain: modules_cart -> /usr/local/share/gallery2/modules/cart/locale file_exists(/usr/local/share/gallery2/modules/core/classes/helpers/../../../../modules/comment/module.inc) realpath(/usr/local/share/gallery2/modules/core/classes/../../..) Binding text domain: modules_comment -> /usr/local/share/gallery2/modules/comment/locale file_exists(/usr/local/share/gallery2/modules/core/classes/helpers/../../../../modules/customfield/module.inc) realpath(/usr/local/share/gallery2/modules/core/classes/../../..) Binding text domain: modules_customfield -> /usr/local/share/gallery2/modules/customfield/locale file_exists(/usr/local/share/gallery2/modules/core/classes/helpers/../../../../modules/exif/module.inc) realpath(/usr/local/share/gallery2/modules/core/classes/../../..) Binding text domain: modules_exif -> /usr/local/share/gallery2/modules/exif/locale file_exists(/usr/local/share/gallery2/modules/core/classes/helpers/../../../../modules/imageblock/module.inc) realpath(/usr/local/share/gallery2/modules/core/classes/../../..) Binding text domain: modules_imageblock -> /usr/local/share/gallery2/modules/imageblock/locale file_exists(/usr/local/share/gallery2/modules/core/classes/helpers/../../../../modules/imageframe/module.inc) realpath(/usr/local/share/gallery2/modules/core/classes/../../..) Binding text domain: modules_imageframe -> /usr/local/share/gallery2/modules/imageframe/locale file_exists(/usr/local/share/gallery2/modules/core/classes/helpers/../../../../modules/imagemagick/module.inc) realpath(/usr/local/share/gallery2/modules/core/classes/../../..) Binding text domain: modules_imagemagick -> /usr/local/share/gallery2/modules/imagemagick/locale file_exists(/usr/local/share/gallery2/modules/core/classes/helpers/../../../../modules/members/module.inc) realpath(/usr/local/share/gallery2/modules/core/classes/../../..) Binding text domain: modules_members -> /usr/local/share/gallery2/modules/members/locale file_exists(/usr/local/share/gallery2/modules/core/classes/helpers/../../../../modules/migrate/module.inc) realpath(/usr/local/share/gallery2/modules/core/classes/../../..) Binding text domain: modules_migrate -> /usr/local/share/gallery2/modules/migrate/locale file_exists(/usr/local/share/gallery2/modules/core/classes/helpers/../../../../modules/netpbm/module.inc) realpath(/usr/local/share/gallery2/modules/core/classes/../../..) Binding text domain: modules_netpbm -> /usr/local/share/gallery2/modules/netpbm/locale file_exists(/usr/local/share/gallery2/modules/core/classes/helpers/../../../../modules/newitems/module.inc) realpath(/usr/local/share/gallery2/modules/core/classes/../../..) Binding text domain: modules_newitems -> /usr/local/share/gallery2/modules/newitems/locale file_exists(/usr/local/share/gallery2/modules/core/classes/helpers/../../../../modules/panorama/module.inc) realpath(/usr/local/share/gallery2/modules/core/classes/../../..) Binding text domain: modules_panorama -> /usr/local/share/gallery2/modules/panorama/locale file_exists(/usr/local/share/gallery2/modules/core/classes/helpers/../../../../modules/photoaccess/module.inc) realpath(/usr/local/share/gallery2/modules/core/classes/../../..) Binding text domain: modules_photoaccess -> /usr/local/share/gallery2/modules/photoaccess/locale file_exists(/usr/local/share/gallery2/modules/core/classes/helpers/../../../../modules/randomhighlight/module.inc) realpath(/usr/local/share/gallery2/modules/core/classes/../../..) Binding text domain: modules_randomhighlight -> /usr/local/share/gallery2/modules/randomhighlight/locale file_exists(/usr/local/share/gallery2/modules/core/classes/helpers/../../../../modules/rearrange/module.inc) realpath(/usr/local/share/gallery2/modules/core/classes/../../..) Binding text domain: modules_rearrange -> /usr/local/share/gallery2/modules/rearrange/locale file_exists(/usr/local/share/gallery2/modules/core/classes/helpers/../../../../modules/remote/module.inc) realpath(/usr/local/share/gallery2/modules/core/classes/../../..) Binding text domain: modules_remote -> /usr/local/share/gallery2/modules/remote/locale file_exists(/usr/local/share/gallery2/modules/core/classes/helpers/../../../../modules/search/module.inc) realpath(/usr/local/share/gallery2/modules/core/classes/../../..) Binding text domain: modules_search -> /usr/local/share/gallery2/modules/search/locale file_exists(/usr/local/share/gallery2/modules/core/classes/helpers/../../../../modules/slideshow/module.inc) realpath(/usr/local/share/gallery2/modules/core/classes/../../..) Binding text domain: modules_slideshow -> /usr/local/share/gallery2/modules/slideshow/locale file_exists(/usr/local/share/gallery2/modules/core/classes/helpers/../../../../modules/thumbnail/module.inc) realpath(/usr/local/share/gallery2/modules/core/classes/../../..) Binding text domain: modules_thumbnail -> /usr/local/share/gallery2/modules/thumbnail/locale file_exists(/usr/local/share/gallery2/modules/core/classes/helpers/../../../../modules/thumbpage/module.inc) realpath(/usr/local/share/gallery2/modules/core/classes/../../..) Binding text domain: modules_thumbpage -> /usr/local/share/gallery2/modules/thumbpage/locale file_exists(/usr/local/share/gallery2/modules/core/classes/helpers/../../../../modules/uploadapplet/module.inc) realpath(/usr/local/share/gallery2/modules/core/classes/../../..) Binding text domain: modules_uploadapplet -> /usr/local/share/gallery2/modules/uploadapplet/locale file_exists(/usr/local/share/gallery2/modules/core/classes/helpers/../../../../modules/watermark/module.inc) realpath(/usr/local/share/gallery2/modules/core/classes/../../..) Binding text domain: modules_watermark -> /usr/local/share/gallery2/modules/watermark/locale file_exists(/usr/local/share/gallery2/modules/core/classes/helpers/../../../../modules/webcam/module.inc) realpath(/usr/local/share/gallery2/modules/core/classes/../../..) Binding text domain: modules_webcam -> /usr/local/share/gallery2/modules/webcam/locale (mysql): SELECT g2_UserGroupMap.g_userId FROM g2_UserGroupMap WHERE g2_UserGroupMap.g_userId = 4 AND g2_UserGroupMap.g_groupId = '2' LIMIT 1Posts: 7994
That's odd. I notice that in your debug output it appears to be using the "google" session which is very strange; that should only be used by the googlebot! I'm not sure what bearing that may have on the current problem, though.
I'd start by putting some debug code in and around line 55 of modules/core/UserLogin.inc, something like this:
printf("<pre>%s</pre>", print_r($user, 1));That should help us to figure out if it's loading the right user or not. You sound like you know what you're doing, so if you start fiddling around with putting print statements in that code you should be able to figure out whether it succeeds in authenticating you as the admin user at that point. Let me know how it goes, and I'll give further guidance.
Posts: 3
I deleted everything and started over. This time it worked.
About the google thing -- there are a few websites that allow googlebot to index their pages, but regular people have to pay for access to the articles. So, I've changed my browser's User-Agent header.