Hi Everyone,

I've got a PostgreSQL + Apache + PHP (mod_php) system which was running for years on the current hardware on Debian Wheezy without any major problem.

Recently we decided to move it to a different box (Ubuntu 14.04 LTS). After migration everything worked fine on all browsers that previously stored a session cookie for the site. Once I logged out I was unable to log back again, it goes back on the login page (just like with the classical login issues).

No sign of attempt in the watchdog.
No error message, even after turning on PHP debug in index.php.

I went through all the classical issues:

  • deleting browser cookies
  • deleting and disabling cache
  • redoing chmod and chown for the webdir, followed the installation/upgrade manual
  • tried different browsers and systems

Since nothing solved the issue I copied everything back to the old server (database, webdir) to see if anything is wrong with the installation folder or database consistency. Everything worked again, so I started narrowing down the issue:

  1. Moved the database to the new server, webdir remained on the old one: Works, no log in issue.
  2. Mounted the old webserver's webdir to the new webserver and to run it: Doesn't work, can not log in.

The working (old) webserver's "php -ini" output:
http://pastebin.com/5BgDKYMK

The malfunctioning (new) webserver's "php -ini" output
http://pastebin.com/w94aszid

I've been browsing forums and docs but nothing gave me any new info. So at this point it's beyond my PHP and Drupal knowledge.

Could you please point me what else to try?

Many thanks in advance

Comments

Jaypan’s picture

Does sites/default/default.settings.php exist?

agentgates’s picture

Thanks for your reply. Yes it does and it's untouched.

There can not be any issues with files or directories because copying them between the two systems doesn't fix the issue. I copied them in both directions back and fourth multiple times but the result was always the same: it works on the old system and doesn't on the new one.

I forgot to mention in the original post that the uid and gid of the Apache process are matched on both systems.

Jaypan’s picture

It sounds like you did a straight across copy/migration of the system. Because it's not working, instead of trying to get it to work, I'd suggest doing your migration a different way - one that has never not worked for me:

1) Download the backup and migrate module to the source Drupal installation
2) Make a complete copy of the file system on the source server
3) Upload that copy to the target server
4) Install Drupal as a new installation on the target server
5) Enable the backup and migrate module on both the source and target servers
6) On the source server, take a backup of the database with the backup and migrate module
7) On the target server, use the backup and migrate 'restore' function to restore the backup you just took

This has never not worked for me.

agentgates’s picture

JayPan, AFAIK the backup and migrate modules are for database migration, which means they dump and restore the database via SQL file.

In my case they won't get me any further:

  1. Database was dumped on the source and restored on the destination system via the PostgreSQL database tools
  2. The database migration was successful and I have already ruled out the file system issues as well.

Please read my original post about the troubleshooting.

As for the installation from scratch, that is one thing I can try.

Jaypan’s picture

You don't know if it will get you any further, as you have not tried it. Try it.

Edit: I should add that when doing database migrations using the database tools (in my case MySQL tools), I have run into problems in the past, and didn't run into those problems if I used Backup and Migrate instead. It's Drupal specific - your database tools are not.