Question

I have a Drupal site (7) that I've migrated to a new server. I have a WordPress multi-site install on this server that looks like this at the moment:

  • example.com
  • store.example.com

I used to have a forum.example.com, but frankly the available WordPress forum options leave a lot to be desired, so I moved my old Drupal forum instead of migrating.

The issue is that I cannot log in to Drupal, from any account, even using a Drush generated link.

I've tried clearing caches, truncating session tables, adding $base_url in the settings.php file, setting session.name on both the WordPress and Drupal installations.
I'm at a loss. I've been banging my head against this for 4 hours now. I switched to a secondary domain (forum.example2.com) and it works perfectly; so all I can come up with is that there is some sort of collision between the two frameworks with either the sessions or the cookies.

Why cannot I log in with any account? How can I fix this?

Edit: To be clear, if I change Apache to point a different domain to this installation, everything works fine. I installed Flarum in place of drupal, and am able to log in. This problem is only present when the two frameworks are drupal and WordPress, and they are subdomains of the same main domain

Setting the user manually also doesn't work, for example:

global $user;
if(ip_address() == 'my.ip.address'){
   $user = user_load(1);
}

If I dump the user object after this it is loaded, but the next page load still leaves my as an anonymous user.

Was it helpful?

Solution

You should disable APDQC module on the old site.

The above was the answer given in comments. If the voting system requires you to choose a winner, I'm not above a simple comment repost answer :D

OTHER TIPS

I bet it was the COOKIE_DOMAIN in wp-config.php:

define('COOKIE_DOMAIN', 'sub.mydomain.com');

Define it without leading dot.

Licensed under: CC-BY-SA with attribution
Not affiliated with drupal.stackexchange
scroll top