I have installed drupal 4.7 on windows xp with apache 2.0.58, php 4.4.2 ,mysql 4.1 , and used mysql administrator to create the database.

I get the first login page but when i click the link "create the first acount" i get the apache page (when I click other links I get either the apache page or a list of the files in htdocs folder )

can anyone help me please

Comments

jraper@groups.drupal.org’s picture

I would be happy to see if I could help, but I would need to see your httpd.conf and settings.php files. If you would like me to take a look at them, you can send them to me via my contact link - rather than post them here.

assaffriedman’s picture

thanks

kloomis’s picture

I had the same problem. I solved it by removing the user account number 0 from the users table leaving an empty table. Then everything worked fine. This will be a tough one for new users to deal with.

Ken

jraper@groups.drupal.org’s picture

User 0 is the account that all anonymous users run as. IMHO - I don't think removing it is the right answer.

kloomis’s picture

Well, sounds like I should put it back. Can you share the various values for that record?

Thanks.

kloomis’s picture

OK, I just inserted an empty row and all the 0 and null and blank values filled in. By the way, when I first went to the new 4.7 account I entered a user name and password thinking that was the way to create the first account. (Why would I get a login screen if there were no accounts yet established?) Perhaps this is what prevented the first account from being subsequently created?

jraper@groups.drupal.org’s picture

Here is the Insert (from phpMyAdmin) for User 0:

INSERT INTO `users` VALUES (0, '', '', '', 0, 0, 0, '', '', 0, 0, 0, 0, NULL, '', '', '', NULL);

I suspect that this is exactly the same as what you get be inserting an emply row, but you may want to check it. Make sure the uid field is 0 (zero).

Regarding creating first account: If I understand you correctly, this is how it works (paraphrased from Robert Douglass's book "Building Online Communities with Drupal, phpBB, and WordPress"):

Once you have installed Drupal and gotten the connection to the Database working, launch your browser and point it to your Drupal site (i.e., the URL referenced by the $base_url setting). Drupal will present an initial screen with some important links - create first account chief among them.

Create an account and login. The first account will automatically become the main administrator account. The admin user is the user whose ID number is 1, and who has "superuser" rights to administer the entire site.

To create this admin account, click on the create first account link. You will be asked for the username and email address of this user. Provide this information and click submit. Drupal will attempt tp send a message to the email address you provided. This email will contain the randomly generated password for your admin user account. This password will also be displayed on the screen. Write down this password, in case something goes wrong in the following steps.

Drupal will also display a button that says Log in. Once you have created the admin user you can click this button to log in as the administrator. You will be taken to the admin user's details page, where you can set some user preferences for the account. The important step you should take now is to change your password. Then you can ignore the email that Drupal sent with the random password.

Regarding "Why would I get a login screen if there were no accounts yet established?":

By default (i.e., as initially installed), Drupal sets up two roles - "anonymous user" and "authenticated user". Anonymous users have NO access to the site - you must specifically enable such access if you desire it. Authenticated users have ONLY the ability to log in and to edit their personal account settings - they CAN read created content and post comments but not create content themselves. If you want them to be able to, you must specifically enable it. Therefore, you always get the Log in block - even before you create accounts.

Hope this is what your were asking.

assaffriedman’s picture

when i click on the create first account link I get an apache page that says that apache is working but i dont get any thing from drupal so I cant create the first acount

jraper@groups.drupal.org’s picture

I suspect the DocumentRoot directive in you httpd.conf file is inconsistent with where you installed Drupal. What is the path to Drupal's index.php file?

assaffriedman’s picture

the path to Drupal's index.php file is
C:\Program Files\Apache Group\Apache2\htdocs\index.php

thanks

jraper@groups.drupal.org’s picture

That looks consistent with the httpd.conf dump you sent me, so that is not it. Just to eliminate the possibility, how about clearing the cache in your browser and restarting Apache.

jraper@groups.drupal.org’s picture

I also notice from the settings.php file you sent me that $base_url is not set. You might try setting it. If you don't have a URL, use:

$base_url = 'http://localhost';

assaffriedman’s picture

I have cleard the browser cache and cockies and restarted apache and changed the base url as you sugested then i got the folowing error mesages

Notice: Undefined index: path in C:\Program Files\Apache Group\Apache2\htdocs\includes\bootstrap.inc on line 161

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at C:\Program Files\Apache Group\Apache2\htdocs\includes\bootstrap.inc:161) in C:\Program Files\Apache Group\Apache2\htdocs\includes\bootstrap.inc on line 747

