1

I have several Drupal 6 websites, most of which I can still use as normal. However, I have one where I cannot log in anymore, at least not without adding a hack to the session code.

When the code calls sess_regenerate() from user_authenticate_finalize(), it calls the function defined in the include/session.inc file as expected.

Inside the sess_regenerate() session_regenerate_id() gets called; somehow, that call generates a call to sess_read(). That function fails and resets the $user variable to the anonymous user.

My current hack is to save the $user variable in a temporary variable.

$save_user = $user;
session_regenerate_id();
$user = $save_user;

I now run with PHP 7, but I would think that's not the only problem since my other sites still work fine.

Note that I clearly verified that the normal Drupal session.inc file gets included, so it is not because those get overwritten.

Do you know of any module that could cause such a problem?

There is a list of the modules I have installed:

abuse
account_reminder
advanced_comment
autologout
automenu
auto_nodetitle
block
blog
ca
captcha
ckeditor
comment
commentmail
comment_subject
contact
content
content_permissions
content_taxonomy
content_taxonomy_options
ctools
dblog
email
fieldgroup
filefield
filter
filter_default
footnotes
forum
globalredirect
googleanalytics
hidden_captcha
hide_submit
i18n
i18nblocks
i18ncck
i18ncontent
i18nmenu
i18nstrings
i18ntaxonomy
imagefield
imce
InsertNode
jquery_ui
jquery_update
jstimer
jst_timer
languageicons
lightbox2
linkchecker
locale
login_security
logintoboggan
menu
mini
mo_anti_pounding
mo_backup
mo_feedback
mo_toolbar
mo_websites_client
nia2match
nia2match_early
node
nodeformsettings
nodewords
nodewords_basic
nodewords_extra
nodewords_og
number
optionwidgets
password_policy
path
pathauto
path_redirect
ping
prepopulate
recaptcha
role_delegation
save_draft
search
securepages
simplemenu
site_verify
spam
spam_filter_bayesian
spam_filter_custom
spam_filter_duplicate
spam_filter_node_age
spam_filter_surbl
spam_filter_url
su_comments
system
taxonomy
taxonomy_hide
terms_of_use
text
themekey
themekey_properties
themekey_ui
token
tracker
translation
translation_overview
uc_cart
uc_cart_links
uc_coupon
uc_credit
uc_googleanalytics
uc_optional_checkout_review
uc_order
uc_payment
uc_paypal
uc_product
uc_reports
uc_sisow
uc_sisowbase
uc_sisowde
uc_sisowmc
uc_store
uc_taxes
uc_tax_report
uc_test_payment
update
upload
user
views
views_data_export
views_ui
wordfilter
xmlsitemap
xmlsitemap_custom
xmlsitemap_engines
xmlsitemap_node
2
  • Is there a record for the anonymous user (id: 0) in the users table? That can often go missing during imports/exports and as I recall D6 relies on it to be able to log in
    – Clive
    Commented Sep 17, 2016 at 23:12
  • @Clive Ah... I just checked and uid=0 is in place as expected. I recall having problems with that before, indeed. But it's not that one this time. Commented Sep 17, 2016 at 23:27

0

Browse other questions tagged or ask your own question.