Help! I can't log in or enable cookies!

Help! I can't log in or enable cookies!

by Erika Christopher -
Number of replies: 9
I'm just a poor, confused high school student. Basically, I'm supposed to become a member of Moodle in order to check assignments for my AP US History class. The main moodle.com site will let me log on, but my school's site (http://moodle.lancastermennonite.org) won't let me log on, and continually tells me my browser hasn't enabled cookies. I went to internet options and lowered the security levels, and even told my computer to accept all cookies from that particular site! Help! Soon! I need to check my homework (or maybe I shoudln't ask for help...lol)!  
Average of ratings: -
In reply to Erika Christopher

Re: Help! I can't log in or enable cookies!

by Steve Bilton -
Hello Erika,

By the sounds of it your using Internet Explorer as your main browser. And it sounds like you've done the cookie enabling correctly.
Perhaps a bug in IE is causing the problem (not sure)

You could try downloading the latest versaion of Mozzila FireFox browser from :
http://www.mozilla.com/products/download.html?product=firefox-1.5.0.6&os=win〈=en-GB.
and install it.

The cookie settings are located in
Tools > Options then click the 'cookie' tab.
Then click on the tick box that says 'Allows sites to set cookies'

That should get around the cookie enable problem. If this doesn't do it, you may have your logon name or password wrong. that's all i can think of.

hope i helped

Steve
In reply to Erika Christopher

Re: Help! I can't log in or enable cookies!

by derek almond -
I solved this by checking that there was no white space at the end of my config.php

it should end with

?>

then have absolutly nothing after that - not even a new line.

Derek
In reply to derek almond

Re: Help! I can't log in or enable cookies!

by Eduardo Aspe -
thanks a bunch!! you made my day!
In reply to Eduardo Aspe

Odp: Re: Help! I can't log in or enable cookies!

by Magdalena Pomagalska -
Hello everyone! I'm an english teacher and I've just installed (I think) my Moodle. And I have the same problem. Unfortunately, it's even worse since I already have Mozilla Firefox with enabled cookies and I checked the config.php file - everything's in order.
Can anyone suggest sth?
Maybe I shouldn't have tried it... it's not as easy as they say it is...
In reply to Magdalena Pomagalska

Re: Odp: Re: Help! I can't log in or enable cookies!

by Remco Salomé -
HI Magda,
I've had the same problem for months. The strange thing was, that I had normal access from my home-PC. At work I had the problem you described.
The cause was double firewalls: my computer at work had a firewall of its own enabled. We also had a firewall that protected the complete LAN. With both firewalls enabled I couldn't stay logged on.
Solution: Turn the local firewall of your computer off.
But you're right: for non-computer-nerds it's not as easy as they say it is! Still: hang on there, for me it turned out fine in the end...
Remco
In reply to derek almond

Re: Help! I can't log in or enable cookies!

by Andy Smith -
I also just experienced a similar problem.

config.php had no extra spaces or line breaks, cookies were enabled, etc.

I think the problem came from leaving a moodle page open overnight. I cleared the history, temporary files, and cookies from IE and logged in without issue.
In reply to derek almond

Re: Help! I can't log in or enable cookies!

by Sean Lee -

Thanks, Derek, that worked for me as well.

For some reason, the fantastico install script did not come with a complete config.php file.  The "?>" was missing at the end.

Also for some reason, even with the "?>" missing at the end, I could log in using Chrome or Firefox, but not with IE.

Oh, and I also had to change the last line in config.php from

require_once ( "{$CFG -> dirroot}/lib/setup.php" ) ;

to

require_once ( "$CFG->dirroot/lib/setup.php" ) ;

Sean

In reply to Sean Lee

Re: Help! I can't log in or enable cookies!

by John Fisher -
The ending ?> tag is not actually required if the file only contains PHP code (as is the case for config.php).

http://framework.zend.com/manual/en/coding-standard.php-file-formatting.html

The curly brackets are also correct, they are part of 'complex syntax' in PHP. It's used to demarcate a variable inside a string (i.e. only use a portion of the string as the variable name).

http://us.php.net/manual/en/language.types.string.php#language.types.string.parsing.simple

So in theory these two changes shouldn't have affected your installation.