Can't login to localhost/moodle

Can't login to localhost/moodle

by mark Sepasi -
Number of replies: 5

Hi,

I returned to work on my localhost/moodle, version 3.1 after months of inactivity, and i can not login.

The error message i get is: "Unfortunately, cookies are currently not enabled in your browser".

As per Help(?) the cookies to enable are 'MoodleSession' and 'MOODLEID'.

I checked the Chrome setting: "privacy and security>content setting>cookies>See all cookies and site data>moodle.org" and here there is 'MoodleSession', but not 'MOODLEID'.

Also as per recommendation for similar problem, I have checked  'wamp64>www>moodle>config.php' to make sure there is not extra lines or spaces at the end of the file and i have added "?>" to the end of config.php which did not help me to login.


I appreciate your feedback as to what else i can do to login to my localhost.  


Attachment CantLoginJune8.PNG
Average of ratings: -
In reply to mark Sepasi

Re: Can't login to localhost/moodle

by Colin Fraser -
Picture of Documentation writers Picture of Testers

This, undoubtedly, is a "security feature" of the Xampp package. I haven't run into this one, but there are a number of others. I suggest that this is what I called the "Cliff", you want to jump off it. Basically you get an error like this, after a frustratingly unproductive search and an exasperating solution, within days, if not minutes, you get hit with another "undocumented feature". You go through the same process, and then another, and another and so on. There is a rolling set of errors preventing you from using your Moodle. I spent weeks following this nonsense, driving myself, and a number of people on Moodle Forums I suspect, crazy with this rolling calamity. Eventually, I gave up, uninstalling Xampp, as well as everything in the package from my desktop. Felt good, but I still needed a Moodle test bed. I learned how to install Apache, MySQL, PHP, and a number of other php apps, and haven't looked back since.

Recommend not using the Xampp installer.    

Average of ratings: Useful (1)
In reply to Colin Fraser

Re: Can't login to localhost/moodle

by mark Sepasi -

Hi Colin,

Thank you very much for taking your time and helping me.

You definitely know how frustrating the situation feels, and i have searched all Moodle/stackoverflow forums for a guidance with no luck.


As clearly "you've been there / done that", would you suggest me:

1-To uninstall wamp/moodle and re-install them? If yes, is there any way to save/salvage/transfer the lessons/quizzes/pictures that is created in the to-be-uninstalled version to the new install? 

2-Is it better to install the new wamp as a package or install Apache, MySql and PHP separately.?


Looking forward to your help before "jumping off the cliff".

Best regards/ Mark 

In reply to mark Sepasi

Re: Can't login to localhost/moodle

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Mark, first try different browsers.  If this happens across all browsers, it might not be a "cookies" issue.

#1 Yes, one is able to back up a current install of resources and reinstall them.  However, if you happen to have a database problem with your current install, the database restore might re-interject the same problem.  Individual courses are usually easy to reinstall.

#2 I prefer to install a package (WAMP, XAMPP, MAMP) because I don't know how to install Apache, MySQL, and PHP from scratch.

Average of ratings: Useful (1)
In reply to mark Sepasi

Re: Can't login to localhost/moodle

by ben reynolds -

Guys,
> "privacy and security>content setting>cookies>See all cookies and site data>moodle.org" 

Moodle.org is NOT the localhost site. Mark, you will be looking for localhost or 127.0.0.1 in your Chrome cookies. Moodle.org is this site for forums and such.

Mark, you want to go to Chrome settings > advanced > passwords and forms > and search for 127.0.0.1 and find your password. I can't tell you about "Autofill settings" because they are controlled by the fascists who own my company laptop.

Also check that stuff like https everywhere and Privacy Badger aren't blocking you. If you installed them, they appear to right of the location box.

In the location you name, all I've got is 

Local storage
Origin
http://localhost/
Size on disk
220 KB
Last modified
Wednesday, January 3, 2018 at 3:14:28 PM

Average of ratings: Useful (1)
In reply to ben reynolds

Re: Can't login to localhost/moodle

by Colin Fraser -
Picture of Documentation writers Picture of Testers

I can't vouch for other's experience with Xampp, e.g. Rick has maintained that it has generally been a positive experience, and more luck to him. All I know is that it became a nightmare so I dumped everything. I didn't know enough to save anything at that time, but I did have a set of backups of all the courses I had developed in my Xampp Moodle so restored them when I got everything working. There weren't any issues I recall, but I think that was due more to the Moodle backup/restore process and good luck rather than Xampp's use of PHP. I suggest that Xampp's limitations are not worth the effort of pursuing Xampp so would recommend installing Apache, MySQL, PHP, phpMyAdmin and Moodle. If you want, you can then install apps like Mahara, Wordpress, MediaWiki, a Podcast generator, a chat board and lots of other things, if you are interested. 

Also, please note: I used the WAMP for about four or five years with a minimum of fuss, used it pretty ruthlessly and broke Moodle a number of times testing stuff with code hacks mainly, but IANAD, so it was easy to make a mess of it. I then purchased a NAS, and while it hasn't been entirely trouble free motoring, I can do a lot more than I used to by using the server setup in the NAS. One of these days I might get around to transferring my web site to it, and set it up with external access, but not in any great hurry to do that. I couldn't do that with Xampp. 

BTW: I understand that the Xampp/Moodle was designed for the technically illiterate, like teachers smile, to easily install on their computers to have an accessible development tool. In this it easily fulfils that role. If you want to do nothing with your Moodle, just make courses, then it is probably the tool for you. If you want to learn to admin your Moodle... mmm probably not.  Good luck with whatever you decide. 

Average of ratings: Useful (1)