I spent several hours configuring a new Drupal 5.0 installation with content... I added several modules during the time I was working on it. The last two modules were flashvideo and contemplate. I noticed that I could not enable the Content Template module... the check box would not commit and stay checked. So, I logged out thinking that it would be a session problem. Now I cannot log in... as any user that I had created.

The log in page just reloads on submit. If I enter an invalid login, it does not give me any error message.

I've cleared cookies, truncated sessions and cache tables, rebooted the server. Nothing is working. I've searched through these forums, tried several things suggested... but nothing is working. I'm about to give up and start over.

Any help is appreciated... I'm a total noob on Drupal, so I'm a bit stumped here.

System specs:
Windows 2003/IIS 6
MySQL 5.0.27
PHP 5.2.0
Drupal 5.0

Comments

dalguete’s picture

Hello everybody. I'm in the same problem, but I could say that it's not necessary to add any module. I finished with my Drupal installation, create the user #1, copy the password that Drupal generates; log out; login; and that's it, the same login, with no error message. And enteer the login info again and nothing seems to work. I'm a little frustrated 'cause I try the same steps at my local pc, under the same conditions, and it works perfectly there. I'm using:
- IIS 5.0
- Windows 2000 SP4
- MySQL 5.0.41-community-nt
- PHP 4.4.7
- Drupal 5.1
The general configuration of IIS is established to use PHP 4.2.3, and I could not change it. So I installed php 4.4.7 because Drupal and PhpMyAdmin need a greater php version to work properly. Then I set the Drupal and PhpMyAdmin applications under IIS, to use php 4.4.7 and not the default php version. Also I create php.ini files for both Drupal and PhpMyAdmin particular directories. PhpMyAdmin is working great, Drupal not.

I could imagine is not IIS 5.0 fault, 'cause "dextr" on the first message is using win2003/IIS6.

Please, I need your help, and thank you for your time

nonsense28sal’s picture

I'm experiencing a similar situation as described in other posts.

I have a clean install of Drupal. I have added no other modules besides the basic install.

I have:

- IIS 5.0
- Windows 2000 SP4
- MySQL 5.0.37-community-nt
- PHP 5.2.3
- Drupal 5.1

I created my initial user and was able to administer the site and create content. If I log out, I cannot log back in with any user I have created. If I use the link "Request new password" I am able to use the login via the email link and get back into Drupal and change the password. When I change the password, I receive no errors. I have PHP set to display errors, but I am not receiving any. I have several other PHP applications running and they all seem functional.

If I put in an invalid password I receive an error message, but if I put in the correct password I receive no messages and am simply redirected to the default page and login screen. I've seen the other posts where people have experienced login problems, and have followed those directions, but it did not make a difference and most of those posts dealt with older versions of Drupal. I even tried refreshing the page after attempting to log in and that did not make a difference. I've tried deleting all cookies and browser settings and that did not make a difference. The same behavior is seen across different browsers: Firefox 2.0.0.4, IE 6 and 7, and Opera.

Any ideas? I have another install at home of Drupal 5.1, Apache2, and PHP 5.2.1 and it works fine.

nonsense28sal’s picture

Hi All.

I seem to have found a fix that worked for my login problem.

I found the fix here: http://groups.google.com/group/esn-satellite/browse_thread/thread/8176ef...

But in case that particular post disappears, I am copying and pasting the relevant information here:

Step #1:

Commented out following in user.module:
session_regenerate_id(); // about line 959...

Step #2:

Added line below drupal_page_footer(); in index.php:
$GLOBALS['tempUser'] = $user; // this alone might already work...

I hope this works for others!

deanloh’s picture

Similar to the rest of folks who reported this problem, I set up Drupal 5.1 and had been working on the site for past 2 days until I realized I couldn't login, and the only way I could do it was to request for new password.

I tried follow the suggestion above but I couldn't find session_regenerate_id(); in user.module, at line 959, I saw instead:
sess_regenerate();
return 'user/'. $user->uid;

Had no choice I commented out both lines and added the other codes in index.php and viola! Problem solved!

I hope doing this will not result in other issues but I can't care less for now as I have a website to build. Thanks to nonsense28sal for the workaround!

gmknowles’s picture

For Ver. 5.1 there is a bit of a difference:

Comment out:

sess_regenerate(); // about line 957

Also, I tried just adding the $GLOBALS, but that did not work by itself.

Johnboat’s picture

It worked for me when I put the comment before the line. So instead of

sess_regenerate(); //
I did // sess_regenerate();

I hope this is ok. I don't know a whole lot about php.

Thanks!

dextr’s picture

Well... I don't think it's Drupal. I checked another PHP site I have running on the same server and there were forms that were broken on that site also. I'm currently removing PHP 5.2.0 and installing 5.2.3. Hopefully that clears this up.

Not really sure how PHP may have gotten jammed, since I didn't do anything to it. But, this is a dev server so I have the liberty to re-install it if I need to (luckily).

dextr’s picture

Removing / reinstalling PHP did the trick for my problem. No clue as to what I did that could have caused it to break like that.

vm’s picture

PHP 5.2.0 is known to be buggy.

ofktoubro’s picture

Running a test site - and have problems logging in...?
I had a problem logging "remotely" in to my test site:
I could easily do from home, but when attempted over the internet I could see the site but not log in...
In my firewall I had forwarded an obscure port (32333) to the test site's port 80 - that turned out to be a problem.
Changing the portforward from '32333 -> 80' to '80 -> 80' solved the problem... Now I can both see the site AND login :)

Hope this helpes someone out there...

I used:
WMWare Server Console 1.0.3
Windows Server 2003 Standard
Apache 2.2.4
Drupal 5.1
MySQL 5.0
PHP 5.2.3

rothdavid’s picture

I had the exact same problem. New install today, Could login the first time during config but could not re-login later.
I could only gain access by requesting a new password.

I commented out the lines of code mentioned above and added the line of code to the Index.php page and I am now logging in and out without incident.

Server Setup (hosted at ixwebhosting.com)
PHP 4.4.1
MySQL client version: 4.1.20
System Windows NT IIS39 5.0 build 2195
Build Date Mar 14 2006 22:18:06
Server API CGI/FastCGI
Virtual Directory Support enabled
Configuration File (php.ini) Path C:\WINNT\php.ini
PHP API 20020918
PHP Extension 20020429
Zend Extension 20050606
Debug Build no
Zend Memory Manager enabled
Thread Safety enabled
Registered PHP Streams php, http, ftp, compress.zlib

I hope striking out this code doesn't make the site less secure?
Thanks
David
Drupal Newbie

escoles’s picture

What I find most puzzling and troubling about this issue is that it seems to arise randomly. Sometimes I can login, sometimes I can't; usually I can login with Safari, but sometimes I can't. And most people obviously don't experience these problems at all. Passing strange.

I hate hacking code (especially core) to fix problems. It means having to keep track of your fixes so you can figure out how to do them again if an upgrade still has the same issue.

(For myself, I get these problems with both Drupal 5.1 and 4.7 on OS X 10.4.9 and 10.4.10, on both PPC and Intel machines running either Safari or [usually] Firefox, working from two different locations [one via Time-Warner cable, one via Frontier Telecomm DSL]. Wiping out the cookie helps not. I use no proxies. Hopefully I'll be able to upgrade to 5.2 before I have to make the currently vexing site usable for other administrators, so even if 5.2 doesn't fix it, I only need to patch once.)

lasarletter’s picture

It looks like you've done

repair table sessions;

in mysql. But have you remembered to clear the cache on your web browser . . .