I've Windows XP SP2 (Apache 2.2, PHP 5, mySQL 5) !!

I installed drupal 4.7 successfully with all config files modified. (settings.php, creating drupal database and loading tables with database 4.1 mysql - successfully imported)

First try of Drupal (localhost)

1) I opened url: http://localhost/drupal/
the index page loaded successfuly and I clicked "create the first account" link

2) In the first time registration page: I entered UID and Email address. as soon as I clicked "Create new account" , I get this page "http://localhost/drupal/?q=admin/menu"
Saying Access denied You are not authorized to access this page.
(I was supposed to get the page where I could change my password to new one...)

Can any one help me how to resolve this issue.

Thanks in advance!

Comments

rivena’s picture

This is *just* a guess, but... are you logged in?

Anisa.

-----------------------------------------------------------
Kindness builds stronger bonds than necessity.

www.animecards.org - 16,000 card scans and counting!
-----------------------------------------------------------

Remobram’s picture

I followed the instructions given in the videocast and other documentation... when you load the drupal for the first time.. , you have to register an account (which would be the administrator account by default)... i was trying to register... but as soon as i clicked create new account for say user id "Remobram" the page load with the following message "Access denied" (still a drupal page)..

One interesting thing though... the row with userid "Remobram" is added the drupal database in the table "users" ...

I did one more thing.. I edited the password using phpmyadmin for Remobram and tryed logging in again... but stilll its says "unrecognized userid or password"

Any thoughts?

Thanks!

sepeck’s picture

Make sure the MySQL account you have in settings.php has LOCK TABLES permissions. On occassion trouble with creating the first account can be traced to missed db permissions.

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

rivena’s picture

If I remember correctly, the password has to be in a certain format md5 hash or some gibberish like that. Basically not in plain text. Maybe that's a problem? Also, status should be set to 1.

You should be able to log in after creating a user in the database.

Anisa.

-----------------------------------------------------------
Kindness builds stronger bonds than necessity.

www.animecards.org - 16,000 card scans and counting!
-----------------------------------------------------------

4hoo’s picture

Hi Remobram,

I know you had this problem long time ago but could you tell me if you solve this problem?
I am having the same problem and my configuration and environment is the same as yours.
I tried Drupal 4.7, not work. I am trying Drupal 5.x now but still have the same problem.
The symptoms is :
when I create the first account and just after click to submit and get the "access deny" page even though I got email later with the user name and password inside.
I only have windows XP firewalls and tried turn it and other anti-virus software off, no luck.
I tried other methods from this forum but still not work.
Please tell me how did you solve this? many thanks
My system:
Windows2000proSP4(I also tried on WindowsXPSP2 machine, the same problem)
PHP5.0.5
Apache2.0.54
Mysql 4.1.15
PHPMyadmin 2.6.4

formaldigest’s picture

And pretty much the same configuration, but with Drupal 4.7.2.

I did successfully receive the Drupal user account details email, but got the access denied message instead of the welcome page. I know the user details are in the database as I (correctly) get an error if I try and create another account using them. BTW I've been following the set-up instructions in David Mercer's new Drupal book.

Sorry as I'm a newbie I'm not sure where else to look for clues, so I too would appreciate any ideas.

Thank you.

formaldigest’s picture

