Installation help

 
 
Picture of Jerry Lorenz
moving Moodle 2.5.1 to another server cannot login
 

I upgraded my production server from moodle 2.2 to 2.5.1.  Everything went well.  I then did a backup of the database and the moodle install folder and copied it down to my local machine. So I can have a snapshot of everything locally. I have done this before with no problem just changing the database config in config.php.  The salts are intact as well. But I see that 2.5.1 generates salts for each user instead of using the site-wide salt.

I cannot login to my local version of 2.5.1 that was copied down. I attempted to change my password back to a md5 hash and still was not able to login. The password hash remains the same. Should I be able to copy the system down and run locally? Clearly I am missing something.

 
Average of ratings: -
Gmads
Re: moving Moodle 2.5.1 to another server cannot login
Group Particularly helpful MoodlersGroup Testers

Hi Jerry,

It sure sounds strange. You can obviously log in to you production installation. Have you tried copying the value from the password field (in mdl_user) from the production server database? If the config.php file is the same (except for the database info), Moodle should use the global salt for the last time for your account and then start using the automatically generated one. Have you tried logging in with other accounts?

 
Average of ratings: -
Picture of Jerry Lorenz
Re: moving Moodle 2.5.1 to another server cannot login
 

Thanks for the reply. I had not copied down the moodledata folder from the server because it is rather large. I was using an older copy of the moodledata folder.  I created a new cache folder and was able to login.

I would like to know how the new salt per person works. If some one can point me to where I might read about it. All the 2.5.1 documents that I read just tells me that the new version does it but not how. Does it store the salt per person in the database or in a file in moodledata. And why removing the cache fixed the problem. Just wanting to learn as much as I can to be a useful admin.

 

Thanks

 
Average of ratings: -
Gmads
Re: moving Moodle 2.5.1 to another server cannot login
Group Particularly helpful MoodlersGroup Testers

Hi Jerry,

Good to know that the problem was solved. Given how you solved it, I would guess that the problem was because info at the database regarding files at moodledata was out of synch.

The process, basically is the same, except that now a salt is generated for each user, the salt is saved in the database and a different algorithm is used to generate the password-salt hash.

 
Average of ratings: -