I cannot login to my Drupal 5.1/apache vhost/win32 server using my admin user on the /admin page; however, everything works if I log in on the user page.
I am running PHP5, but have the most recent version of Drupal with the appropriate fix (with the register_shutdown_function() call, something about objects being destructed before the session being able to close properly).
I have tried the following things that have been recommended on this site for people with similar issues: ini_set(session.cookie_domain, domain); clear client cookies/cache; verify admin status of user; clear session table; reset md5 hash of password
The ?q=admin page POSTs to /?destination=admin, which returns a 200 with the front page as content, but watchdog logs 'access denied'.
The ?q=user page POSTs to /user, using the exact same postdata, but the login works and it sends a 302 response to /user/1 and then i can go to ?q=admin and administer the site.
Does anyone know what the heck is going on?
FYI my site is an apache vhost and is a test site having dns name test.mydomainname.com (don't know if that's relevant or not).
Comments
Normal behaviour
Maybe I'm misunderstanding your problem here, but you can ONLY login through the /user path. Going to /admin before logging in will always give you access denied. It doesn't what user you are, all logins must be done through /user.
______________________________________________________________________________________________________
Need help? Check the FAQ and the Handbooks first.
______________________________________________________________________________________________________
An admin is a user
As the other comment tells you, this is normal. An admin is a user (with special access control).
/*_*/
http://www.xmacinfo.com
Thanks for your responses. I
Thanks for your responses.
I guess I wasn't clear; the login form on the /admin page is not working:
ex) an unauthenticated admin user navigates to the \admin page, realizes that they are not authenticated (since they see 'Access Denied'), and attempts to use the login form presented to them on that page (this is the standard User Login block). This login form does not seem to work, since they are redirected to /?destination=admin (which is odd in and of itself since the system has clean urls enabled) and further attempts to administer the system only lead back to 'Access Denied'. The user decides to go to the \user page, attempts to log in there, and then only are they authenticated and can the go to \admin to administer the system.
I am having this same
I am having this same problem, too. It seems strange that the /user log in form works, but the /admin log in form doesn't. Looking at the pages, the /admin log in form has an action of "/?destination=admin", while the /user log in form has "/user". I wonder if this is a result of having a custom theme?
FYI this subject is being
FYI this subject is being discussed at thread 145370
The problem explained
The problem is caused when you remove the "login form" block from your homepage.
The "why" is explained in a little more depth here: http://rjharrisontemp.blogspot.com/2007/12/drupal-sucks-login-panel.html
The solution is put the login form block back on your homepage, or modify the action of the login block/create a custom block that has the action of /user/login?destination=admin (where you want to redirect to the admin page after logging in).
Richard.
rjharrison is right
if /admin doesnt work, but /user work correctly, rjharrison explaination will HELP you.
rjharrison is indeed right,
rjharrison is indeed right, adding a login block to the homepage fixes the issue for me. Is there also a 'fix' for this? I dont want the login block to be visible on the homepage.
Using drupal 6.19