Hi
After installing drupal and creating a new admin account, I am not able to login to the site. If the correct username and password is used, I am directed to the same login page again. If the wrong username/password is used I am redirected to another login page, with wrong username/passsword highlighted in red.
After an extensive search of the drupal site, I tried the following:
1. I changed the update query in includes\session.inc to add 'like' instead of '='
2. I tried to enable clean url, by loading the mod_rewrite module in httpd.conf of apache and enabling clean url in .htaccess file - didn't work
3. set the following values "php_value session.save_handler user", "php_value session.cache_limiter none", "php_value register_long_arrays 1" in the .htaccess file
These are my system/installation details:
1. windows xp with PHP 4.4.0 and MySql 4.1.14
2. apache 1.3.33
3. drupal 4.5.5
Other notes:
1. Every time I try to login, this entry appears in the watchdog table, in the message column "session opened for admin
2. The uid of the admin user in the user table is 1
3. There is no data in the sessions table
I have tried all that I could, reading through the drupal site. Calling for help from all of you now.
Thanks
Naveen
Comments
Login
Hi. There are a few other things under node/6696; also check mod_rewrite in .htaccess (there are differences between your apache 1.3.x and apache 2.x), and your corresponding block in httpd.conf. Do you have other sites running php/mysql on the same system?
Unable to login
I tried all that the solutions listed in node/6696, didn't work. I assume that the default .htaccess file that comes with version 4.5 is for apache 1.3.x. Tried different options in the mod_rewrite block of .htaccess for getting clearn url's, as one post in node/6696 suggests clear url will solve the problem. I wasn't able to get clean url to work.
I have one more application running on php, mysql. will that create a problem?
Login
No; I just wanted to know if your system is properly configured. Below you find the relevant part of httpd.conf, for apache2 though, of a local test system I have. Check the "Directory" section under "VirtualHost".
DirectoryIndex index.html index.php
...
NameVirtualHost 127.0.0.1:80
...
<VirtualHost local.elcolectivocvs.com:80>
ServerAdmin jesus@elcolectivocvs.com
DocumentRoot C:\Jesus\sitios\sources\elcolectivo.com\drupal-cvs
ServerName local.elcolectivocvs.com
SetEnvIf Request_URI \.gif nolog-request
SetEnvIf Request_URI \.jpg nolog-request
SetEnvIf Request_URI \.jpeg nolog-request
SetEnvIf Request_URI \.png nolog-request
SetEnvIf Request_URI \.ico nolog-request
SetEnvIf Request_URI \.css nolog-request
SetEnvIf Request_URI \.js nolog-request
HostnameLookups Off
UseCanonicalName Off
ServerSignature Off
ErrorLog logs/local.elcolectivocvs.com.error.log
CustomLog logs/local.elcolectivocvs.com.access.log combined env=!nolog-request
<Directory "C:\Jesus\sitios\sources\elcolectivo.com\drupal-cvs">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Files cron.php>
Order Allow,Deny
Allow from 127.0.0.1
</Files>
</VirtualHost>
Thanks Cubano! It worked
Thanks Cubano! It worked.
The "AllowOverride All" setting inside the section was the problem. In my apache, it was set to none.
Thanks again. have a great day
Cheers
Naveen
What if we can't edit apache config?
Is there a way to send the necessary data via a header as part of the site? I remember having a similar problem with Xoops, but don't remember what the solution was. Nor do I know how to apply it to Drupal.
-- Coplan
Solution - edit user.module to recreate session ID
The problem is obviously caused by an anonymous cookie string being used int he logged in session. To solve the problem of Drupal not logging in and not giving an error message, in the user.module file in the modules directory, edit the lines 947 - 954 in the user.module of version 4.7 contains the function that authenticates users and creates a $user state variable.
By regenerating the session ID, you will drop the anonymous ID and pick a new one for the logged in session - You can see the detailed solution to this common bug by checking this Drupal resource.
-----
iDonny - WCMS Design, Devt., Marketing & CRM
Could This Also Be My LogOn Problem?
Hi Donny,
I saw your message here and read your links. It sounds similar to my problems. Do you think that this is what is causing my logon problems, as stated in this message Was Locked Out of 4.7, Now Back Inside under the heading of "I was locked out" and (on the same webpage, the next message down) described in this message Can't Get In the 4.7 Website again, errors.
If this is the problem, will I (and all my visitors) have to delete cookies every time I (we) go to my Drupal website? My Drupal 4.63 website has been up and going for many months and I've never had this problem. Is this a new problem with Drupal 4.7?
Thanks
Best Wishes,
Stephen
winterssewing.com/drupal
Related issues and solutions
I have answered your question about being locked out in http://drupal.org/node/63670#comment-122464
relating to the login and cookie question, it seems that this issues does not occur in all cases and might be related to the version of PHP or something else (I have not had time to fully investigate why it does nto happed on my particular Windows hosted Drupal), but occus on one of the unix hosted website and only accured in IE for me, while it occured in IE, FF, Safari on Windows and Mac machines for one of my clients.
But wheever/wherever it happens, I tweak the user.module and that fixes it. Let me know if you are experiencing that issue now and if you need some advice - do not worry, I do not charge for finding solutions to problems that plague all of us: my way of saying thank you for Drupal.
-----
iDonny - Web Content Management System Design, Development. & CRM
Thanks for Explaining Log On Problems
Donny,
Thanks For helping Me Understand
Thank you so much for explaining how drupal works, both here and in you message: Seems like a number of compound problems - explanation. This helps me to understand a little more about the workings of Drupal.
Further info: The Drupal test website (Website 1, which I'm testing for our church) is hosted on Netfirms. Here are the specs of that website. Website 2 (with the copy of the database from my live upholstery information site) is hosted by Indichosts. Here are the >specs to website 2.
Thanks for your help
Best Wishes
Stephen
winterssewing.com/drupal
Config Info?
You mentioned the config for your sites but did not show anything (or maybe you placed code that was filtered-out). You can send me direct messages here if you want fast help in understanding and solving problems in Drupal
-----
iDonny - Web Content Management System Design, Development. & CRM
Correction/Update: Login Problem is in both websites
Didn't Think Website 2 Had the Problem
I thought that the login problem was in just in website 1 (see previous messages) which was a new install. I didn't think I had the problem in test website 2, because, after upgrading a few days ago, I had never logged out and had not done anything more with website 2.
Found It Did Have the Same Login Problem
Today, I went back to the test website 2 and found that I was still logged in. To test what would happen, I logged off website 2. At the user Login prompt, to log back in, I entered my name and password and pressed “Log In”. After the screen refreshed, instead of being gone, the User Login was still on the screen. When I looked at the “Who’s online” block, it said there was 1 user and 0 guests. Under “Online Users”, it showed my name. After I clicked the IE Explorer “Refresh” button, the “Who’s Online” block showed that there was currently 1 user and 1 guest online (both of whom are me). Under “Online Users” it still shows my name. This evening I went back again, and still wasn't able to fully log in. Same problem as above.
Evaluation.
The login problem shows up on both websites, ever though they are on different website hosts. So I would think that the problem is in Drupal.
Donny, I've sent you a private by the link you provided.
Stephen
winterssewing.com/drupal