Moodle installed with ip address instead of domain name

Moodle installed with ip address instead of domain name

by Chet Williams -
Number of replies: 3
Hi,
I have read a lot of posts and potential fixes to the problem of changing domain names or moving from an ip address to a fqdn. I have tried all; changing the $CFG->wwwroot variable in config.php file, masqurading entry in the config.php file, I even tried the http://yourdomain/admin/replace.php script but nothing has worked for me so far.
The replace script produces a lot of errors similar to this one:


(mysql): UPDATE mdl_adodb_logsql SET SQL0 = REPLACE(SQL0, '10.0.8.104', 'www.mydomain.com');
1146: Table 'moodle.mdl_adodb_logsql' doesn't exist
    

Error

The problem is not internal because everthing is linked to my internal ip so I have no problem with interanl access but when I open up moodle from the outside www.domainname.com it opens and shows the domain name correctly but all images and links are still tied to my internal ip address. Is the replace script or reinstallation the only options? By looking at the error message does someone know if I ran the script wrong? In case your wondering I backed up the server before running the script. Why does the error message state that the table doesn't exist. Everything works fine internally. Any ideas will be greatly appreciated.

Chet

Average of ratings: -
In reply to Chet Williams

Re: Moodle installed with ip address instead of domain name

by Chet Williams -
I am confused. The table doesn't exist. I logged into mysql database and ran a show tables on the moodle database but the mdl_adodb_logsql table doesn't exit. There is
a table adodb_logsql table but when I do a select all from this table it returns the empty set. Where is the old address, url stored in my setup? Any ideas?

Please help. I do not want to reinstall but will if I must.

Thank you
Chet
In reply to Chet Williams

Re: Moodle installed with ip address instead of domain name

by Mauno Korpelainen -

I have made replacements so that I take a .sql-file backup from a database and edit that backup-file with notepad: Find - replace and change all things to be changed. If you have phpMyAdmin or some other method to backup database this is simple.

Then I drop and replace tables (import from .sql-file)

In reply to Mauno Korpelainen

Re: Moodle installed with ip address instead of domain name

by Chet Williams -
Thank you. I have a question about the process though. Is there a list of what files would need to be changed? Also does the backup process involve changing file formats so that notepad can open them?