I've done quite a few sites - and never have I had this happen.
I've got a site - it's a pretty simple one - some CCK add ons, some views, some content types.
Simplenews and mimemail.
Logintoboggan.
All modules I've used often.
I am the only user in the DB. I know what my login creds are. I'm logging in and admin-specific blocks are showing. Also, if I go to site/admin, it will greet me with a login box, and a "you are not authorized" message.
I type my login, it will show me all of the admin controls. Then if I click on an admin link, it kicks me to a you are not authorized page.
This same behavior happens on all admin pages. I can type the URL. Get a login / auth message. Then login and see the page. From there, I click anything and get a "you are not authorized" message.
I've since disabled simplenews, mimemail, logintoboggan.
I've manually changed the update script not to check for authorization and run it.
I've flushed all of the drupal cache tables
I've looked around for some glaring error in Watchdog
I've cleared all my authorized sessions, cookies and temporary internet stuff in FF3.
I've tried IE6, IE7, Opera.
I have to admit. I'm at a total loss for what else to try - short of starting again... Which wouldn't be a total loss, cause I still have the template files, but what a pain in the arse.
Has anyone got any suggestions?
It would be awesome to recover this work instead of blowing it away and starting it all again.
Cheers,
Adam
Comments
This is on my local machine
This is on my local machine as well.
I just tested several other local sites running the same modules (and more) and I can log in and administer things as expected.
It's just this one site.
Is there a quick way to tell what is happening?
Cheers,
Adam
See if the url is changing
See if the url is changing from www. to non www. or visa-versa. One of the first sites I built experienced a similar problem and the cause was the change www in the url. If this is the cause then you can force one or the other in your .htaccess file.
Does this happen with a
What Drupal 5 version exactly? What PHP version?
Does this happen with all those browsers?
Do you have any underscore characters in the domain name of this site?
I'm using 5.12 This happens
I'm using 5.12
This happens with all browsers.
There aren't any underscores in the domain names.
it's just
http://localhost/xampp/futbol
when I log in, I get redirected to http://localhost/xampp/futbol/node
As mentioned, there are blocks which are only supposed to be shown for admins. These are shown when I log in.
Then if I refresh (if I am on a publicly accessible page), the admin blocks are gone.
Hmm, very interesting...
Still working at this one
Cheers - and thanks for the help.
Adam
MySQL
MySQL database 5.0.67
PHP 5.2.6
Do you see any unexpected
Do you see any unexpected changes in the URL or in the menu links when you find yourself logged out?
Check the content of the "localhost" cookie in your browser for any inconsistencies.
In the sites/default/settings.php file, check the settings which affect the cookie and try a few things:
- Try setting
$base_url='http://localhost';>- Try settings
$cookie_domain='localhost';or$cookie_domain='127.0.0.1';- Try adding an
ini_set('session.cookie_path', '/' );line.The settings.php file may be automatically write-protected by Drupal every time and you may need to chmod it.
This is also happening to
This is also happening to me. However, I've had my site up and running for several years now.
When I log in, it takes me to a page, but logs me out. I have to log back in every time I go to another page.
Nothing has changed with my code, I'm assuming my hosting company upgraded php versions or something.
These are the stats on my hosting computer:
Apache version----1.3.41 (Unix)
PHP version -------5.2.5
MySQL version-----5.0.67-community
Architecture-------i686
Operating system--Linux
Can anyone tell me how I can fix this?
Thanks much.
What Drupal version
What Drupal version (exactly)?
had to do some digging. it's
had to do some digging. it's 4.6.0. very old :) but just started happening.
That is really old.
That is really old. Obviously your server switched to PHP 5.2 which is incompatible. See http://drupal.org/node/102114
Either upgrade to at least Drupal 4.6.11 or use the temporary fix in settings.php which is given in that page.
Wow that fixed it!! Thanks
Wow that fixed it!! Thanks so much.
I have had this happen
I have had this happen before on more than 1 site. For me it was always a cookie problem. Clearing all my browser cookies has always solved it for me. You might also try clearing the sessions table in your db.
I've moved on from
I've moved on from this.
re-start.
I did back up the DB though, so if anyone offers up a suggestion, I can try it.
Cheers,
Adam