Poking around with phpmyadmin I've found that if I login with the created user account details then the login time is updated and the "Session opened for [...]" message is saved in the watchdog table. However, in the browser the user page doesn't appear - instead the "Welcome to your new Drupal website" page just refreshes (with the login block on the left cleared :-( in both Firefox and IE.

I used apache2triad 1.5.4 (ie current latest release) to setup MySQL, PHP, Apache etc.

berndlosert’s picture

I have been able to reproduce the problem with the exact same symptoms with Drupal 4.6.8 and 4.6.9 running on Apache 2.0 and PostgreSQL under Linux CentOS 3. On my personal workstation, it works just fine. Weird.

--
eKo1

berndlosert’s picture

The problem was caused from using PHP 4.3.2 and Drupal requires PHP 4.3.3+. How silly is that?

--
eKo1

RMattB’s picture

I have the same problem, here's my environment: Windows XP Pro, Apache 2.0.58, MySQL 4.1.20, PHP 4.4.2, & Drupal 4.7.2.

I've covered all the other bases mentioned here, including:

Tried to log in with first account, but never get the password change page, instead get Access denied.

MySQL account has all permissions - used "grant all".

Thanks for any help!

Sc0tt’s picture

turning off my firewall/antispyware/antivirus software.

I use Zone Alarm and when its on..."access denied" and when its off...no problems. Iv'e been tweaking around with Zone Alarm's settings but can't seem to find what setting is causing the trouble. I think its something to do with "3rd party cookie blocking" or "private header" settings?

Anybody has any insight into this?

Thanks!
Sc0TT

bezigheid’s picture

When I disable the setting "Remove private header information" in the "Privacy" module of Zonealarm, the problem is solved for me,

Jackqui.

sepeck’s picture

Could you add this information to the handbook please?
As a child page here: http://drupal.org/node/199

This will help folks in the future and is nto something that would have occurred to a lot of people.

Thanks,
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

d_l’s picture

I am trying to install drupal 4.7 on PHP5.1.4 / Apache 4.1.21

I followed the videocast here .. http://ftp.osuosl.org/pub/drupal/files/videocasts/4.7-installing.mov

I got as far as launching drupal, and then ..

1. Create your administrator account.

After setting an admin user name and email address .. I get the "access denied" message reported in this thread and I cannot go to the administration account setup procedure.

bezigheid above suggested ..

disable the setting "Remove private header information" in the "Privacy" module of Zonealarm

This I had ticked in Zonealarm .. so I disabled this setting .. but I still have no password to logon as administrator. Does this arrive by email to localhost?

Can I purge this administer username / password process and start again with the new Zonealarm setting?

If so, how to purge administration logon settings?

Peter Boerger’s picture

I have been using the etrust (Computer Associates) firewall (which I believe uses the zonealarm firewall). Disabling "remove private header information" did not work for me either, but disabling the firewall altogether did work for me. I have tried changing a few settings in the firewall but nothing other than turning it off seems to work. It appears that I can run drupal OK on my machine using the Windows firewall in place of the etrust (zonealarm) firewall.

One other "tip" (don't know for sure if this helped me with my Drupal problems, as I am a newbie, but here goes anyway): I have had some trouble logging into the apache server and phpmyadmin, and I found that using "root" as the id works (along with the appropriate password), whereas the id that I thought I had established when setting up apache does not work. This "tip" is found in the Mercer book that I have been working through (p:37).

Efrum’s picture

I've got the same problem but I'm not using Zone Alarm of any other antispyware/antivirus software. What else can cause this behaviur?

Drupal v. 4.6.8
php 4.3.2
mysql 4.1
apache2

mboc’s picture

I have the same problrem, my guess is that with windows XP you don't have a SMTP server installed so the application is trying to send an e-mail through localhost with the password and the mail send is not working. I am still having touble to make it work.
any help is welcome!

sepeck’s picture

Lack of an SMTP server has nothing to do with creating the first account on your system. (UID1) You do not need to send an email to create the first user. You click the create user button, create the user. Change the password, you are done. If this is not working fo ryou, then review your installation steps again.

You can install a third party SMTP server on Windows XP if you want. mailenable and hmailserver are two free ones that come to mind.

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

mromer’s picture

I have two Drupal sites (one 4.6 and one 4.7.3) running on the same server. With the older one, I had occasional trouble staying logged in when I moved my laptop from my office to my home network. Rebooting it usually solved the problem.

With the newer site, it's different. No matter which location I have my laptop in, I have to turn off ZoneAlarm completely to log into the site. I've checked ZoneAlarm's cookie settings for both sites, and they are identical. This has really got me puzzled.

-Mark

srajendi’s picture

Can I login to the MySql database, update the UID of 1 to another yet-to-be-assigned number and reassign UID of 1 to the another ID.
Will this break the application? or will it work? Any alternatives?
Any drupal speicalists tried something along these lines, do let me know.

srajendi’s picture

ric.hayman’s picture

Same setup as Remobram.

The account exists, changed the password via the command line as described. The user record has a status of 1, the login works and I get a page that tells me I have been a member for 55 minutes - when I click on the "edit" tab I get the "access denied" message

DarQik’s picture

Same symptoms on a fresh install today. I spent most of the morning beating my head on the wall. Drupal may be very flexible, but it's been a pain to get going.

None of the suggestions here worked as I tried to build a test bed.

Problem Config: WinXP SP2, Apache 2.0.59, mysql 5.0.24a, php 5.1.6, phpmyadmin 2.9.0.2, drupal 4.7.3

I had everything working fine, but Drupal would not let me get a user login.

I backed off to mysql-4.1.21 and php 4.4.4, and the problems went away. (After I fixed the old_password issue between php and mysql.) I went back php 5.1.6, flushed the db and restarted. Again no problems.

So, it appears there the problem is with using mysql 5.0... (?)

Edit: It broke again. It gave the initial auto-login, but no follow-up logins. DB seems to indicate a connect, but no menu access. Is there a DNS naming reliance for login?

DarQik’s picture

Way too many threads on this issue. I have it reasonably working now thanks to another thread.

http://drupal.org/node/6696#comment-122419

orick’s picture

The easies way to fix this is to shut off firewall completely. Or if you want to mess with Zonealarm. Go to 'privacy' section, turn off cookie control and ad blocking. go to program section, make sure mysql, php and apache all have full access.

use phpmyadmin, delete the old drupal database, create it again. you have to do this because even if you delete user 1, the next user becomes user 2.

It should work from there.

vindos’s picture

Orick, you are right. The 'Zone Alarm' is the culprit. I tried many things to set cookie off and providing all access to apache and php and mysql. But nothing worked..

Then I decided to turn off the zone alarm and wow, I was able to login.. ;-).. Thanks for the information..

One major note: Turning off the firewall is not good in case if you are connected to internet and browsing, as there are chances that your computer may get affected with virus or spywares, or even attached by hackers. Turning the Firewall when you are online is risky business.

mental.apparition’s picture

Had the same access problem after establishing Drupal 4.7.4 install on windows workstation with XAMPP 1.5.5 which runs PHP5.2 out of the box. Had to switch to PHP4.4.4 to resolve issue.

donnoit’s picture

If you are using PHP5.0.5 or later you needed to make a one-line change to session.inc.

See http://drupal.org/node/20397#comment-177472 by 'swifty'

greenman’s picture

As anyone stumbling across one of the multiple threads on this topic, there are many possible reasons for this! One possible reason is that the UID for the initial admin user must always be 1. Check the users table, and change the UID for the admin user to 1 if it's something else (which come happen if you've been playing around with Drupal, multiple installs, etc)

abramo’s picture

if by any accident you happen to delete the original "Administrator" account/user (oh, my!) Drupal will not allow you to create a new "Administrator" user - it will only allow you to create a new anonymous user account, giving it a UID number in the "users" table of your database which is the UID number of the last-created account plus 1 - meaning that if the last-created account had been given ex. UID "151", your new UID will be 151+1= "152"

but this will not do - Drupal recognises as "Administrator" only the user account with UID of "1".
so what to do?

- create a new account with user name and pass of your choice : this account will initially be an anonymous user account, to be turned into an "Administrator" account following the next step.
- go to database table "users" and change the UID of this new account to "1" - and presto! you may login to this account as an "Administrator".

if you use phpmyadmin for MySql database administration, this should only take a few seconds to fix.

hope this helps,
abramo

czdurham’s picture

I'm a total noob at this, and I was just trying to get drupal to work on my local machine so I could try it out. After tearing my hair out and searching all over the web I found the "problem" in settings.php. I was just trying to run on localhost (127.0.0.1) so the block of code that sets "session.cookie_domain" was getting skipped so my cookies were giving me a problem.

This is NOT a general solution, but for anyone running on localhost it might fix the problem. I added the following line to settings.php (I added it before the block that would normally set this parameter) and things seem to be working fine now:
ini_set('session.cookie_domain', '127.0.0.1');

tat@work’s picture

I tried your method, it worked perfectly! Thanks for sharing the information!

Patrick M’s picture

I posted the problem I'm having with this over on a "sister" thread at http://drupal.org/node/20397#comment-198955

Reading through this thread again, however, I have a suggestion that might help mitigate a little frustration for some.

Whenever I click a button, databases and so forth are always updated, but I always get the "access denied" message. However, simply clicking the browser's refresh button moves me on. That's hardly a fix, but at least it's let me be productive doing other stuff while trying to figure this problem out.

I mention it because some of the other posts here suggest that the "access denied" message may be making some posters think they're being stopped cold, when refreshing the page may let them go on. That's not acceptable for production, but in development the problem has been more of a nusance for me than anything else, and I've gotten a lot done while leaving this problem mostly on the back burner.

But now it's on the front burner because I'm ready for production!

Also, like others, I have ZoneAlarm, but even completly shutting down my firewall makes no difference.

pelikan2402’s picture

PROBLEM: I got the same problem with the Create first account, when i entered username and email i got the page that said; access denied, ..

SOLUTION: When attempting several times i accidently clicked the Back<- button after it popped the Acces Denied page. It didnt return me on the create first account page but it jumped on the User account edit page, where you should be after putting your first user name and email.

note that you must clear your previous USERS in phpmyadmin from previous attempts or it wont work
becouse your first user must have the UID#1 or it wont work.

ubby4ever’s picture

Pls I am a newbie on this stuff and need ur help. I don't understand what u are stating here, right from SETTING THE ZONEALARM, FIREWALL SETTING ETC.

I need someone to give me a straight and simple/down to earth explanation of what I need to do to access my Administrator's page. Thank you very much