Moodle
  1. Moodle
  2. MDL-9683

Not able to add new user, instead I get "Incorrect sesskey submitted, form not accepted!"

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.8
    • Fix Version/s: None
    • Component/s: Installation
    • Labels:
      None
    • Rank:
      9079

      Description

      This bug has already been issued by someone but apparently it was not reproducible. What I can tell you was that installation failed to create a config.php file so I had to hand manipulate the config-dist php file. I followed it's adivce and created a moodleadmin folder and moved the admin components to that location when I first installed. When I found that files were being called for from the missing admin folder still, I simply replicated the folder and titled it again Admin. I don't know if this has anything to do with it or not.

        Issue Links

          Activity

          Hide
          Richard L. Enison added a comment -

          I'm having the same problem in my xampplite installation of Moodle 1.8.1 on my PC (as localhost, not accessible via public internet). I had been able to use Moodle okay until this morning. All of a sudden when I try to login as admin it comes back and tells me I'm not logged in. I tried using the forgot password button but it couldn't instantiate mail. Then I tried it again and got the Incorrect sesskey error. Finally, I tried to create a new user, and got that same error msg.

          Show
          Richard L. Enison added a comment - I'm having the same problem in my xampplite installation of Moodle 1.8.1 on my PC (as localhost, not accessible via public internet). I had been able to use Moodle okay until this morning. All of a sudden when I try to login as admin it comes back and tells me I'm not logged in. I tried using the forgot password button but it couldn't instantiate mail. Then I tried it again and got the Incorrect sesskey error. Finally, I tried to create a new user, and got that same error msg.
          Hide
          Justin Noel added a comment -

          I am now having the same problem. We migrated our moodle installation to our new server. Now, no one can login to the system. When I tried to reset passwords via the form, I get this same "Incorrect sesskey submitted, form not accepted!" problem.

          Has anyone found a solution?

          To make sure the issue was not with our php/mysql setup, I installed Moodle from scratch on this same machine. Everything works fine on it. However, when I revert back to the migrated copy of moodle, we are stuck with this problem.

          I've even manually reset the password in the database using md5. Still, we can't login.

          Richard, if you found a solution, please post it.

          Show
          Justin Noel added a comment - I am now having the same problem. We migrated our moodle installation to our new server. Now, no one can login to the system. When I tried to reset passwords via the form, I get this same "Incorrect sesskey submitted, form not accepted!" problem. Has anyone found a solution? To make sure the issue was not with our php/mysql setup, I installed Moodle from scratch on this same machine. Everything works fine on it. However, when I revert back to the migrated copy of moodle, we are stuck with this problem. I've even manually reset the password in the database using md5. Still, we can't login. Richard, if you found a solution, please post it.
          Hide
          Geraldo Xexeo added a comment -

          I have the same problem.

          I migrate the database and no one can log anymore.

          However, I detected that the user logs, since it appear as "on line users - last 5 minutes".

          It seems that this is a session problem, not a login problem.

          Show
          Geraldo Xexeo added a comment - I have the same problem. I migrate the database and no one can log anymore. However, I detected that the user logs, since it appear as "on line users - last 5 minutes". It seems that this is a session problem, not a login problem.
          Hide
          Geraldo Xexeo added a comment -

          I SOLVED MY PROBLEM!!!

          The problems was with permissions to write in the moodledata and moodledata/session directory.

          I changed from a private server to a web hosting service. The web server runs in a different group than the ownership of the directory. Had to change everything to 777.

          I hope it helps you.

          Jerry

          Show
          Geraldo Xexeo added a comment - I SOLVED MY PROBLEM!!! The problems was with permissions to write in the moodledata and moodledata/session directory. I changed from a private server to a web hosting service. The web server runs in a different group than the ownership of the directory. Had to change everything to 777. I hope it helps you. Jerry
          Hide
          Richard L. Enison added a comment - - edited

          I tried GX's solution of changing moodledata permissions. Since my system is Win XP, the only thing I could think of doing was to move it to the Shared Documents folder (whose full pathname is
          C:\Documents and Settings\All Users\Shared Documents\moodledata) and changing dataroot in config.php accordingly. This made things worse. Now when I go to localhost, I get a warning that lib\setuplib.php doesn't exist (it does so!) and 2 errors saying I need to create moodledata with webserver write acces (I didn't get either msg. before). Then it paints my Moodle home page under those msgs.

          Also, I don't know when this started, but even before making this move, the thumbnail graphic of the admin user on the page is showing (in IE7) as a red X. The property is http://localhost/user/pix.php/2/f2.jpg, which of course refers to moodledata/2/f2.jpg, which also exists.

          Show
          Richard L. Enison added a comment - - edited I tried GX's solution of changing moodledata permissions. Since my system is Win XP, the only thing I could think of doing was to move it to the Shared Documents folder (whose full pathname is C:\Documents and Settings\All Users\Shared Documents\moodledata) and changing dataroot in config.php accordingly. This made things worse. Now when I go to localhost, I get a warning that lib\setuplib.php doesn't exist (it does so!) and 2 errors saying I need to create moodledata with webserver write acces (I didn't get either msg. before). Then it paints my Moodle home page under those msgs. Also, I don't know when this started, but even before making this move, the thumbnail graphic of the admin user on the page is showing (in IE7) as a red X. The property is http://localhost/user/pix.php/2/f2.jpg , which of course refers to moodledata/2/f2.jpg, which also exists.
          Hide
          Richard L. Enison added a comment - - edited

          I linked this to MDL-9298. That's the one that was "not reproducible". Well, there are at least 4 of us who have reproduced it! If the developer can't reproduce the problem, give us a hint as to how to debug it on our system, because we don't have a problem reproducing it. I, for one, have been a programmer for many years. I just need to know how the blasted thing is supposed to work. I've been searching the developer docs at moodle.org, hadn't found anything on login until this morning (8/1/07): Authentication API.

          Am studying that area of the docs now. It is somewhat disheartening that the first thing it says is that the page is incomplete! But I'll try to make do ...

          Show
          Richard L. Enison added a comment - - edited I linked this to MDL-9298 . That's the one that was "not reproducible". Well, there are at least 4 of us who have reproduced it! If the developer can't reproduce the problem, give us a hint as to how to debug it on our system, because we don't have a problem reproducing it. I, for one, have been a programmer for many years. I just need to know how the blasted thing is supposed to work. I've been searching the developer docs at moodle.org, hadn't found anything on login until this morning (8/1/07): Authentication API. Am studying that area of the docs now. It is somewhat disheartening that the first thing it says is that the page is incomplete! But I'll try to make do ...
          Hide
          Richard L. Enison added a comment - - edited
          Show
          Richard L. Enison added a comment - - edited MDL-10416 is still open, and it describes the main problem I am having. Same error msg., slightly different context. Related problem: http://moodle.org/mod/forum/discuss.php?d=74111 also http://moodle.org/mod/forum/discuss.php?d=61203 , http://moodle.org/mod/forum/discuss.php?d=70522 , http://moodle.org/mod/forum/discuss.php?d=73716 , http://moodle.org/mod/forum/discuss.php?d=79609
          Hide
          Steffen Schwientek added a comment - - edited

          OK, I exprience an similar problem. I moved my moodle Installation from my laptop to my server. I could log in the first time succesfully.
          However, after I run the cron script, none of my users could log in anymore. If I try to email new passwords, I just get "Incorrect sesskey submitted, form not accepted!".

          I'm using moodle 1.8.2 on an lamp server.

          Show
          Steffen Schwientek added a comment - - edited OK, I exprience an similar problem. I moved my moodle Installation from my laptop to my server. I could log in the first time succesfully. However, after I run the cron script, none of my users could log in anymore. If I try to email new passwords, I just get "Incorrect sesskey submitted, form not accepted!". I'm using moodle 1.8.2 on an lamp server.
          Hide
          Steffen Schwientek added a comment -

          OK, I found an solution for my problem:
          After deleting all the session variables (sess_1.....) I could log in again.

          To verify if this problem is related to the cron job, I called the cron job again: But the problem didn't occurs again...

          Show
          Steffen Schwientek added a comment - OK, I found an solution for my problem: After deleting all the session variables (sess_1.....) I could log in again. To verify if this problem is related to the cron job, I called the cron job again: But the problem didn't occurs again...
          Hide
          Steffen Schwientek added a comment -

          The problem occurs again. I had to delete 94 session entries...
          Will disable the cronjob now, hope that this problem does't occur again.

          P.S. At my hosted server the session keys are stored outside of moodle

          Show
          Steffen Schwientek added a comment - The problem occurs again. I had to delete 94 session entries... Will disable the cronjob now, hope that this problem does't occur again. P.S. At my hosted server the session keys are stored outside of moodle
          Hide
          Richard L. Enison added a comment -

          I think my experience is somewhat similar to SS's, except that in my case it wasn't a cron job that triggered the problem. When I first commented on this issue I didn't know what caused my Moodle to suddenly malfunction, but thinking back on it I think what caused it to stop working was ... I edited the home page.

          Show
          Richard L. Enison added a comment - I think my experience is somewhat similar to SS's, except that in my case it wasn't a cron job that triggered the problem. When I first commented on this issue I didn't know what caused my Moodle to suddenly malfunction, but thinking back on it I think what caused it to stop working was ... I edited the home page.
          Hide
          David Blair added a comment -

          I just today ran into this problem and am just now getting around to looking for a solution. We bought a brand new Intel Mac Server and installed the latest Moodle on it. We upgraded the MAMP to the Pro version. Not sure if others are running the Pro or not? Anyway, I cannot get past this "Incorrect sesskey submitted. Form not accepted" error message. It is frustrating as I am REMOTE currently to my server and seemingly have not way to test various options as mentioned here. I would appreciate any input on what might be my most expedient route to solution.
          TIA... Dave Blair
          Green Valley Area Education Agency 14
          Creston, Iowa 641-782-8443
          dblair@aea14.k12.ia.us

          Show
          David Blair added a comment - I just today ran into this problem and am just now getting around to looking for a solution. We bought a brand new Intel Mac Server and installed the latest Moodle on it. We upgraded the MAMP to the Pro version. Not sure if others are running the Pro or not? Anyway, I cannot get past this "Incorrect sesskey submitted. Form not accepted" error message. It is frustrating as I am REMOTE currently to my server and seemingly have not way to test various options as mentioned here. I would appreciate any input on what might be my most expedient route to solution. TIA... Dave Blair Green Valley Area Education Agency 14 Creston, Iowa 641-782-8443 dblair@aea14.k12.ia.us
          Hide
          Richard L. Enison added a comment - - edited

          By my count there are now at least 14 of us, including one who sent me a Moodle message, who are waiting for a resolution to this and related problems. I am not waiting for that, I am just trying to get some cooperation from the development team so I can work on debugging it myself. I tried reading the developer docs and got nowhere; comments in the source code on this are virtually non-existent. All I ask is: how is the handling of sessions supposed to work, so I can more efficiently debug and find where it is not working the way it is supposed to. Commenting here and in the Installation Problems Forum has done no good. I realize MD is very busy, but does anyone know if there is some way to get the development team's attention short of paying for a support ticket at moodle.com???????????????????????????????????????????????????????????????????

          Show
          Richard L. Enison added a comment - - edited By my count there are now at least 14 of us, including one who sent me a Moodle message, who are waiting for a resolution to this and related problems. I am not waiting for that, I am just trying to get some cooperation from the development team so I can work on debugging it myself. I tried reading the developer docs and got nowhere; comments in the source code on this are virtually non-existent. All I ask is: how is the handling of sessions supposed to work, so I can more efficiently debug and find where it is not working the way it is supposed to. Commenting here and in the Installation Problems Forum has done no good. I realize MD is very busy, but does anyone know if there is some way to get the development team's attention short of paying for a support ticket at moodle.com???????????????????????????????????????????????????????????????????
          Hide
          Martin Dougiamas added a comment -

          Hiya,

          It's really not clear what the problem is here, or even if it's Moodle. Different people reporting this may have different causes.

          We can fix something quickly if you can make this a reproducible bug report. For that we need exact versions (preferably you should be using the very latest 1.8.x version to rule out bugs that were fixed already a long time ago) and your settings.

          I just did this in Moodle 1.8.2+ (latest CVS version) and 1.9:

          Admin > Users > Accounts > Add a new user

          Worked fine for me and always has.

          One thing you might want to check is that your setting for $CFG->wwwroot really is the main address as specified in Apache and not just an address that works. eg differences like www.site.com and site.com

          Also, if you have multiple Moodles running on one site then try changing the cookie prefix to make sure they don't clash.

          Show
          Martin Dougiamas added a comment - Hiya, It's really not clear what the problem is here, or even if it's Moodle. Different people reporting this may have different causes. We can fix something quickly if you can make this a reproducible bug report. For that we need exact versions (preferably you should be using the very latest 1.8.x version to rule out bugs that were fixed already a long time ago) and your settings. I just did this in Moodle 1.8.2+ (latest CVS version) and 1.9: Admin > Users > Accounts > Add a new user Worked fine for me and always has. One thing you might want to check is that your setting for $CFG->wwwroot really is the main address as specified in Apache and not just an address that works. eg differences like www.site.com and site.com Also, if you have multiple Moodles running on one site then try changing the cookie prefix to make sure they don't clash.
          Hide
          Martin Dougiamas added a comment -

          And if you're desperate, add this to your config.php to disable sesskey checking altogether:

          $CFG->ignoresesskey = true;

          Note that this may leave you open to some types of security attacks.

          Show
          Martin Dougiamas added a comment - And if you're desperate, add this to your config.php to disable sesskey checking altogether: $CFG->ignoresesskey = true; Note that this may leave you open to some types of security attacks.
          Hide
          Richard L. Enison added a comment - - edited

          MD,

          Thank you for finally getting to this extremely hairy problem. I realize you are very busy, what with 500 e-mails a day. Which is why I have always referred to trying to get the attention of the development team, rather than you personally. OK, here goes:

          1. Just speaking for myself, this particular issue is not my main problem. I'm sure it is for some of the others who have commented here. Please see my earlier comments, especially the ones of July 31, for more details on my main problem.

          2. Again, as I said in earlier comments, all I ask is more info on how the session-handling and logging-in (manual authentication) scripts are supposed to work, so I can debug it myself, since the development team is unable to reproduce the problem. I have tried being modest, but I'm getting too desperate to avoid saying that people who know me can tell you I am pretty good at debugging. The developer docs and code comments are virtually non-existent on this subject. I'm talking about the meaning and purpose of specific functions, arguments, classes, variables, objects/arrays and their components, etc. and how they work together to get the job done. If I knew exactly what was supposed to happen when a user logs in, I could track where it is failing to do that.

          3. As for the version, I have found that the version numbers in Moodle are meaningless. I mean, I have seen major changes in the source code happen while the version number (like 1.8.1), date (Feb. 15, 07) and time, and internal code (2007021510) remain unchanged. But for what it's worth, those are the version data in version.php in my copy of Moodle, top folder, although the data in index.php is:
          1.184.2.5 2007/03/19 04:15:06 nicolasconnault

          4. As I've said in my first comment, my Moodle is XAMPPlite on my PC at home. It is not on the internet (although I have DSL so I'm always connected and theoretically exposed to hackers, but I have McAfee firewall). My wwwroot is http://localhost, op. sys. is MS Win XP version 5.1.2600, MySQL server version is 5.0.27-community-nt, Apache version is "Apache/2.2.3 (Win32) mod_ssl/2.2.3 OpenSSL/0.9.8d mod_autoindex_color PHP/5.2.0 " according to phpinfo.php. I don't have multiple Moodles running.

          5. I already have $CFG->ignoresesskey = 1; in config.php. I also have $CFG->slasharguments=1;
          $CFG->auth = 'none'; $CFG->debugdisplay=1; $CFG->debug=2047; and have tried $CFG->dbsessions=1; At this point the last one is no longer there and I don't remember any more why I removed it. It must have made things worse. I added auth='none' after I started getting the problem, but it doesn't seem to have any effect on it.

          6. I just tried running Moodle for the first time since removing all the session files and database table rows. For starters, I get

          "Warning: Cannot modify header information - headers already sent by (output started at C:\down\SourceView\Moodle\Moodle18\lib\moodlelib.php:6939) in C:\down\SourceView\Moodle\Moodle18\lib\setup.php on line 495

          Warning: Cannot modify header information - headers already sent by (output started at C:\down\SourceView\Moodle\Moodle18\lib\moodlelib.php:6939) in C:\down\SourceView\Moodle\Moodle18\lib\moodlelib.php on line 2319

          Warning: Cannot modify header information - headers already sent by (output started at C:\down\SourceView\Moodle\Moodle18\lib\moodlelib.php:6939) in C:\down\SourceView\Moodle\Moodle18\lib\moodlelib.php on line 2320"

          at the top of each page, but I can probably debug that myself. When I clicked the Login as guest button, I get the famous "Unfortunately, cookies are currently not enabled in your browser" msg., which is not true.

          7. I think that's enough for now!

          RLE

          Show
          Richard L. Enison added a comment - - edited MD, Thank you for finally getting to this extremely hairy problem. I realize you are very busy, what with 500 e-mails a day. Which is why I have always referred to trying to get the attention of the development team, rather than you personally. OK, here goes: 1. Just speaking for myself, this particular issue is not my main problem. I'm sure it is for some of the others who have commented here. Please see my earlier comments, especially the ones of July 31, for more details on my main problem. 2. Again, as I said in earlier comments, all I ask is more info on how the session-handling and logging-in (manual authentication) scripts are supposed to work, so I can debug it myself, since the development team is unable to reproduce the problem. I have tried being modest, but I'm getting too desperate to avoid saying that people who know me can tell you I am pretty good at debugging. The developer docs and code comments are virtually non-existent on this subject. I'm talking about the meaning and purpose of specific functions, arguments, classes, variables, objects/arrays and their components, etc. and how they work together to get the job done. If I knew exactly what was supposed to happen when a user logs in, I could track where it is failing to do that. 3. As for the version, I have found that the version numbers in Moodle are meaningless. I mean, I have seen major changes in the source code happen while the version number (like 1.8.1), date (Feb. 15, 07) and time, and internal code (2007021510) remain unchanged. But for what it's worth, those are the version data in version.php in my copy of Moodle, top folder, although the data in index.php is: 1.184.2.5 2007/03/19 04:15:06 nicolasconnault 4. As I've said in my first comment, my Moodle is XAMPPlite on my PC at home. It is not on the internet (although I have DSL so I'm always connected and theoretically exposed to hackers, but I have McAfee firewall). My wwwroot is http://localhost , op. sys. is MS Win XP version 5.1.2600, MySQL server version is 5.0.27-community-nt, Apache version is "Apache/2.2.3 (Win32) mod_ssl/2.2.3 OpenSSL/0.9.8d mod_autoindex_color PHP/5.2.0 " according to phpinfo.php. I don't have multiple Moodles running. 5. I already have $CFG->ignoresesskey = 1; in config.php. I also have $CFG->slasharguments=1; $CFG->auth = 'none'; $CFG->debugdisplay=1; $CFG->debug=2047; and have tried $CFG->dbsessions=1; At this point the last one is no longer there and I don't remember any more why I removed it. It must have made things worse. I added auth='none' after I started getting the problem, but it doesn't seem to have any effect on it. 6. I just tried running Moodle for the first time since removing all the session files and database table rows. For starters, I get "Warning: Cannot modify header information - headers already sent by (output started at C:\down\SourceView\Moodle\Moodle18\lib\moodlelib.php:6939) in C:\down\SourceView\Moodle\Moodle18\lib\setup.php on line 495 Warning: Cannot modify header information - headers already sent by (output started at C:\down\SourceView\Moodle\Moodle18\lib\moodlelib.php:6939) in C:\down\SourceView\Moodle\Moodle18\lib\moodlelib.php on line 2319 Warning: Cannot modify header information - headers already sent by (output started at C:\down\SourceView\Moodle\Moodle18\lib\moodlelib.php:6939) in C:\down\SourceView\Moodle\Moodle18\lib\moodlelib.php on line 2320" at the top of each page, but I can probably debug that myself. When I clicked the Login as guest button, I get the famous "Unfortunately, cookies are currently not enabled in your browser" msg., which is not true. 7. I think that's enough for now! RLE
          Hide
          Martin Dougiamas added a comment -

          Something very unusual is going on there. Recognise that there are a fewcomponents all working together to make this work ... Apache, PHP, Moodle, WIndows and your browser.

          Humour me and get the latest 1.8.2+ daily version and replace all the scripts you currently have.

          Try it all with defaults and see how it works. Turn off debugging too (Admin > Server > Debugging)

          If it still fails, then try:

          • setting $CFG->wwwroot to "http://127.0.0.1"
          • accessing your site that way: http://127.0.0.1
          Show
          Martin Dougiamas added a comment - Something very unusual is going on there. Recognise that there are a fewcomponents all working together to make this work ... Apache, PHP, Moodle, WIndows and your browser. Humour me and get the latest 1.8.2+ daily version and replace all the scripts you currently have. Try it all with defaults and see how it works. Turn off debugging too (Admin > Server > Debugging) If it still fails, then try: setting $CFG->wwwroot to "http://127.0.0.1" accessing your site that way: http://127.0.0.1
          Hide
          Richard L. Enison added a comment -

          MD,

          OK, I will try those things. But the components you named (except the Microsoft ones, which came with my computer) all came together in the Windows distribution of Moodle that I downloaded and installed back in June. Everything was going fine until this problem occurred in July, probably after I started editing my home page. It has taken all these months to get a response from a developer, so by now the components are out of date. Hopefully that won't happen again before this issue is resolved.

          RLE

          Show
          Richard L. Enison added a comment - MD, OK, I will try those things. But the components you named (except the Microsoft ones, which came with my computer) all came together in the Windows distribution of Moodle that I downloaded and installed back in June. Everything was going fine until this problem occurred in July, probably after I started editing my home page. It has taken all these months to get a response from a developer, so by now the components are out of date. Hopefully that won't happen again before this issue is resolved. RLE
          Hide
          Richard L. Enison added a comment - - edited

          Well, I have downloaded and installed the latest XAMPPlite distro of Moodle 1.8.2, turned off display of debug msgs., logged out, logged in as guest, and logged in as Admin successfully. So far so good. But then I haven't really edited anything yet.

          I don't know whether this means the bugs I had been encountering have been fixed, or whether all the other Moodlers who have been having these problems can solve them that easily. We'll see. [EDIT: That was not intended to be an insult about other Moodlers' ability to download and install s/w. I was referring to the fact that different installations of the same s/w can exhibit the same symptoms for different reasons, as I recently had to explain to another poster on a Moodle forum.]

          Show
          Richard L. Enison added a comment - - edited Well, I have downloaded and installed the latest XAMPPlite distro of Moodle 1.8.2, turned off display of debug msgs., logged out, logged in as guest, and logged in as Admin successfully. So far so good. But then I haven't really edited anything yet. I don't know whether this means the bugs I had been encountering have been fixed, or whether all the other Moodlers who have been having these problems can solve them that easily. We'll see. [EDIT: That was not intended to be an insult about other Moodlers' ability to download and install s/w. I was referring to the fact that different installations of the same s/w can exhibit the same symptoms for different reasons, as I recently had to explain to another poster on a Moodle forum.]
          Hide
          Steffen Schwientek added a comment - - edited

          The problem still exists here. If there are enough session keys in the session key folder, no user can log in any more. I have to delete all session keys using ftp. But it's only an temporarily solution, the problem occurs fast, if there are some users who want to access the site...

          The problem worse later, since the user can't go in any course later, not even as guest user!

          Since I have some people want to access my site now, I set

          $CFG->ignoresesskey = true; for now

          Show
          Steffen Schwientek added a comment - - edited The problem still exists here. If there are enough session keys in the session key folder, no user can log in any more. I have to delete all session keys using ftp. But it's only an temporarily solution, the problem occurs fast, if there are some users who want to access the site... The problem worse later, since the user can't go in any course later, not even as guest user! Since I have some people want to access my site now, I set $CFG->ignoresesskey = true; for now
          Hide
          Steffen Schwientek added a comment - - edited

          Setting $CFG->ignoresesskey = true; doesn't help. After a while, no user can log in any more. The only solution is to delete all session files.

          Since my moodle installation is above the disk quota of my provider, the problem is perhaps related to that. If I transfer the site to my laptop again, the problem don't occurs.
          Will ask my provider to higher the quoata... (Bu

          Show
          Steffen Schwientek added a comment - - edited Setting $CFG->ignoresesskey = true; doesn't help. After a while, no user can log in any more. The only solution is to delete all session files. Since my moodle installation is above the disk quota of my provider, the problem is perhaps related to that. If I transfer the site to my laptop again, the problem don't occurs. Will ask my provider to higher the quoata... (Bu
          Hide
          Dan Marsden added a comment -

          Hi Steffen - you've hit the nail on the head there.

          if you run out of disk space - the moodle session files won't be able to be created. - you will need to either free some space up on your server, or request that your Host increases your allowance.

          Richard - it looks like your issues have been solved now, and so it seems have Steffen's - great!

          Justin, David, and John likely have similar issues - if they are fine, this job can possibly be closed off?

          1 - make sure you have the most updated moodle code.

          2- check permissions are set correctly for moodledata.

          3- make sure you have enough disk space.

          John - as the creator of this Bug report - have you managed to resolve your issues? - can this bug report be closed?

          thanks!

          Dan

          Show
          Dan Marsden added a comment - Hi Steffen - you've hit the nail on the head there. if you run out of disk space - the moodle session files won't be able to be created. - you will need to either free some space up on your server, or request that your Host increases your allowance. Richard - it looks like your issues have been solved now, and so it seems have Steffen's - great! Justin, David, and John likely have similar issues - if they are fine, this job can possibly be closed off? 1 - make sure you have the most updated moodle code. 2- check permissions are set correctly for moodledata. 3- make sure you have enough disk space. John - as the creator of this Bug report - have you managed to resolve your issues? - can this bug report be closed? thanks! Dan
          Hide
          Richard L. Enison added a comment -

          DM,

          At this point I am not in a position to answer that question one way or the other. Since I re-installed Moodle, I have been tied up with legal and financial issues and accosting Moodlers who post problems on forums but refuse to give complete info, and I haven't done anything with my Moodle installation yet. Anyway my main issue was MDL-10416.

          RLE

          Show
          Richard L. Enison added a comment - DM, At this point I am not in a position to answer that question one way or the other. Since I re-installed Moodle, I have been tied up with legal and financial issues and accosting Moodlers who post problems on forums but refuse to give complete info, and I haven't done anything with my Moodle installation yet. Anyway my main issue was MDL-10416 . RLE
          Hide
          John Trest added a comment -

          Hello.
          We had to switch to using a webhost to install moodle on our website instead of locally on our in-house server (which was the installation that had the above issue). That installation is fine and we haven't had the issue occur there. It will be some time before another attempt is made on the local machine. However, we will certainly follow the above guidelines to try to avoid the issue. So, we have no reason to keep the bug report open. Thank you! - John

          Show
          John Trest added a comment - Hello. We had to switch to using a webhost to install moodle on our website instead of locally on our in-house server (which was the installation that had the above issue). That installation is fine and we haven't had the issue occur there. It will be some time before another attempt is made on the local machine. However, we will certainly follow the above guidelines to try to avoid the issue. So, we have no reason to keep the bug report open. Thank you! - John
          Hide
          Petr Škoda added a comment -

          1/ All those problems "after migration" are most probably incorrect permissions in moodledata folder.
          2/ sudden "can not login" are very often caused by full disk (or quota)
          3/ incorrect sesskey on user signup or can not login for some users only is most probably client-side cookie problem (firewall, browser settings, etc.)

          We can not fix these problems, the only thing we could do is to add more diagnostic code and give admins some hints. The only problem is how to find out all these troubles without major performance problems and regressions.

          Show
          Petr Škoda added a comment - 1/ All those problems "after migration" are most probably incorrect permissions in moodledata folder. 2/ sudden "can not login" are very often caused by full disk (or quota) 3/ incorrect sesskey on user signup or can not login for some users only is most probably client-side cookie problem (firewall, browser settings, etc.) We can not fix these problems, the only thing we could do is to add more diagnostic code and give admins some hints. The only problem is how to find out all these troubles without major performance problems and regressions.
          Hide
          Richard L. Enison added a comment - - edited

          PS,

          We are not asking you to solve the problems you named because they are not the problem, at least in my case (I can only speak for myself). And my problem was with a new installation, not after migration. EDIT: And I'm not using cron yet.

          1. While a large percentage of my hard disk is used, I still have 3.32 GB free.
          2. As you know, my Moodle installation is XAMPPlite, which automatically sets all the folder permissions, and I testify to you that I have not changed them.
          3. Okay, I do have McAffee firewall, and Windows XP comes with its own, but I believe it is disabled in favor of McAffee, and I have found that cookies work just fine on my system. I mean hey, it has no problem remembering my username when I log into moodle.org. They are enabled in my browser along with popups. Are there any other browser settings you would like to know about? I've got pages of them!

          Now here's the latest. After I installed Moodle 1.8.2 on my PC October 12, it seemed to work okay. But just today, I tried to log in as admin and it rejected my password. After I made sure the encrypted (md5) password in mdl_user was correct, I clicked on the Forgot my password button. After some low comedy (I won't bore you with the details) I got that to work and I received the e-mail with my new password, which I also confirmed. Then I tried logging in with that. Same result: invalid login.

          Well I can debug that up to a point. With your help I can get a little further. But after llinking this issue with MDL-10416 and spending almost three months commenting on this issue offering to do as much debugging as you want me to, with your assistance, to see the other issue marked Resolved with the resolution being Cannot be reproduced! That's outrageous. Because although I installed the latest Moodle at MD's request October 12, the old Moodle is still on my computer so I have no problem reproducing it. And now, as I said before, I have a related login problem with the new Moodle.

          RLE

          EDIT: P.S. OK. I apologize for doing what I have chided other Moodlers for doing on the Installation Problem Forum: expecting others to read my mind. I should have mentioned that I still have the old Moodle on my PC. But still; three months between July 6 and October 12...
          Anyway, I am continuing my debugging efforts. It would go faster with better developer docs, but I'm continuing anyway.

          Show
          Richard L. Enison added a comment - - edited PS, We are not asking you to solve the problems you named because they are not the problem, at least in my case (I can only speak for myself). And my problem was with a new installation, not after migration. EDIT: And I'm not using cron yet. 1. While a large percentage of my hard disk is used, I still have 3.32 GB free. 2. As you know, my Moodle installation is XAMPPlite, which automatically sets all the folder permissions, and I testify to you that I have not changed them. 3. Okay, I do have McAffee firewall, and Windows XP comes with its own, but I believe it is disabled in favor of McAffee, and I have found that cookies work just fine on my system. I mean hey, it has no problem remembering my username when I log into moodle.org. They are enabled in my browser along with popups. Are there any other browser settings you would like to know about? I've got pages of them! Now here's the latest. After I installed Moodle 1.8.2 on my PC October 12, it seemed to work okay. But just today, I tried to log in as admin and it rejected my password. After I made sure the encrypted (md5) password in mdl_user was correct, I clicked on the Forgot my password button. After some low comedy (I won't bore you with the details) I got that to work and I received the e-mail with my new password, which I also confirmed. Then I tried logging in with that. Same result: invalid login. Well I can debug that up to a point. With your help I can get a little further. But after llinking this issue with MDL-10416 and spending almost three months commenting on this issue offering to do as much debugging as you want me to, with your assistance, to see the other issue marked Resolved with the resolution being Cannot be reproduced! That's outrageous. Because although I installed the latest Moodle at MD's request October 12, the old Moodle is still on my computer so I have no problem reproducing it. And now, as I said before, I have a related login problem with the new Moodle. RLE EDIT: P.S. OK. I apologize for doing what I have chided other Moodlers for doing on the Installation Problem Forum: expecting others to read my mind. I should have mentioned that I still have the old Moodle on my PC. But still; three months between July 6 and October 12... Anyway, I am continuing my debugging efforts. It would go faster with better developer docs, but I'm continuing anyway.
          Hide
          Richard L. Enison added a comment -

          Whoever is still interested anymore,

          1. I have made much progress in studying the source code. I understand how Moodle handles sessions, cookies, language packs, etc. much better, but not completely.
          2. I was able to get past the Invalid login error by running an UPDATE query that changed the auth field for the admin record from none to manual. I had set it to none months ago in the vain hope that it would bypass the need to login at all, but it didn't work. I still think it should have worked, and I don't know why it didn't.
          3. I think I understand why so many people (including me!) have been getting the dreaded (and false) Cookies are not enabled in your browser msg. The code that triggers that msg. is bizarre. I'm surprised it doesn't happen more often. Those of you who have been, like me, afflicted by the programmer bacteria, go to http://xref.moodle.org/nav.html?index.html, select login/index.php, and scroll to lines 113 to 115, and you will see what I mean. The first term in the if statement will be true if the user has not chosen to enable cookieless sessions; the second term will just about always be true, because it is hard-coded into login/index_form.html; and the third term will be true if the user is logged in as guest, or has never logged in (I'm guessing on that last part), in which case the not-enabled msg. should be triggered. More on this as I study more of the code. Because the developer docs are so incomplete.

          RLE

          Show
          Richard L. Enison added a comment - Whoever is still interested anymore, 1. I have made much progress in studying the source code. I understand how Moodle handles sessions, cookies, language packs, etc. much better, but not completely. 2. I was able to get past the Invalid login error by running an UPDATE query that changed the auth field for the admin record from none to manual. I had set it to none months ago in the vain hope that it would bypass the need to login at all, but it didn't work. I still think it should have worked, and I don't know why it didn't. 3. I think I understand why so many people (including me!) have been getting the dreaded (and false) Cookies are not enabled in your browser msg. The code that triggers that msg. is bizarre. I'm surprised it doesn't happen more often. Those of you who have been, like me, afflicted by the programmer bacteria, go to http://xref.moodle.org/nav.html?index.html , select login/index.php, and scroll to lines 113 to 115, and you will see what I mean. The first term in the if statement will be true if the user has not chosen to enable cookieless sessions; the second term will just about always be true, because it is hard-coded into login/index_form.html; and the third term will be true if the user is logged in as guest, or has never logged in (I'm guessing on that last part), in which case the not-enabled msg. should be triggered. More on this as I study more of the code. Because the developer docs are so incomplete. RLE
          Hide
          ali mohammed added a comment -

          This happened to me when I manually migrated the database and the source code files to a new server. I eventually found out no sessions were being created under the "sessions" directory (under moodledata). Had to chmod moodledata directory to get fix it and its all back up and running as it was before.

          Show
          ali mohammed added a comment - This happened to me when I manually migrated the database and the source code files to a new server. I eventually found out no sessions were being created under the "sessions" directory (under moodledata). Had to chmod moodledata directory to get fix it and its all back up and running as it was before.
          Hide
          Dan Leighton added a comment -

          I had this issue.

          I contacted my hosting sysadmins letting them know that I could resolve this error by chmoding the session directory to 777 but that this was not something I was happy with and could they find a solution.

          They wrote back to say that:

          "You are right, 777 permissions are undesirable and insecure - and our servers don't need them as they run iPHPSuExec (755 should be the maximum permissions for directories and 644 for files). There was an issue earlier with PHP runnng as a module and as a CGI earlier which I've corrected on this server."

          Now they have corrected the PHP running as module and CGI issue, I have re-chmodded the session directory to 755 and it works just fine.

          I hope this info is of help in tracking down this issue.

          d.

          Show
          Dan Leighton added a comment - I had this issue. I contacted my hosting sysadmins letting them know that I could resolve this error by chmoding the session directory to 777 but that this was not something I was happy with and could they find a solution. They wrote back to say that: "You are right, 777 permissions are undesirable and insecure - and our servers don't need them as they run iPHPSuExec (755 should be the maximum permissions for directories and 644 for files). There was an issue earlier with PHP runnng as a module and as a CGI earlier which I've corrected on this server." Now they have corrected the PHP running as module and CGI issue, I have re-chmodded the session directory to 755 and it works just fine. I hope this info is of help in tracking down this issue. d.
          Hide
          Andy Braden added a comment -

          Martin,
          I do have a way to reproduce this error message using the create new account.
          Make a visit to the login page with cookies blocked and click on "Create a New Account"
          you are passed to the account creation page, and upon submission you will
          get the "Incorrect sesskey submitted, form not accepted!" message.

          This may or may not be the source of problems for the other reporters of this error message, but it is consistently reproducible using v1.8.3

          It seems to me that this particular version would merit a fix, as the error message, while completely accurate, is not very informative to the user attempting to create an account. I would propose that the link from the login page to Create a New Account should trigger a cookie check just as the login and login as guest do, thus avoiding the issue entirely. It would just warn the user that cookies need to be enabled to proceed. I think that this would keep a clean consistent flow to the user experience as well.

          Thanks,
          Andy Braden
          Moodlerooms

          Show
          Andy Braden added a comment - Martin, I do have a way to reproduce this error message using the create new account. Make a visit to the login page with cookies blocked and click on "Create a New Account" you are passed to the account creation page, and upon submission you will get the "Incorrect sesskey submitted, form not accepted!" message. This may or may not be the source of problems for the other reporters of this error message, but it is consistently reproducible using v1.8.3 It seems to me that this particular version would merit a fix, as the error message, while completely accurate, is not very informative to the user attempting to create an account. I would propose that the link from the login page to Create a New Account should trigger a cookie check just as the login and login as guest do, thus avoiding the issue entirely. It would just warn the user that cookies need to be enabled to proceed. I think that this would keep a clean consistent flow to the user experience as well. Thanks, Andy Braden Moodlerooms
          Hide
          Richard L. Enison added a comment -

          To whom it may concern,

          I have not had this problem since I installed 1.8.3. I have not done much with it, but I have used it some. I still would like to know what was causing the problem with my installation of 1.8.2. I did not block cookies and my session directory was writable. Session files were there, and deleting them did not help. At least once I got the false msg. that cookies were not enabled.used

          RLE

          Show
          Richard L. Enison added a comment - To whom it may concern, I have not had this problem since I installed 1.8.3. I have not done much with it, but I have used it some. I still would like to know what was causing the problem with my installation of 1.8.2. I did not block cookies and my session directory was writable. Session files were there, and deleting them did not help. At least once I got the false msg. that cookies were not enabled.used RLE
          Hide
          Richard L. Enison added a comment -

          To the webmaster of tracker.moodleorg,

          The extra occurrence of "used" at the end of my previous comment was the result of a problem with your web page and/or my browser (FireFox). I tried to edit it but THERE IS NO EDIT LINK!!!!! What happened to it???????

          RLE

          Show
          Richard L. Enison added a comment - To the webmaster of tracker.moodleorg, The extra occurrence of "used" at the end of my previous comment was the result of a problem with your web page and/or my browser (FireFox). I tried to edit it but THERE IS NO EDIT LINK!!!!! What happened to it??????? RLE
          Hide
          Petr Škoda added a comment -

          Moodle requires cookies, I am afraid it can not be changed. The should be some text with this info on a sign up page though.

          Show
          Petr Škoda added a comment - Moodle requires cookies, I am afraid it can not be changed. The should be some text with this info on a sign up page though.
          Hide
          Richard L. Enison added a comment -

          PS,

          The problem is not that Moodle requires cookies. The problem is that it so often complains that cookies are not enabled when in fact they are.

          RLE

          Show
          Richard L. Enison added a comment - PS, The problem is not that Moodle requires cookies. The problem is that it so often complains that cookies are not enabled when in fact they are. RLE
          Hide
          Richard L. Enison added a comment -

          PS,

          Now that I took another look at AB's recent comment, I see why you said Moodle requires cookies. So I wanted to edit or delete my last comment but the EDI and DELETE links are still missing!!!

          RLE

          Show
          Richard L. Enison added a comment - PS, Now that I took another look at AB's recent comment, I see why you said Moodle requires cookies. So I wanted to edit or delete my last comment but the EDI and DELETE links are still missing!!! RLE
          Hide
          Rashan Anushka added a comment -

          hi,
          I came up with the same issue (cannot login and getting the session cookie error) after I moved one of my installation to a different place. I could solved the problem by correcting file permission settings and by updating the config.php file with new locations. i.e. I think this error occurred when moodle cannot write session data.

          Show
          Rashan Anushka added a comment - hi, I came up with the same issue (cannot login and getting the session cookie error) after I moved one of my installation to a different place. I could solved the problem by correcting file permission settings and by updating the config.php file with new locations. i.e. I think this error occurred when moodle cannot write session data.
          Hide
          Richard L. Enison added a comment -

          RA,

          That may be what was causing the problem for you, and I'm happy for you that you were able to solve it. But I'm quite sure that it is not the only cause. In my case, for example, I'm sure that session files had been written.

          RLE

          Show
          Richard L. Enison added a comment - RA, That may be what was causing the problem for you, and I'm happy for you that you were able to solve it. But I'm quite sure that it is not the only cause. In my case, for example, I'm sure that session files had been written. RLE
          Hide
          David Willington added a comment -

          Hope I get this right - it's my first post to the tracker.

          I got the 'Incorrect sesskey submitted, form not accepted!' error when attempting email-based user registration on moodle 1.9.2, RHEL4, apache 2.0.52, php 4.3.9. It stopped suddenly having previously worked. Moodle seemed to be otherwise fine; users could be added manually and already registered users could login.

          The problem was that I'd changed session.auto_start to 1 in php.ini. Setting it back to zero solved the problem. Searching on the forums for a solution invariably pointed me to this page in the tracker.

          Show
          David Willington added a comment - Hope I get this right - it's my first post to the tracker. I got the 'Incorrect sesskey submitted, form not accepted!' error when attempting email-based user registration on moodle 1.9.2, RHEL4, apache 2.0.52, php 4.3.9. It stopped suddenly having previously worked. Moodle seemed to be otherwise fine; users could be added manually and already registered users could login. The problem was that I'd changed session.auto_start to 1 in php.ini. Setting it back to zero solved the problem. Searching on the forums for a solution invariably pointed me to this page in the tracker.
          Hide
          Petr Škoda added a comment -

          please note the sessions.autostart=0 requirement is documented at http://docs.moodle.org/en/Installing_Moodle#Software and also there is a warning on admin notification page.

          Show
          Petr Škoda added a comment - please note the sessions.autostart=0 requirement is documented at http://docs.moodle.org/en/Installing_Moodle#Software and also there is a warning on admin notification page.
          Hide
          Martin Dougiamas added a comment -

          I've added some information to the error page:

          http://docs.moodle.org/en/error/moodle/invalidsesskey

          Please extend with more details/reasons as necessary!

          Show
          Martin Dougiamas added a comment - I've added some information to the error page: http://docs.moodle.org/en/error/moodle/invalidsesskey Please extend with more details/reasons as necessary!
          Hide
          Martin Dougiamas added a comment -

          Passing to Petr to resolve if appropriate.

          Show
          Martin Dougiamas added a comment - Passing to Petr to resolve if appropriate.
          Hide
          Kevin Williams added a comment -

          My first Moodle Tracker Post !

          I think I solved this problem in my instance.

          Background
          While working on the server at home I likely left my admin login session hanging open on the on the Internet connection while in the meantime I temporarily swapped the $CFG->wwwroot to the localhost. (Don't ask thats another issue!)

          I detected this by using the local and Internet URL for the server and realized that the Internet URL only was loading up already logged in and furthermore it ignored my request to logout. In order to logout I reattempted to upload a batch user file (which is where I first received the message "Incorrect sesskey submitted, form not accepted!") - Moodle realized that I was not properly logged in and asked me to login again. Once I was properly logged in I could subsequently log out gracefully.

          This re-enabled me to login and logout gracefully but I was still receiving the "Incorrect sesskey submitted, form not accepted!" when I attempted to upload a batch user file. All of this work was completed on Internet Explorer and on a hunch that the browser was causing the issue I opened the new Google Chrome browser and sure enough I could successfully manipulate batch user files in this browser. With that information I went into Internet Explorer and cleared the Temporary Internet Files, Cookies and History and now Internet Explorer is functioning again with batch user files. In my case I suspect the suspended open login left Internet Explorer with a bad session key stored in the cookie.

          Show
          Kevin Williams added a comment - My first Moodle Tracker Post ! I think I solved this problem in my instance. Background While working on the server at home I likely left my admin login session hanging open on the on the Internet connection while in the meantime I temporarily swapped the $CFG->wwwroot to the localhost. (Don't ask thats another issue!) I detected this by using the local and Internet URL for the server and realized that the Internet URL only was loading up already logged in and furthermore it ignored my request to logout. In order to logout I reattempted to upload a batch user file (which is where I first received the message "Incorrect sesskey submitted, form not accepted!") - Moodle realized that I was not properly logged in and asked me to login again. Once I was properly logged in I could subsequently log out gracefully. This re-enabled me to login and logout gracefully but I was still receiving the "Incorrect sesskey submitted, form not accepted!" when I attempted to upload a batch user file. All of this work was completed on Internet Explorer and on a hunch that the browser was causing the issue I opened the new Google Chrome browser and sure enough I could successfully manipulate batch user files in this browser. With that information I went into Internet Explorer and cleared the Temporary Internet Files, Cookies and History and now Internet Explorer is functioning again with batch user files. In my case I suspect the suspended open login left Internet Explorer with a bad session key stored in the cookie.
          Hide
          Stuart Parker added a comment -

          This error message can be reproduced by changing the value of the mdl_config value sessioncookiepath to an incorrect value. eg. if you move to different server with a different root web directory and just copy the db across without updating this value you will see this message, or if you execute something like

          update mdl_config set value = 'blahblahblah' where name like 'sessioncookiepath';

          assuming your webroot does not have a directory called blahblahblah

          Maybe the http://docs.moodle.org/en/error/moodle/invalidsesskey page could have the following added

          'Your database has an incorrect value for sessioncookiepath in the mdl_config table'

          Show
          Stuart Parker added a comment - This error message can be reproduced by changing the value of the mdl_config value sessioncookiepath to an incorrect value. eg. if you move to different server with a different root web directory and just copy the db across without updating this value you will see this message, or if you execute something like update mdl_config set value = 'blahblahblah' where name like 'sessioncookiepath'; assuming your webroot does not have a directory called blahblahblah Maybe the http://docs.moodle.org/en/error/moodle/invalidsesskey page could have the following added 'Your database has an incorrect value for sessioncookiepath in the mdl_config table'
          Hide
          Stuart Parker added a comment -

          sorry - Just saw Martins request to do this in previous post so have added it to the help page

          Show
          Stuart Parker added a comment - sorry - Just saw Martins request to do this in previous post so have added it to the help page
          Hide
          Petr Škoda added a comment -

          Thanks everybody for cooperation, I am sure this is a configuration issue - usually session related.
          Please add more info into the linked page if needed.

          Petr

          Show
          Petr Škoda added a comment - Thanks everybody for cooperation, I am sure this is a configuration issue - usually session related. Please add more info into the linked page if needed. Petr

            People

            • Votes:
              5 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: