|
[
Permalink
| « Hide
]
Jani Lemmetyinen added a comment - 12/Jan/09 10:44 PM
Find this with IE 6.5 as well. Safari and Firefox running OK.
I managed to find a workaround which has solved the problem. I have been waiting to see if there has been any adverse side effects, but so far none. This means changing some of the code, but don't get worried as you can't do any damage.
Firstly you have to look at the suite of files that are installed in your moodle directory. There should be an 'login' sub-directory. Open that. This subdirectory contains all the bits of code that handles the logging in of a user into the system, and it is where the problem lies. In that directory there should be a file named "index". You must open that file with a program that enables you to change the code. The file commences with the following code (to help you identify the correct file): <?php // $Id: index.php,v 1.129.2.3 2008/05/18 21:26:57 iarenaza Exp $ require_once("../config.php"); // check if major upgrade needed - also present in /index.php OK? Now you have to track down to the following comment: ///Check if the user has actually submitted login data to us The next few lines should look like this: if (empty($CFG->usesid) and $testcookies and (get_moodle_cookie() == '')) { // Login without cookie when test requested
$errormsg = get_string("cookiesnotenabled");
$errorcode = 1;
} else if ($frm) { This simply removes the check to see whether the user has a 'cookie' that proves he/she has been there before. I can't really see why they have included that as it makes no difference and it is clear that some browsers don't keep the cookies in the way that this program anticipates them, hence the problem. Once you have made the changes and saved them, the program should work OK. Don't worry about making the changes, you can always go back and delete the /* and */ if the worst comes to the worst as this is all you would have added. Assigning this to Petr. He knows far more about sesisons and so than me. My tests under IE tell are working ok here, but I cannot imagine a primary cause for this.
This code will be rewritten in 2.0, I am not going to touch it in 1.9x any more. This test does work for very many ppl and really helps to detect disabled cookies in browsers.
btw if you do not want this test it might be easier to change 1-->0 http://moodle.org/mod/forum/discuss.php?d=42266#p238417
Make sure that there are no extra lines at the end of config.php. It needs to end with just ?> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||