I'm getting the seemingly famous
You are not authorized to access this page. message whenever I log in to my local development environment from
/user or from
/user/login. I'm on Drupal 7.26, PHP 5.6.3, running under XAMPP 3.2.1.
I've tried clearing all browser history, truncating flood and session tables, making sure I'm not defining $cookie_domain. I'm sure I've tried other things, but nothing seems to work. What should I try next?
This is one of those "this worked yesterday" things that became one of those "I was sure I fixed this but I have no idea how" things.
edit: So I ran the following to disable most of the modules and then logging in worked again:
drush @alias pm-list --type=Module --no-core --status=enabled | sed 's/.*(//' | sed 's/).*//' | sed '/^ *$/d' | sed '/^.*views.*$/d' | sed '/^.*entity.*$/d' | sed '/^.*ctool.*$/d' | sed '/^.*ctool.*$/d' | sed '/^.*date.*$/d' | sed '/^field_collection$/d' | sed '/^link$/d' | sed '/^youtube$/d' | sed '/^block.*$/d' | tail -n+2 > modules.txt; cat modules.txt drush @alias dis `cat modules.txt` drush @alias cache-clear all
I did have some issues such as Fatal error: Call to undefined function entityreference_get_behavior_handlers() in entityreference_schema(), which is why that command is so ugly. (I'm sure there's a neater sed command.) Now I'm turning on the modules one at a time.
edit: Disabling all modules and then re-enabling all modules except for the libraries module and modules that depend on allows us to log in again. However, enabling that module breaks logging in. This problem is only in our local development environments, not our hosted environments.