warning: Cannot modify header information - headers already sent by (output started at C:\Program Files\Apache Group\Apache2\htdocs\includes\bootstrap.inc:161) in C:\Program Files\Apache Group\Apache2\htdocs\includes\common.inc on line 139.

when i restored the setting.php to what it was before, the error mesages where gone and now i see the contents of httpd folder when clicking the create first acount link.

if you have any idea what the problem is or how to go around it I would be very thankfull
(i have already deleted the content of httpdoc folder and extracted drupal 4.7 again into it and deleted and created the data base again and still I have the same problem)

Heine’s picture

Add Allowoverride All to your httpd.conf (apache configuration ) and make sure .htaccess is in the drupal directory.
--
Tips for posting to the forums.
When your problem is solved, please post a follow-up to the thread you started.

assaffriedman’s picture

what does it mean Allowoverride All ?
and I dont understand what you mean by post a follow-up to the thread you started, if I would understand I will be happy to do it
and thank you again

Heine’s picture

AllowOverride tells your server which settings can be overwritten by a .htaccess file.

While AllowOverride All isn't necessary for Drupal it's the easiest fix. In your case the directives -Indexes and DirectoryIndex index.php were ignored. These directives in .htaccess instruct Apache to load index.php when someone accesses www.example.com/ and prevent directory listings in this directory and subdirectories.

Anyway, because these didn't get applied, you got to see the contents of the drupal directory.

The link below is part of my signature. Sometimes people post a question but never follow up to tell whether the proposed 'fix' worked. That's why I'm asking everyone to at least post back, as a service to other users, who may read the post after a search. You just did :)

--
Tips for posting to the forums.
When your problem is solved, please post a follow-up to the thread you started.

herb’s picture

I just tried playing with 4.7 for the first time on a Windows XP machine running WAMP5 (Apache/2.0.55, PHP4.4.2, MySQL 5.0.18-nt). The previous 4.6 install was no problem. Nor was upgrading the the 4.6 site to 4.7.

When I tried to install a fresh 4.7 with a new database I got hung up creating the first user. - There isn't a mail server that it can use under windows on my home machine but that was no problem with 4.6. It just displayed a password as is described in Douglass' Drupal. In the 4.7 creation of the "first user" no password is displayed, and the page just hangs.

When I view the database I can see the user number 1 and an encrypted password, but this is of no use in trying to log into the system, and/or change the password.

Any suggestions would be appreciated!

FWIW, I have added Allowoverride All to my httpd.conf and .htaccess is in the drupal directory.

goose2000’s picture

