I have to move a moodle 1.7 site to a new server (Linux/apache etc) and new URL.
Problem; I've backed up the database but I can only use Cpanel to restore it. Cpanel insists on prepending the "new" database on the "new" server with the "new" site name. i.e. if the "old" database name was wwwolds__mdle1 then on the "new" server it is automatically named wwwnews_mdle1. I can't change the database name after restore ( no priviliges...but that I think could anyway be problematic, even dangerous, on a shared server) so where do I go to change the moodle set up to point to the new name database?
(I realise I'm going to have to change many paths in the database but fortunately it's quite small at present)
Any help appreciated and sorry if this has been covered elsewhere, I have looked....
Dave
$CFG->dbname = 'wwwmoan_mdle1' ;
$CFG->dbuser = 'wwwmoan_mdle1' ;
Also line: $CFG->dbpass = 'LOsjFfvLpuSh' ; i don't remember ever setting this: is it something that Moodle has done & in that case should I leave it as it is?
Aso line $CFG->prefix = 'mdl_' What does this mean?
Sorry to be a pain but I really don't know much about mysql
Dave
Change $CFG->dbname, $CFG->dbuser, and $CFG->dbpass to be the correct values for your new database. $CFG->prefix is a string that will be become a prefix of all the tables you create in the database. So for example, the 'question' table will be named mdl_question, etc.
I created a new database and populated it with the contents of the "original" database and used that as the moodle database as I just couldn't get the "original" to work: something to do with the password I'm sure.
I really thought I'd cracked it but now every time I try to log in the browser hangs and only comes up after half a minute to say that :
Your session has timed out. Please login again.
Is this is an error in the database do you think or where should I be looking?
Cheers
Dave
Why the original "back up" version doesn't work though is a bit of a mystery as I can't (quickly) see any difference between it and the "new" instance.
Thanks anyway, at least it's working now.
Cheers
Dave
I know it's too late to help but I too had this issue. My ISP moved my server without my knowledge and downed all my pages...Thanks...
Anyway. I too was getting the same error "Session expired" and looping back to the front page. I'd re-done all the config and it all appeared to work but I couldn't log in!
My solution was to delete all contents of moodledata (outside my webroot in my case) and let Moodle recreate it. It then sorted its own permissions out (777 for the moodledata folder IIRC) and recreated the folders (and htaccess too)
It did appear to be empty at first but a fresh FTP session and a few refreshes revealed old data. Deleted Cache and Sessions (both folders and the contents) and all was happy again!!
Hope this may help someone else as it's a bit late for you now!
Kind regards
Michael