Problem with login (doesn't seem to 'take')
kwerle - March 24, 2004 - 20:01
Nice smooth install.
Fixed the magic_quotes_gpc setting.
Database looks fine.
Created my first account.
Got the email delivery.
Tried to login... No error, but no login. I just end up back at the login page. I've checked my database, and the accounts are in there. I've tried resetting passwords - no help. I've tried to fail login - I get the failure message, so that's working.
My vague guess is that there is some kind of problem with the session, but I can't imagine what it is. I'm no php expert.
Any advice appreciated.
For a demo of the problem, feel free to hit http://shiftmanager.net/reunion/
TIA,
Kurt

Cookies
Is your browser set to deny cookies? That could be it. If something had gone wrong at the user login (invalid username/password) you would've gotten an error message about it.
Not cookies
That isn't it (I don't think). For example, I can log into drupal.org just fine.
myspace
where is the log in thing for myspace, i cnt find it?
myspace
where is the log in thing for myspace, i cnt find it?
Server System Time
In addition to checking for cookie acceptance - you may want to take a look at the system time on the server. I was beating myself up over this same issue for 2 days. Firefox could log in - IE could not. Finally, for reasons unknown, I checked the system time on the server and it was set to 5 years in the past.
It seems that Firefox wasn't checking for the timestamp and IE was. Since the server was issuing a cookie for 2002, IE saw the session as expired and immediataly logged me back out.
I updated the time on the server and all is well.
DONT WASTE TIME READING THIS THREAD
drupal_page_footer();
$GLOBALS['tempUser'] = $user;
ADD TO THE INDEX.PHP FILE AT THE BOTTOM! (LAST LINE)
I SPENT ABOUT 6 HOURS LOOKING THRU THESE THREADS AND TRYING THINGS LIKE CHANGING BASE URL, COMMENTING OUT SESSION CREATION LINES, ADDING THINGS IN THE SETTINGS.PHP, HTPACCES, ETC, ETC, ...
That did the trick for me *Partially*
Indeed this is what helped me out on an ageing drupal 4.6.11 install. Mind you: I still get an occasional return to the login page again, but at least it is workable now.
Time to upgrade to 5.1.
*Edit*
A freshly built testsite with Drupal 5.1 and a new database started to behave the same way as my ageing 4.6 install
This is on a server with php version 5.2.0, zend engine v2.2.0, on apache 2.x (version not given).
Oceria doesn't know where this -repeatbutton -repeatbutton is....
Did not work for me, unfortunately...
...on Drupal 4.7, with persistent login problems as described by the original poster. Glad it worked for other people, though.
Can anyone comment on
Can anyone comment on exactly why this is the case? This fixed worked for me (Drupal 5.1 and PHP 5.2), but it would be nice to understand why this problem exists...
Note I can log in with Safari but could not with Firefox. With this fix, I was able to log in with both.
Also, what are the security implications of this fix?
Can't login after created new user
I too am having this problem; it has been working fine for weeks, and today I created a new user with special role (admin) slightly more limited than user 1. When I tried to login using this info, I get the site maintenance page (I've got my site offline) and cannot login.
No error message, nothing. Can't get login screen to login as first user again www.domain.org/?q=user/register does nothing.
I'm on a mac os x using firefox 2.0
drupal 4.7
I tried:
1. clear cache, clear cookies, clear privacy, restart Firefox
2. add to settings.php
ini_set('session.cookie_domain', 'exampleorg');
ini_set('session.cookie_domain','www.example.org');
ini_set('session.auto_start', 0);
...to no avail.
Can someone help me? many MANY thanks. this is a bummer, otherwise my first experience creating (but not administering) a drupal website was grand till now.
thanks but
thanks for this, but it didn't do it for me... any other advice? see my query below
Seemed to work
This issue seems to be the cause of hosts updating to PHP 5
This one code seemed to work fine with my sites to get it working, but if it dosen't work for others, you may want to try this patch:http://drupal.org/node/93945
~~~~~~~~~~~~~~~~
Kris
Current projects: www.cribfax.com
www.myabatherapist.com
It worked for me. ISP had upgraded from PHP 4 to 5
Thanks a million John. That would have taken me a year to figure out.
I did some more digging and it turns out my ISP had upgraded from PHP 4 to 5 over the weekend .... and hadn't told anyone ?!
That works
Thanks a lot. Your solution worked for Drupal 5.1 and php 5.1
Did not work for me
drupal 5.1
PHP Version 5.2.0-8+etch1
http://drupal.org/node/131728
--
best regards
Artur
good tip, thanks.
$GLOBALS['tempUser'] = $user; appears to have fixed a bunch of problems for me. Thanks for posting it.
Rob
Well done! that solved my
Well done! that solved my login problem.
Drupal 4.7.3 + Apache 2.0 + PHP 5.2.1
ADD TO THE INDEX.PHP FILE AT THE BOTTOM! (LAST LINE)
drupal_page_footer();
$global['tempUser'] = $user;
thanks for this.
worked for me on Drupal 4.7.3 too
Worked for me too.
Drupal 4.7.3
PHP 5.2.5
Apache 1.0
i didnt work
it didnt works to me... im using the 5.1 and nothing....
Why not read it? Your solution didn't help me...
Hey, there are apparently different things causing this problem for different users - or the variables are very different in different cases. I traced MY problem [5.1 on 5.2.1] to cookies and my firewall (see my post at: http://drupal.org/node/139464), though I haven't solved it completely to my satisfaction yet - so I will keep reading! BTW - arturro (http://drupal.org/node/131728) seems to have found the same thing.
Lifesaver
Wasted as well 6 six hours until I can across this comment.
Web hosting company decided to upgrade to PHP5.2 without warning us, and then the admin login stopped functioning.
Searching around, I found a hack on the user.module with session_regenerate_id() but within the user_authenticate() function but that failed.
Then found in the handbook, issues between Drupal 4.7.4 and PHP 5.2 so I decided to upgrade to 4.7.5, but that failed as well.
And finally to this post. Uploaded everything back to 4.7.4 version and modified the index page and everything worked.
If any one else across the same issue follow these instructions - they are the easiest and least time consuming, before you try any of the others options.
Administrator login problem
I am the super administrator and this fix worked, only after I requested a new password.
When I reset the password however, I can no longer get back to the administrator menu,
and the temp password is only good for one login for one day.
It would be ridiculous to keep requesting a new password every time I need to login to the admin
menu and this is not going to be acceptable to my client either.
How can this be fixed permanently????
Thanks.
that worked for me
Thanks!!
not working anymore
This fix was working fine until now, it stopped for working for me. Has this happened to anyone else with this problem??
Nicolas
-------------------------
http://nic.ipwa.net
Drupal 5.2 and 5.3 give me a
Drupal 5.2 and 5.3 give me a lot less trouble than 4.6 did. Did you recently change the theme of your site? You only change the template of the theme you are using. If you start using an other template (or created your own) you should reapply the patch to the new template. Hope that helps!
Oceria doesn't know where this -repeatbutton -repeatbutton is....
changed index.php not template
I didn't apply the patch I just added the code for the index.php, which is not part of th theme. Thanks.
Nicolas
-------------------------
http://nic.ipwa.net
Perfect!
Thanks a lot, johnchalekson :)
OMG Thank you!
I accidentally stumbled across this post. I didn't even know the question to ask, but this did the trick for me too!
Thanks again.
Cheers,
--
tys
BLUE MOUNTAINS health & harmony
www.health-harmony.com.au
building an alternative health & spirituality community in the Blue Mountains
First account created
Are you trying to login with the first account you created? This is the admin account by default and is identified with uid=1 in the users table.
Once you login with this account, go to Home » administer » accounts » Permissions and check the box for authenticated users for "Access Content"
--- www.harvesterchurch.org
Can not login
Once you login with this account, go to Home » administer » accounts » Permissions and check the box for authenticated users for "Access Content"
Every time I try to login with ANY account (including the first one), I end up back at the login page. I have no interesting (admin) links. Just the login page.
Again, feel free to hit my site and see what happens.
Watchdog
Take a look at the contents of the watchdog table in your database, it contains all events that happen in Drupal.
You, too, can now see what dr
You, too, can now see what drupal recorded (as of now):
http://www.shiftmanager.net/~kurt/drupal.log
Pretty clear it thinks I'm logging in. And yet my client isn't getting anywhere...
Damn it. <a> doesn't do what I thought, and the tips don't say how to embed a url easily. Time to submit another bug.
New user?
Can you create a new user and login as that user? If you can, change the uid for that user to 1 in the users table. That user then becomes your first user and has admin rights be default. Use this login instead of the first one you created.
I had to do this on the first drupal site I created. Don't know why, don't care anymore- it worked.
--- www.harvesterchurch.org
Every time I try to login wit
Every time I try to login with ANY account (including the first one), I end up back at the login page. I have no interesting (admin) links. Just the login page.
It's a cookies thing. If I
It's a cookies thing. If I login with an admin account and change something, then login with a test account with different permissions there is often a cookie conflict and I have to delete the cookie. Now what I do is log in to test on one browser (IE) and log in to change things with another browser (FF)
It worked for me
Thanxs jxs2151
I thought that would work since I was able to create a new account. I changed the new account to user 1 my broken one to the user name, then I went into and altered the info on old user (broken one) just enough so I could recreate new user same as the old user minus the slight edits. After editing the broken user account I had to save it, then I was able to do the recreate... Then I went into my account setting and turned off blocks etc. and configured those options in my edit
page same as the old broken account. Viola! A 12 minute fix tops. Just took 2 days to get to it.
Thanxs again brother
peace Michael S.
ProgressiveBastion.com
Yup, I'm Liberal...
Liberal
lib~er~al (lbr-l, lbrl), adj.
1a. Not limited to or by established, traditional, orthodox, or authoritarian attitudes, views or dogmas; free of bigotry.
b. Favoring proposals for reform, open to new ideas and beha
Creation of new user and changin UID for it worked
I have created two new users and tested their rights and so on. Everything worked fine until I tried to login as admin (the very first user I created at the time of installation) it did not work. It gave me an error of "unrecognized username/passord". I know my user name and password were admin/admin but did not take it.
So, this trick worked for me. I changed one of the new user's UID to 1 and now can login again with full admin rights. It is a pain however if I need to do this everytime I do a user testing.
-----------------------------------------
I am a newbie, please be gentle with me...
I'm having the same problem,
I'm having the same problem, and it appears kwerle never found the solution, as the address he gave above now says it's powered by XOOPS.
I've been using Drupal for about two weeks, was able to sign in and out without difficulty. Now, any attempt to log in, simply returns you to the login page. Any attempt to create a new account, returns you to the account creation page, and does not actually create a new account.
Well...guess its not just me.
Well...guess its not just me...I'm having the same prob...any news on a fix? Or...should I just reinstall?
Same problem
I'm getting the same problem. Is it related to my Apache or PHP settings I wonder. What are the recommended Apache 2 settings for Drupal?
Same problem: can't log in the first time.
I've had the same problem. I've messed with the database, reinstalled it several times, all so no avail. Any *valid* login just returns to the login page. An invalid login gives the usual error. Works the same with IE and Mozilla. I surely would like to have a clue about what to do now.
I had some users of IE who ha
I had some users of IE who had this problem, i think. if you go to tools > internet options... then to the privacy tab. click on Advanced... then override automatic cookie handling, accept first-party cookies and always allow session cookies. this worked for them.
i have one person who can't login from linux/firefox, but i haven't figured out why yet. i use firefox on windows at work and it works fine, so any ideas on how to fix it for him would be nice.
Found the Problem!
Thanks, but those were already set on IE. I'm allowing all cookies on Mozilla. Doesn't seem to me that the browser would be the problem if it doesn't work in either.
But wait! I found the problem - turned off Zone Alarm. Works fine now.
crazy, but I turned off ad bl
crazy, but I turned off ad blocking, and it allows me to log in... it won't otherwise
Zone alram worked for me too
Thanks for this i had a lot of problem getting drupal going after first account created and turning off zone alram worked. Now why is that?
Hi. Where is "zone alarm"
Hi. Where is "zone alarm" located?
I'm having the same problem...
Zone alarm is firewall
Zone alarm is firewall software.
I have just experienced the same problem in 4.7 after moving my site to a new server.
However I can get back in through an email password one off login. But not the normal login, arrggggh.
Zone Alarm vs. Drupal Cookies
It looks like drupal redirects us to its login/home page every time it can't set its cookies as well.
By turnning on Zone Alarm's Privacy Advisor we can see if ZA is blocking cookies from a particular site (localhost in my case).
To enable ZA's Privacy Advisor goes to
privacy > main > (cookie control) custom > cookies. Toggle it on at the bottom.Load the drupal home page again and you will (i did) see the privacy advisor showing up that the cookies were blocked.
To get ZA accepting drupal's cookies, i just reset everything on Custom Privacy Settings to their default values.
This might help something!
YEA! Thanks for the instructions!
Never would have figured out how to get Zone Alarm to stop interfering with Drupal
Access Denied on LOGIN? Turn off Pop-up & Animation in Zonealarm
problem: Access denied on LOGIN.
Solution:
Two ways to solve problem:
#1: One way is to Turn off Zone Alarm.
#2:Or go under Privacy in ZA. in the Cookie control field click on custom. Go to Ad Blocking tab. Uncheck Popup/pop-under and Animation box. Apply. restart server few times if it doesent affect right away.
Worked for me.
P
Checking "Always allow session cookies" solved my login problem
Thanks! Overriding automatic cookie handling and then checking "Always allow session cookies" did indeed solve my problem of not being able to login.
Thanks for the tip
Thanks for the tip, it fixed my problem. IE7 is particularly aggressive with anything security. I guess it will cost many big sites a lot of money to get MS to add them into the list of friendly sites (i.e. sites that do not cause massive security warning on people's IE7) ;)
JG
FastCGI?
I think I'm having the exact same problem (I'm also not able to log on after a fresh installation). To me it looks like it's a problem with running Drupal with PHP as FastCGI on IIS. When I try to run Drupal with PHP as an ISAPI module it works fine. Can anyone figure out why it's behaving like this? I'm stumped.
FastCGI is used for instance when you install the EasyWindows Installer from http://phplens.com/phpeverywhere/node/view/12
cheers,
Otto
mod_rewrite?
I've had this same problem, as it looks like a lot of people have had.
If you are using clean URLs, make sure you have mod_rewrite turned on in Apache. In Debian (>=sarge) under Apache 2, you must link mod_rewrite from /etc/apache2/mods-available to /etc/apache2/mods-enabled. Other versions of Apache 1.3/2.0 require you to have the line uncommented to load the module.
Jeremy - the linux web guy
rewrite.load?
I'm using Debian GNU/Linux. In my /etc/apache2/mods-available directory I have a rewrite.load but not a rewrite.conf file or mod_rewrite
Also, I have the problem even though the rewrite load file is symbolically linked to the /etc/apache2/mods-enabled directory.
Am I missing something?
Joe Murray
Trying to create my first account...
On the "register" page, I can't even get my first account email sent off; it just blanks the fields and reloads the page. No error messages or anything. I set up an account at Drupal.org and was able to log in just fine. Maybe my problem is that stuff with Apache. How exactly do I go about changing those settings? (I use a hosting company, so the server isn't in my possession.)
The site is at `http://vokation.com` if you want to check it out. Feel free to try and set up the first account. But if it works, um, I'm gonna want the password. Please help! I'm itching to get rolling on my site.
weird! i was able to login
weird! i was able to login with your site by creating an account...
similar problem
Site works and logins works. One day I logout then try login back. And no more success - no error about bad username or password, site returns back to user/login page without any messages, user stil unlogged. And no any new strings in watchdog :\ - attempt not registered by site. Not only me can't entry - other users too, all from different browsers (FireFox, IE). Clean urls disabled, site placed under subdirectory of virtual domain, Drupal 4.5.1 installed.
--
Axel,
Russian Drupal Community
same problem reports
I search drupal.org and found some similar reports from different Drupal versions:
http://drupal.org/node/3649 (Drupal 4.2.0)
http://drupal.org/node/11369
http://drupal.org/node/5698
--
Axel,
Russian Drupal Community
+
not all
http://drupal.org/node/14998
http://drupal.org/node/14939
I had the same problem.
And my solve is there:
http://drupal.org/node/14939#comment-24202.
Enabling of 'clean urls'
Enabling of 'clean urls' solve problem.
--
Axel,
Russian Drupal Community
Having the same problem!
I have no idea why this is happening I have set up Drupal a lot of times before but this is the first time i'm doing it on a webhost instead of dedicated server.
Can't create any user or login, even changed tables and created user and then tried to log in... it does show up in the 'online users' block but don't get any links or admin options! If anyone has a clue, i've enabled clean urls and still the same problem!
--- MultipleX
www.hambastegimeli.com
Don't click this link if you don't know Farsi!
Ok figured out it's not taking any POST info...
I added
print_r($_REQUEST)on the index.php page so it should show if it picks up the value's from the form, and it seems this isn't happening!Could this be it? And if so, does it have something to do with any PHP settings or variables?
Also could it be I have to change/edit something in the '.htaccess' file??
Cause I get an error from the server when I upload the standard '.htaccess' that comes with Drupal so I had to comment out a few lines!
Any help very much appreciated!
--- MultipleX
www.hambastegimeli.com
Don't click this link if you don't know Farsi!
Confirmed
I had the login (non)redirect problem, and enabling clean urls (with mod_rewrite) fixed it.
New install, Mac OS X, same problem
Just installed Drupal in my Mac, OS X 10.3.7 using Safari and FireFox (both accepting cookies) and I have the same problem. After creating the first user, I can't login and I don't get any errors.
If I use a wrong login, I do get the appropiate error msg.
Now what?
One more with problem
Same thing here. Old drupal site works no more. Brand new install on the same server works fine! I can't spot the difference, other than the code base.
Could this problem be
Could this problem be related to sessions? I have problems when running under suphp on a brand new install of drupal. The reason for that is the php settings in .htaccess which are not valid for suphp. To properly fix it I'd have to put those settings on a php.ini file specific for that vhost. Instead I disabled suphp for that specific vhost. But I still have the problem with an old install as I had previously. It's the same with plain mod_php or suphp... this is weird.
Same problem here with 6.4.2 on IIS webserver PHP5.0.4
identical same problem:
Use valid user/passwd, kicked back to login page.
Use invalid user/passwd, kicked back to login page and saying Access denied.
It appears that the first case is passed the login check, for some reason, it cannot redirect to the correct page or the login info is not stored.
It doesn't work with both IE and FireFox. We can see there is a cookie there in FirFox. So it's not the cookie problem also.
BTW: I am using MySQL with UTF8 charset. Wondering if it's this problem.
WEIRD !
Problem Solved! by adding: register_long_arrays = On
In settings.php add this satement:
ini_set('register_long_arrays', 1);
or modify this in php.ini globally:
register_long_arrays = On
(the default is off)
It works !!!!!!!
Didn't fix it here.
Didn't fix it here. My problem is only related to IE though. Login works perfectly in Mozilla Firefox, but it does as described above when trying to log in with IE.
Did the trick
I had problems logging in under Firefox (no problems under Opera) and your tip fixed the issue. Thanks.
P.S. add ini_set('session.cookie_domain', 'domainname');
Please add this line to settings.php as well:
ini_set('session.cookie_domain', 'domainname');
domainname here is the domain name used for your drupal URL. No subfolder, No http://
Try it.
Yours is different though. Mine is the server side setting problem. For both IE and Firefox. Yours appears to be the client side browser issue.
Another possibility
I had the same problem as well. I could login with no problems, and then one fine day, it stopped working. I tried all the solutions listed on this page but none worked. In the end, I found out that my sessions table was corrupted. I tried repairing it, but both my .myi and .frm files were corrupted, so in the end, I had to recreate the table. Just want to point out that this is one of many potential solutions to the problem in this thread.
Has anyone found a solution for this?
I have the exact same problem
Using the correct password for any account returns the same page.
Using wrong passwords returns page with the wrong username/password thing.
I'm on Windows XP SP2, Apache 2.0, the latest mySQL, PHP, and Drupal.
This has become so frustrating I'm ready to go back to Xoops.
SOLVED!
Finally!
Go to your php.ini file
Find this line
session.cookie_path = \
Change it to session.cookie_path = /
Does anyone know why php is distributed in such a way? I realized when combing through cookies stored from my test site vs drupal.org
Hope this helps other ppl.
This worked for me!
Thank you thank you thank you.
I have been wrestling with this access denied problem for 3 days - tried every combination of suggestions in thisd forum.... and this one small change was the difference. Please try it everyone
I am on WINXP, Apache 2.0, php 5.2 and drupal 5.1
Where is php.ini on a shared Linux server?
Where is php.ini on a shared Linux server?
Local web folder
I' using shared hosting on hostgator.com and I just put the php.ini in public_html/ and it's works!
SOLVED +1
Thanks littleprince! I'd almost given up. This worked for me. FYI here is my setup:
Drupal 5.2
Windows Server 2003
Apache 2.2
PHP 5.2.1
MySQL 5.0.27-community-nt
Anyone know if this is a Windows only issue?
browser related
for me it was browser related because i can login to my Drupal site or this Drupal site using Opera instead of Internet Explorer in this computer lab. however, using this IE i can login to other sites including gmail and wikipedia but not drupal. i wonder why is that - something for drupal to be fixed.
I had this problem too
I disabled the login block, and I could no longer log-in via user/login using Firefox 1.5. :o
I logged in via IE, and re-enabled the login block, and now I can log-in via Firefox 1.5. :o
I did notice that when I click on request new password, it says "access denied." :? I must have something messed up, but I do not know what.
"Extraordinary claims require extraordinary evidence"
-- Carl Sagan
Clearing all of my private
Clearing all of my private data in Firefox 1.5 fixed this issue.
"Extraordinary claims require extraordinary evidence"
-- Carl Sagan
Another Solution to Try
I was having this problem and I tried every solution listed in this discussion and the discussions in each of the duplicate bug reports. None of them worked for me. After a long process of tracing the program flow (PHP really needs a debugger), I found out what my problem was and I have a hack to fix it.
For reference, I am running drupal 4.7 on apache 1.3 under debian Linux 3.1 with MySQL5. This also means that I am using the mysqli api to connect to the database, and I have the database.mysqli.inc file I found in another discussion here.
My problem was that the sessions table was not being written to. The problem was that for some reason, the number of affected rows was coming up blank after a certain number of queries. I was echoing the all of this info to the screen from within the db_query function. What I did to fix this is a hack, but it works. I basically made drupal make a new database connection after every five queries.
in includes/database.inc, I changed:
function db_set_active($name = 'default') {global $db_url, $db_type, $active_db;
static $db_conns;
to:
function db_set_active($name = 'default') {
global $db_url, $db_type, $active_db;
static $db_conns;
//debugging. reset connection after a certain number of queries
static $connections;
$connections++;
if ($connections > 5) {
static $connections = 0;
$db_conns[$name] = NULL;
}
And:
function db_query($query) {
to:
function db_query($query) {
// debugging. call db_set_active each time to give it a chance to
// count the queries and reconnect after a specified number.
db_set_active();
This could be yet another fix that only works for people with my particular flavour of the problem, but hopefully that's you and you will be able to paste this code in and move on instead of spending three solid days hacking at it like I did. If this doesn't work for you, make sure you try the other possible solutions listed in this thread, and in the other discussion
login of first user after registering - problem fixed
I installed Drupal 4.6.5 on my local Windoze box using the versions of Apache, PHP, and MySQL that are part of the "Sugar on Spike" stack from SugarCRM. The Drupal page comes up fine and prompts me to create the first account, which I do. It then displays a password for that user name (uid=1). When I go to log in with that user/password combination, I get the error message "Sorry. Unrecognized username or password. Have you forgotten your password." So I checked a bunch of things. I made sure that the localhost site would accept cookies. I turned off ZoneAlarm even though it shouldn't be an issue on a local machine. I looked at the users table in the MySQL database name to make sure that the uid=1 entry was there. I looked at the users_roles table to make sure that uid=1 was represented there. Everything good so far.
I browsed the watchdog table. Line 4 is the access denied entry mentioned above. Subsequent failed logins also. So I took matters into my own hands and wrote a SQL command to change my password in the users table following the suggestion of Jason@gut.sourceforge.net (see drupal.org/node/3884)
update users set pass=MD5('newpwd') where uid='1';
Now I'm able to log in and administer the site.
But it appears that drupal stores a different value in the database than the one displayed on the screen. My only guess is that this is a case of the OLD_PASSWORD problem with mySQL, but it would be helpful if someone took a look at this issue.
Tony
Same problem with 4.7
I have a number of Drupal sites running 4.6 with no problems. When I try to create a new site with 4.7 I get the login issue. Running on Windows 2000 with IIS PHP is 4.3.1 and mysql is 4.0.22. All my my established 4.6 sites are running fine, but any new 4.7 sites I try to add I get this login problem. I have tried all of the different suggestions here and elsewhere, but nothing is working.
Any other suggestions or any additonal information I can provide? Thanks!
Somewhere, somehow, Drupal sets a double cookie.
Was able to log in using Firefox and then suddenly not IE, but then also found that using IE on another machine with an identical setup got me in.
The Drupal log showed the IE session opening even when the login appeared to 'not take'. (I'd get the login page back again, no error messages).
So, I used phpinfo() to find out what cookies were being sent and found that my IE had somehow picked up two seperate PHPSESSID cookies for my Drupal site, and was sending both. PHP was only recognising the older of the two cookie values, hence it was not reconnecting the new, logged-in session.
Once I cleared all the cookies in IE, it logged in fine.
I'm going to make a guess that the same double-cookie thing has happened to Drupalites who've had sudden problems with Firefox or other browsers.
SO: Somewhere in Drupal there must be a page which is sending the double cookie. Where I don't know... please could everyone work to hunt down this little easter egg?
Also, IE does not regcongise the cookie as a session cookie, because the expiry is set to a week or so. If the cookies did expire immediately, the double cookie would go away once the browser was closed and re-opened.
I'm currently using 4.7 RC3, with the following modules:
Amazon Tools
Adsense
Flexinode
G2
GSitemap
NModeration
Poormanscron
Service Links
Troll
VotingAPI
Urllist
XStatistics
----
http://www.whatdoesthatmean.com
http://www.ponderfodder.com
http://www.scribendi.com
Cookies the solution here
After two days of reinstalls, deleting tables, attempting hacks in related threads, I finally was able to login as admin using both Firefox and Safari (Mac OS 10.4.6) after deleting all PHPSESSID cookies.
My attempts to login after creating the first user (as well as other users) was the popular return to the login page with a valid login and the normal error message with an invalid login. Additionally, attempting to go directly to
http://DOMAIN/?q=user/1/edit would give an access denied message.
I'm not sure how to avoid a reoccurence (expiraton of cookies, perhaps?), but can at least offer this as a possible solution for now.
PHP 4.3.2.26
Apache 2.0.46.56
MySQL 3.23.58.2.3
(versions not in my control)
Apache Solves it
If I run it under Apache, no problem. IIS and I get the login issue. Obviously I just need to switch to Apache, which I am working on...
Don't think it's an apache issue
As I'm running it on Apache and had the problem
----
http://www.whatdoesthatmean.com
http://www.ponderfodder.com
http://www.scribendi.com
PHP session.auto_start
Had the same problem running on Apache 2, PHP 5.0.4, Drupal 4.6.5 and 4.6.5, Fedora Core 4.
I tracked it down to the session_set_save_handler function in includes/session.inc failing. If this doesn't work, Drupal's session handlers don't work and it won't update the sessions table in the database so it thinks you're not logged in.
For this function to work, the PHP setting session.save_handler must be set to "user". Drupal tries to do this in the sites/default/settings.php file, but in my case it was failing and the following messages appeared in Apache's error log:
PHP Notice: A session had already been started - ignoring session_start() in .../drupal-4.6.5/includes/session.inc on line 14,PHP Warning: ini_set() [<a href='function.ini-set'>function.ini-set</a>]: A session is active. You cannot change the session module's ini settings at this time. in .../drupal-4.6.5/sites/default/settings.php on line 109
Basically, session.save_handler must be set before any session starts. However, the default PHP install had the line "session.auto_start = 1" in the php.ini file so PHP was automatially starting a session before Drupal had a chance to change the settings.
The fix was easy: change php.ini so that the line reads "session.auto_start = 0" and it Drupal now works!
It's be good if Drupal could detect this situation and handle it, or at least report a meaningful error.
session handling
Could this explain why I see the following behavior (Drupal 4.7.0, Apache version 1.3.36(Unix)
PHP version 4.4.1, MySQL version 4.0.27-standard):
When I login to my Drupal site, 4 sessions show up in the sessions table; the UID for the first 3 sessions are 0, the 4th one is the correct UID. Then 3 more sessions are created with UID of 0. What is going on? THe login fails, although the log file written by watchdog shows that a session was started for the correct user name.
The server is 4 hours fast. Could that have an adverse effect?
session.auto_start set to 0 does work for me, thanks!
In settings.php I added set_ini('session.auto_start', 0);
That seems to have solved my problem. (I don't have access to php.ini)
Until I made that change, I was seeing as many as seven sessions started for one attempted login. This no longer happens. Thanks so much.
Thanks
session.auto_start = 0 worked for me when I updated the php.ini file.
I now have sessions being written again.
my host did a major php/mysql upgrade and it affected quite a few things. This saved me.
ALL of them did not work for me !!
I have tried all the listed solutions and still i can not login with IE (6 and 7) but i can with firefox. I think this problem is related to the hosting enviroment. I facing this issue with a linux box with CentOS 4.3. I have a secound box with linux CentOS 4.2 and it is working perfeclty !!
also this issue happen for 4.6 and 4.7 ?!
If you like to try visit:
http://www.freeq80.com
Login Error
I'm encountering the same problem on a 4.6.6 fresh install on a Linux box server where and older install of 4.6.3 works smoothly.
Log in brings me back to the log in page without any obvious errors in Watchdog or Apache logs.
Hope this can be solved soon.
Same Problem!
I am in exactly the same position as legacyb4. New install of 4.6.6 fails, but older install of 4.6.3 works perfectly.
I get 'Session opened for username' followed by 'user/1/edit denied access' in the watchdog table.
Really need some help with this one.
Cheers.
add another one
I'm having the same issue here. Never had this problem with Drupal 4.6.X, but am tryng to get Drupal 4.7.0 RC4up and running on a test machine, and am having this same problem. I hve tried everything above, to no avail.
Windows XP Pro SP2
Apache 2.0
PHP 4.3
MySQL 4.1
Perhaps 4.7 is not yet ready for primetime on all systems. I'm going to go try it on my Linux host, and see if I have the same issue there.
Same problem as well
This is really odd. All my other Drupal accounts work (most are 4.6.5). I setup a new account last night and tried to login with IE6 (Windows XP) this morning and a no go. Tried FireFox and it worked fine. Drupal 4.6.6 here as well (PHP 4.3.2 I believe).
EDIT: I uploaded 4.6.5's user.module. If I run into problems I will update here.
My Fix is This
I had the same problem: login attempts simply returned me to the login screen, even though I was actually logged in. Even though the problem existed on one of my Windows computers, it worked fine on another identical computer on the same desk.
Based on suggestions in another thread (can't remember which one), the following solved my problem. Replaced my 4.6.6 modules/user.module file with the 4.6.5 version.
I'm not totally confident that this permanently solves the problem since the problem is so strange. It's definitely related to sessions and involves some combination of host/client elements. If someone smarter that me could look at user.module and determine what changed between 4.6.5 and 4.6.6, it might lead to a real solution. I'm not saying that 4.6.5 worked for all cases, but whatever changed between the two version relates to the problem.
Cookies a problem
As per another user's post, i deleted all cookies and the problem went away (for now).
I was noticing that, even though I couldn't get past the login screen, Drupal was reporting that I was among the logged-in users - so obviously there's some sort of session weirdness going on here.
Now if I could just figure out how to stop this from happening again...
Server: linux (freevps); Apache 2.0.46; PHP 4.3.2; mysql 3.23.58; Drupal 4.7 (had the same problem with the RC i was using)
Client: macOSX, Safari & Firefox
add me to the list of problem
I am having the same problem. Creating first accout, going back to login and it does not work. I tried installing so many times and tried all the tricks above but no success. Is there a simple solution because this should be a simple fix with the new release and thats what I have.
Can some one post step by step procedure and list complete solution since this is hapen to many installers?
YES YES MEE TOO!! don´t
YES YES MEE TOO!!
don´t know what to do I´ve tried with all the suggested fixes but none of them work
we need no find a fix soon its getting on my nerves althogh I now drupal is great and we are goint to find a solution soon.
Fixed with newer version of PHP
PHP 4.3.2 and lower versions use PCRE (Perl Compatible RegEx) older than drupal requires and if u have clean_urls turned on watchdog will mark u as if u logged in, but u will stay on the login page
just upgrade PHP to version higher then 4.3.2
worked fine 4 me
.::acidcorteX
More Info
Tried again with 4.7.0. Tried all of the other things suggested since last time. Still running on IIS.
When I first hit the page, I get a new record in the sessions table. UID of 0 with a SessionID of 56 (shortened for space). Then I enter the username and password. Now there is a second record in the sessions table with a UID of 2 and a SID of 44. But when I look at the cookie on my computer, it is for a PHPSESSID of 56...
Is that the source of all these problems? The cookie left on my computer connects me as a user 0? Any other thoughts on a fix?
Thanks!
Cookies the culprit?
Yeah it sure looks like you get a "Guest" PHPSESSID cookie when you first get to the page, before login - somehow this isn't being replaced by the proper authenticated-session cookie after you log in.
Anybody know where these cookies are set?
By the way I'm running Apache under linux, so I don't think this is a server thing - others are having the same trouble under IIS.
Where's the big brother?
I wonder, if developers look through the hottest topics, at least sometimes :)
Fortunately
you filed a bug report ;-)
http://drupal.org/node/61900
--
Tips for posting to the forums.
When your problem is solved, please post a follow-up to the thread you started.
.
I was surprised, nobody had done it earlier.
Cookies
Clearing cookies was the problem for me since it worked in Firefox but not IE.
I think this issue http://drupal.org/node/60584 may have something to do with it.
Rob
------------------
Some of my Drupal sites:
Quotes | MySpace Layouts
Ok, EUREKA !!! :D I applied
Ok, EUREKA !!! :D
I applied this recomended solution and it worked for me I think is not the best solution but it works. So I am going to use it until I find a better one. For the fix, you have to modify the user.module in your module files and comment the next three lines:
FROM this:
$old_session_id = session_id();
session_regenerate_id();
db_query("UPDATE {sessions} SET sid = '%s' WHERE sid = '%s'", session_id(), $old_session_id);
TO this:
//$old_session_id = session_id();
//session_regenerate_id();
//db_query("UPDATE {sessions} SET sid = '%s' WHERE sid = '%s'", session_id(), $old_session_id);
And That´s it
I am Using:
DRUPAL 4.7
APACHE
PHP 4.3
Worked for me!
Thanks, quineto - that worked!
Drupal 4.7
Apache
PHP 4.3
Safari and Firefox
Didn't work
Damn, seems that's not a universal solution.
Did the trick!
I have tried all the proposed solutions up until this post w/o success, but this one did the trick for me!
My Setup
Drupal version 4.7
Windows 2000 Server
PHP 5
MySQL 5
Thanks!
quineto i bow down before you
have tried so many fixes without success until now!! thanks!!!
...and then i stand up again
it did fix the problem in ie but it worked once in firefix and then the problem came back again. ... blow
I have tested this fix in
I have tested this fix in firefox, mozilla and IE , it works pretty well in all of them, what version are u in drupal 4.7? is this ur first install?
I found out that is very importatn to upload files in binary format through ftp to ur server to keep the files correct, this save lots of problems difficult to find out, so check this...
please let us know how u are doing with this issue
This worked!
Redhat EL4
Apache 2.0
PHP 4.4.2
Just commenting line #943 worked
943: //session_regenerate_id();
Hooray.
This worked for me. However not all sites will have that line in..well..the same line. It is also important to note that if you're going to attempt this fix, download the user.module from your site (that's already had editing done through the software) rather than trying to edit the default one that comes in the Drupal archive. Yeah...I felt stupid.
This didn't worked for me but i tried this:
Hallo!
The problems ar occuring in firefox Mozilla/5.0 , not in ie.
I'm using
drupal-4.7.6
PHP Version 5.1.4
xampp for windows
Apache/2.2.2 (Win32)
and after reading all this i tried commenting line 967
// sess_regenerate();
and it seems to work.
Thanks for this thread!
fix worked for me
The comment out lines solution fixed my problem Using Apache2/PHP4.3 on a Linux host.
uncommenting those lines worked for me. Thanks quineto
see the subject
fixed it for me too
many thanks for this
i've got several druapl installs on the same box (all the same codebase, all the same evirnoment) and only my latest setup was giving me the problem.
---
login with inavlid credentials gave correct error
login with correct credentials just redisplayed log in form!!!
login via request new password was ok and showed the previous "failed" attempt as successful!!!!!!
---
tried allsorts.
clearing all cookies solved it on firefox but not on IE but fortunately this patch to user.module got things working.
completely baffled, especially as my other "identical" (apart from content) installs were fine.
anyway, thanks again
This worked for me!
I know that it's like over a year since this problem occurred for most people but my ISP recently upgraded and this has worked for me!
Debugging process
I was just able to reproduce this in IE. I logged in at http://agencysolutions.us/user. The significance of that is the $base_url in the settings.php file is set to be http://www.agencysolutions.us, so the site redirected to www.agencysolutions.com. IE recorded the cookie as deekayen@agencysolutions[1].txt.