Cannot login, I get redirected to a testsession page

Cannot login, I get redirected to a testsession page

by chris vassilopoulos -
Number of replies: 7
Hi. Until yesterday afternoon we are able to login into our moodle installation. Suddenly after that time all login accounts wont work through http://novustesting.com/moodle/login/.  We haven't altered something in the code of the website. We are redirected to http://novustesting.com/moodle/login/index.php?testsession=2

This is very strange. Does anyone have a solution?


Average of ratings: -
In reply to chris vassilopoulos

Re: Cannot login, I get redirected to a testsession page

by chris vassilopoulos -

I am using moodle 2.5

In reply to chris vassilopoulos

Re: Cannot login, I get redirected to a testsession page

by Georgia Theodoropoulou -

I have the same problem. The moodle was working fine. I was logged in as admin, I made some changes to a moodle file and then I am trying to login and I can' t

In reply to Georgia Theodoropoulou

Re: Cannot login, I get redirected to a testsession page

by Ken Task -
Picture of Particularly helpful Moodlers

Might try this first .. purging caches without logging on:

http://yoursite/admin/purgecaches.php

If you have command line access ...

cd moodlecode/admin/cli/

php purge_caches.php

then see if you can login.

See the config-dist.php file for how to add debugging lines to config.php so Moodle can report what issues it sees/finds.  

Or, 'un-do' the dhanges you made to that 'moodle file' you edited ... ie, put it back the way it was.  It is highly recommended one NOT hack any php file/script in Moodle unless one knows what one is doing.  Rather, post a question in the forums here with whatever you are trying to do.   There might be an answer that does NOT require hacking of code.

'spirit of sharing', Ken

In reply to Ken Task

Re: Cannot login, I get redirected to a testsession page

by Georgia Theodoropoulou -
Actually I change a file so as to get an email that a user registered in my moodle. The problem is not at the code, I did received an e-mail. I purged the cache but no luck. I will try to debug. I read somewhere that if you are logged in and you change a file that happens but I did not found a solution for this. If this is the problem.

Anyway, thank you very much for your reply

In reply to Georgia Theodoropoulou

Re: Cannot login, I get redirected to a testsession page

by Georgia Theodoropoulou -
My problem solved. The web hosting company made an update to php 5.4 but my version of moodle supported only 5.3. Thank you very much for your answers. 
In reply to chris vassilopoulos

Re: Cannot login, I get redirected to a testsession page

by Danny Wahl -

Hello I have seen this happen when a user disables cookies in their browser, or blocks the Moodle cookie.

As a separate guess your cookie configuration for Moodle is broken check 'cookie path', 'cookie prefix', 'cookie domain', 'only http cookies', 'secure cookies only'.

In reply to chris vassilopoulos

Re: Cannot login, I get redirected to a testsession page

by Wilson Thomas -

Had multiple browser windows open during Moodle 2.5.2 tweaks/troubleshooting and was unable to login: same 'testsession=#' string in URL.  Cleared browser cache many times.  Long troubleshooting story short: I opened a different browser and got right in.  Thereafter, all windows in primary browser were closed (closing the browser), restarted it, and problem was gone.  Later, went back to second computer that had been used to test Moodle changes.  Earlier browser window was still open and it was exhibiting same 'testsession' problem.  Closed the browser, restarted it, and had no further problems.