I had to move Drupal to a server running PHP 4.7 instead of PHP 5 because of problems with response time. The server is IIS 5 (didn't have a choice on that). After moving the software and loading the data into the new database, I cannot log into Drupal. I have spent half a day debugging so far. I can see in the Session table that I log in when I go to full node pages (not teaser) but a second session record is created for UID 0 (visitor). The home page just creates a UID 0 visitor session. I have placed debugging login in user.module and can see a successful lookup of the user id when on a full page (non teaser page) but once the page is displayed, I am no longer logged in. The $user->uid is blank.

If anyone can give me some clues as to what might be happening, that would be greatly appreciated.

I was able to create a duplicate of the site on an Apache server and everything is working fine on that server. No problems logging in there. It seems to be something related to IIS or the configuration of the server or something that happened during the copy to the new server. All database tables exist and a compare of data between the two has not revealed any corruption of data.

Comments

denverrusty’s picture

I can see that cookies are being written for the session id so the problem doesn't appear to be cookies.

keylope’s picture

I am experiencing a similar problem. I've been working on a development site locally with IIS6 and moved it into a staging environment IIS5 (I believe) and although everything seems to work okay, I cannot log in. After putting in the credentials and submitting the form, it redirects me to the user page (default redirection) but states that I am not authorized to access this page...

I've not yet checked the session tables, but it looks like it "should" work... Perhaps the server cannot do any PHP session handling? Is there a way to check for this?