Yep, me too, ;(

I started with a fresh install, Drupal 4.7, new DB and most everything went fine, until I had to create the first account, and try to login. Does not work on Windows/IIS , as descibed in plenty of detail above.

I'm using:

Windows 2000
IIS 5.0
PHP 4.4.2
MySQL 4.0.21

herb’s picture

FWIW, I had the same problem on a different machine using IIS as the server. A fresh 4.7 install would just hang after creating the first user - You would not get to the next page where you could change the password.

Disabling Trend Micro PC-cillin Internet Security 2006 on the machine running WAMP5 did the trick! It worked just as promised, and as 4.6 versions worked.

It worked on the machine running IIS on a fresh 4.7 install if I used IE instead of Firefox to create the first account. Immediately after submitting the First User Account I got an IE pop-up asking if I wanted allow the program to access the internet. I said yes, and all was well! I suppose disabling Trend Micro on this machine would have worked also.

Re-enableing the protection after the first user is created seems to have no adverse impacts on logging into existing accounts, but I can't create new accounts on the Apache machine with Trend Micro running. When trying to create new account on the IIS machine, it "says" that it is sending an e-mail to the acccount created, (and Trend Micro appears to start scanning an outgoing message) - Yet no e-mail is actually received.

I hope this helps anyone else with the same problem - I'll now start trying to figure out how to create new users on these development platforms

oldani’s picture

All is ok but when I want to create the first user account I always get the directory content of the drupal directory in my Apache tree.
Thanks for help.
Gianfranco Oldani

dmendez’s picture

I struggled with this same problem. I am using Apache 2.0.58, so if you are using some other web server, this might not work exactly for you. But if you are, try doing this, it worked for me:

1. open the httpd.conf file found in the \conf folder of your Apache installation directory

2. find the "DirectoryIndex" entry and add "index.php" so that the line looks like this: DirectoryIndex index.html index.html.var index.php

3. save the file and restart Apache

What this does is allows apache to use index.php as the default file to reference to when a browser pointed to a folder and not a file. For instance now, you can navigate to "http://localhost/drupal-4.7.1/" and it will be the same thing as navigating to "http://localhost/drupal-4.7.1/index.php". This is required since the drupal index.php page seems to reference back to itself using a folder reference and not explicitly referencing itself as "http://localhost/drupal-4.7.1/index.php".

docileroo’s picture

The combination of editing the httpd.conf and changing the $base_url as described above worked for me.

egruber’s picture

I can't seem to find the thread that supposedly has the answer, but this thread isn't it. I've got a new install of 4.6.7 and I'm having the same issue. Odd, but the problem didn't exist on my local machine.

I appreciate someone pointing me to the solution. And if there is one, I think it should be in the troubleshooting FAQ.

ed523’s picture

following the instuctions in the installing 4.7 vodcast I uploaded the 4.7.2 folder to my ftp server, got my database created and populated and changed the settings.php to $db_url = 'mysql://******:******@mysql.rootsvisiondesign.com/drupal' but when I go to my site rootsvisiondesign.com I get the apache index of / with drupal 4.7.2 listed when i click it in the list (it's the only thing in the list other than "parent directory") i get the "welcome to your new drupal website" page and when I click the "create new account" i get Index of /cgi-system with php.cgi and php5.cgi listed. oh and the welcome to page looks like this which i believe is not how its supposed to look

ed523’s picture

just so happens the guy at the next table in the coffee shop knew what was up. had to do the base url thing.

nigma3d’s picture

I was almost ready to throw my new server out the window because of this problem, but it was THE FIREWALL. I am so happy!

kiguar’s picture

I had the same problem.
I downloaded drupal with wget on the server, untar-ed it and then copied all files from drupal ./drupal-version-number.tar to ../ where I want to keep these files.
I realised that the problem was that with cp ./drupal I omitted .htaccess. Because of that I could not create first account, so when I copy .htaccess it works without a problem.

Martin Frank’s picture

I have exactly the same problem. The Internet host set up Drupal for me, and I want to start working, and now I am wasting my time trying to log in to Drupal... It may sound funny for the saintly developers, but actually, this is what drives people off OpenSource.

Drupal sends me a Username and a Password, but they don't work. Drupal sends me another Username and another Passwort, but they don't work. How can you trust a piece of software and the people who developed it, when it fails you before you even can get into it?

How many people must suffer and waste time with this problem before the program and the Installation Instructions get adjusted?

Martin Frank’s picture

Martin Frank: By trying this and that, the issue miraculously resolved itself.

Maybe the first page should be corrected instead of "To begin, create the first account." to read "To begin, CLICK on create first account..."

nanobeep’s picture

Ok, this was the problem on my system. I finally found it after looking at my error logs and seeing a lot of this type of error:

PHP Notice: Undefined variable: _SERVER in /opt/lampstack-5.5/apache2/htdocs/includes/bootstrap.inc on line 204, referer: http://simplifeed.com/index.php?

Then I found this post which explains the error and how to remove it.

I resolved the issue by adding this to my settings.php by the other ini_set calls:

ini_set('auto_globals_jit', 'Off');

Then I tried to create the first user - the admin user again and woohoo! It works!

This is a major pain - and would save a lot of users frustration if it was already in the settings.php by default. Hope this works for some of you!

Matt Jaynes
Nanobeep Technologies LLC
http://blog.nanobeepers.com

wzwei28’s picture

wei

Problem: when user click on http://localhost/Drupal/index.php after setting the mysql, then user want to click on create new account...when user click to register 1st admin...the redirection fail to defail .../htdocs or my D:/ROOT(I modified path)...solution is pretty simple.
Solution: Just add a new 'index.php' in the 'httpd.conf' inside D:\Apache\conf folder

Original
-----------
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#

DirectoryIndex index.html index.htm

Modified(solution)
-----------------------
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#

DirectoryIndex index.html index.htm index.php

Then u will be able to link to 'http://localhost/Drupal/?q=user/register' with column to show username and email-address
hope it helps new user in drupal (me too...1st day register/join drupal family)

dbaruch’s picture

Thanks

sbrisendine’s picture

I checked my .htaccess file, it's good
I changed my httpd.conf file to: recognize index.php also, and contain "AllowOverride all"
I changed my settings.php file to reflect $base_url = 'http://localhost/drupal';

EDIT!!

I found the problem. If you are in this same situation where you have done all of the above and yet find yourself not able to get Drupal to do anything or your server seemingly ignores your .htaccess file config you need to check the error logs for Apache/2. I found that after one of my httpd.conf edits I screwed the system horribly and it never released port 80. I had to re-init my system from a cold-boot to get it to clear out. Apache2 was starting in maintenance mode, which allowed some web pages to come up, but PHP and MySql were then unable to connect to the the http system.