Can't login to my Moodle Site

Can't login to my Moodle Site

by Tym King -
Number of replies: 14

I was happily working away and then logged out. WHen I tried to log in again, however, I got this message: "Unfortunately, cookies are currently not enabled in your browser" . Well, they are or I wouldn't have been able to log on to this site.

I wondered if it might be an erroneous message for a wrong password or username but I've tried all the possiblities several times and every other user gets the same message, so ......

Plus, when I try to send myself an email with my login details I get: " ERROR: Could not instantiate email function."

Help!

BTW, I'm using the version that was new in July. Sorry, I can't remember the number.

Average of ratings: -
In reply to Tym King

Re: Can't login to my Moodle Site

by Jeff Wood -

The same thing happened to one of the teachers at my school yesterday. When try tried a different machine all was fine. I’ll check the problem machine today (if it happens again).

Jeff

In reply to Jeff Wood

Re: Can't login to my Moodle Site

by Tym King -
I tried it on another machine and with different logins with exactly the same results every time.
In reply to Tym King

Re: Can't login to my Moodle Site

by Timothy Takemoto -

Hi Tym

1) The presence of a return or other character after the last ?> in your config.php. This seems to cause all manner of problems (1, 2) including the one you are experiencing.

2) Cured by deleting browser cache and cookies

3) Client / client site side firewall such as Zone Alarm installed on your computers. To check that there is no client side cookie problem please see
http://www.iatn.net/help/cookies/index.asp?once=1

4) Can you log in in Firefox/ I.E. / other browser?

5) Is your server date and time okay? 

6) If your sub-domain name is longer than 10 characters (e.g. a_long_subdomain.somewhere.com), IE will have difficulties in setting cookie
http://hk2.php.net/manual/hk/function.setcookie.php

7) If your cookie privacy settings in IE or firefox are the problem then sometimes you must reboot the browser to get new privacy settings to take effect.

8) There was also a July 2006 Moodle bug such that clearing cookies resulted in the "Unfortunately, cookies are currently not enabled in your browser".
http://moodle.org/mod/forum/discuss.php?d=49316

9) Try using the login block (but if you are the admin and you can't login you will not be able to use the login block) instead of the login page.

10) Is there a sever side session problem? There could be a lot of reasons?.

TT


Average of ratings: Useful (2)
In reply to Timothy Takemoto

Re: Can't login to my Moodle Site

by Priya Saini -

Hey Guys,

Even i faced the same issue when i tried to login manually for the first time..
Actually after installation i got place in admin account, so did  a lot of my work then n there.. but when i tried to re-login.. i got the messgae that my cookies are not enabled. The thing is, i went for manual configuration of moodle through config.php since my server host is running php 5.0.x version. The mistake was there in my config file, when i mapped to my one of my already running moodle installation i was able to make out the mistake...

Finally.. Its working!! smile

Best Regards,
Priya Saini

In reply to Timothy Takemoto

Re: Can't login to my Moodle Site

by Tym King -

Thanks very much for such a detailed reply Timothy. I've passed it on to the techie guy at work. I'll let you know how it works out.

Thanks again.

In reply to Tym King

Re: Can't login to my Moodle Site

by Tym King -

Phew! Sorted. It was this one Timothy:

"5) Is your server date and time okay? "

We're all completely baffled as to how it changed in the middle of a session but there you go. It works fine now. Thanks very much everyone who replied.

In reply to Tym King

Re: Can't login to my Moodle Site

by Priya Saini -

Hi All,

One new problem poped up, can't say new or not. I am able to login successfully for the first time from both the interface (login screen/login block). But after logging out when i again try to login i get this message

"A server error that affects your login session was detected. Please login again or restart your browser"

As Timothy mentioned earlier in the list of possible reasons, i think this is something related to server's session. Am I right? and if so, can u guys suggest some solution?

Best Regards,
Priya Saini

In reply to Priya Saini

Re: Can't login to my Moodle Site

by Priya Saini -

I am still getting this error at times.. Can anybody suggest some solution...

TIA,

Priya Saini

In reply to Priya Saini

Re: Can't login to my Moodle Site

by Mauno Korpelainen -

Check your php.ini and that php-sessions-folder session.save_path = xxxxx) is correct.

Check that in your datadirectory also sessions-directory has 777 or 755 permissions (users must be able to write sessions)

If this does not help try this

In reply to Priya Saini

Re: Can't login to my Moodle Site

by Robert Brenstein -
Is it possible that you login to different Moodle servers? If they use standard cookie setting (custom string can be set in admin interface), that error is reported when you switch between them.
In reply to Timothy Takemoto

Re: Can't login to my Moodle Site

by Lorenzo Nicora -
Hi
I read now the message about cookies problem, suggesting that the cause might be...
[...] The presence of a return or other character after the last ?> in your config.php. [...]

Is it possible that the same cookie problem might arise for a "return after last ?>" in a language strings file?

I'm fighting against a random cookie problem after adding a custom language file.

Lorenzo
In reply to Lorenzo Nicora

Re: Can't login to my Moodle Site

by Mauno Korpelainen -

Hi Lorenzo,

I notized from your lang-file moodle.php that you have 2 "carriage returns" after ?> It should not be a problem but it might...

You can try it, php is sometimes "strange".

In reply to Timothy Takemoto

Re: Can't login to my Moodle Site

by Robert Guttenberg -
I had the same "cookies" problem and by deleting the "enter" in the config.php file everything works fine. Incredible that an enter can make that problem!! I wonder how you first figure that out.

btw, thanx a lot for the tip



In reply to Robert Guttenberg

Re: Can't login to my Moodle Site

by Hitesh Shrimali -
My problem is little bit defferent. All user can login to site easily without any problem on localhost.but when i uplode that site on to my live server . and try to login as admin it get login but after that i faced blank screen . now i try login with diffrent user and it work fine . can any one suggest what to do ...