Some people have been reporting a problem with registering the first user (a problem with several work-arounds), but I haven't been able to find any answers to my problem. Sorry if it's been posted (and answered) before...

I installed Drupal according to the instructions and it seemed to go pretty well, until...

I registered as the first new user entering my preferred username and e-mail. I got a message saying

"Welcome to Drupal. You are user #1, which gives you full and immediate access. All future registrants will receive their passwords via e-mail, so please configure your e-mail settings using the Administration pages.

Your password is *******. You may change your password on the next page.

Please login below."

And the login button below that. I pressed the button, but instead of being taken to some other place, I got to the index.php. I tried logging in again, this time with the form in the box on the right, but with the same result. This time, however, I could at least see that something happened: the location was now http://my-domain/index.php?SID.

Any idea what this problem might be related to? I'm guessing that there's some Apache or PHP directive somewhere that's causing all this.

I'm running Apache 1.3.22, PHP 4.1.2 and MySQL 3.23. The Drupal version I'm trying to run is 4.0.0.

Comments

marco’s picture

are you sure you use 4.0 and not cvs?
that error is very similar to a recently fixed bug in cvs.
another option, did you enable register_globals?
--
Marco

--
Marco

eetu’s picture

I downloaded the 4.0.0 version and register_globals is enabled. Any other things to check?

moshe weitzman’s picture

can you check the users table and see if your registration actually went through properly. if you have any records in this table, you are actaully registered.

if yes, then you can try to register another user. all users after user #1 go through a different code path which might be more fruitful for you.

eetu’s picture

Yes, the registration goes through properly for both the first user and other users, but I'm still unable to log in as any user. I don't get any error messages or anything, just that '?SID' is added to the location if I try use to box on the right side for logging in.

My guess is that it has something to do with the php session. For some reason, the session doesn't get initialized properly or something. I'm not really an expert in this issue, but when I log in to this site, for example, the location changes from http://www.drupal.org/index.php to http://www.drupal.org/index.php?PHPSESSID=xxxxxxxxxxxxxx, which is what should happen on my site as well, I guess. I've tried looking through the code, but I haven't been able to find the exact place where it sort of crashes.

It does check the username and password from the database and I do get the error message if I type either one of them wrong, so there really doesn't seem to be anything wrong with the database. Then, after the user has been authenticated, something goes wrong...

Anonymous’s picture

i've looked into the database but is there a way to read the encrypted passwords..or maybe can we setup users directly into the database?

moshe weitzman’s picture

you can't get passwords out of the database. your option is only to request a new password. if necessary hack the user.module so it prints out the password to screen before sending it via email.

you can register new users using the Admin pages or make your own small PHP file which includes 'includes/common.inc' and then calls user_save() with a username, password, etc.

cnelsonakgov’s picture

I had this same problem. After the hitting the login button I was presented with a blank screen. At which point I hit "refresh" and everything seemed to work from there. User account was created and I could see the site and admin.

I noticed also, maybe related, that some users on first visiting the site, don't see anything for their first visit. But when they hit refresh -- the site suddenly comes up. Only happens that first time.