problem getting config file correct

problem getting config file correct

by Stephanie D'Silva -
Number of replies: 14

Hi,

We recently got a domain name for our intranet so the students can use it from home, however, we're having trouble getting the homepage to load properly.

I've been changing the config file after reading the various topics which have same problems as me, however it doesnt work.

The site works perfect internally - pictures show and everything works.
As soon as I change the config file to have the domain name, internally and externally the pictures and theme goes missing, also can't login.

After looking at the properties of a picture that went missing, it the address of the picture has the location of the server then the domain name - hence why it can't find the pictures - the location doesnt exist!

In the config file, I've got the dbhost equalling the server moodle is on (with a private IP) [i think this is where the problem is...not too sure, that's why I'm asking you guys!] and I've set the wwwroot to the domain name.

I looked at the page about masquerading, but I have the same problem, unless someone can really dumb it down for me...
Do i change everything in the code? or just the subnet, and internal/external IPs?

Help is very much appreciated!

If more info is needed, please let me know!

Regards, Stephanie

Average of ratings: -
In reply to Stephanie D'Silva

Re: problem getting config file correct

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
This is the subject of the forum "Installation problems".
In reply to Visvanath Ratnaweera

Re: problem getting config file correct

by Stephanie D'Silva -
when i searched the forums, there were a few with similar problems to mine and they were in this topic, so i posted it here...besides, it could also be in the server section as there may be a problem with it or settings or something...???
In reply to Visvanath Ratnaweera

Re: problem getting config file correct

by Sharla Ogden -
I have the same problem. I changed the config.php file from a static ip to the DNS name. The webpages appear but the files attached are missing. How do I change the files to the DNS name as well on a OSX 10.5 Server? Is there a file like the config.php file that I can change?
In reply to Visvanath Ratnaweera

installation of moodle

by anguraj s -

sir pls teach me the installation of moodle and configuration in ubunthu10.10 desktop or server

pls call 8300181266

i need help pls

In reply to Visvanath Ratnaweera

moodle install

by anguraj s -

pls anybody teach me the moodle installation

call 8300181266

dhanushabi@gmail.com

In reply to Stephanie D'Silva

Re: problem getting config file correct

by Hiroki Inoue -
If it works internally,, maybe it depends on name resolution.

Can you provide a bit more detail like your domain name, Operating System, etc?

I'd like to find the way to solve it.

cheers,
Hiro
In reply to Hiroki Inoue

Re: problem getting config file correct

by Stephanie D'Silva -
domain name is solis.olsh.vic.edu.au

when i change the config file to $CFG->wwwroot   = 'solis.olsh.vic.edu.au';
either internally or externally, it shows, but the pictures are missing...
the properties of the pictures say the path is "internal IP/xampp etc.../solis etc/theme folder....
which is completely wrong...

which os? of the server? its a W2K with XAMPP running

Thanks for your help smile
In reply to Stephanie D'Silva

Re: problem getting config file correct

by Hiroki Inoue -
Can you try the following setting, and let me know the result?

$CFG->wwwroot   = 'http://solis.olsh.vic.edu.au/xampp';

It seems it relates to the path settings.

Also please let me know which folder you put moodle installation files on your hard disk drive.

It seems we can solve the issue by modifying config.php on Moodle or Apache config file on xampp. I'd like to know how you configure xampp to decide which way to take.

cheers,
Hiro
In reply to Hiroki Inoue

Re: problem getting config file correct

by Stephanie D'Silva -

Thanks for that Hiro, I will try it next week when I'm back at work.

As for xampp, it got set up last year by our tech support guys (outsourced). I know a few details, hope they will help you in some way.
For me to get the moodle files i have to go to the drive that is on (It's got its HDD on a shared server [sharing with antivirus]). Theres a folder called 'xampp', then inside, a folder called 'htdocs' and inside that another 'xampp' folder. Thats where all the goodies are smile

As for how xampp was actually config'd, I wouldnt know, i wasnt present during the install, there was too many people looking at the screen anyway tongueout

Will get back to you on monday regards the path change...thanks again!

In reply to Hiroki Inoue

Re: problem getting config file correct

by Stephanie D'Silva -
Hi Hiro,

Thanks for the suggested path change - it worked!

Cheers,
 Stephanie
In reply to Stephanie D'Silva

Re: problem getting config file correct

by Hiroki Inoue -
Congratulations!

It works fine from Tokyo also.

Nicely designed!

Cheers,
Hiro
In reply to Hiroki Inoue

Re: problem getting config file correct

by Dante Leon -
Hi Hiro,
Even though this is an old thread, I figured I might as well post my message here.

I am facing a similar situation to Stephanie. We just changed ISP and got a new IP address (http://75.146.52.20) for our Moodle server. The theme graphics are working OK, however all the other pictures and attachments inside the courses do not display or load.

I changed the wwwroot in the config.php to reflect our url www.rtcmoodle.org instead of the server IP address as we did in the past. The problem seems to be that the many pictures and attachments still show a link with the old IP address 216.231.36.33 as the root and they don't update to www.rtcmoodle.org as I expected. Is there anything else that I should have done to effect this change throughout the site?

I really need some help here, as I don't want to come to instructors and tell them that they need to retype every url in their courses. Any hints will be very much appreciated.

Dante
In reply to Dante Leon

Re: problem getting config file correct

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Changing $CFG->wwwroot is not guaranteed to work, as you found.

All you can do is go into the database and change any URLs in all the content fields. We do something similar every time we copy our live site to our testing server before a major upgrade. I not sure of the exact query you need to run, because someone else handles it.

But basically it is a whole bunch of quiries like:

UPDATE mdl_quiz SET intro = replace(intro, 'http://live.open.ac.uk', 'http://acceptancetest.open.ac.uk') WHERE intro LIKE '%http://live.open.ac.uk%';

Where you need command like that for each table in the databse that has columns that might contain URLs, and if you have got a lot of data in your database, these are going to be very slow queries to run.
In reply to Dante Leon

Re: problem getting config file correct

by Ken Wilson -

Hi Dante

As Tim points out, as well as changing $CFG->wwwroot in the config.php file the URLs for pictures and images also need changing. They are stored in the database as absolute references. To change these links quickly, use the admin/replace.php script. It's not on the menus, so you need to type something like this into your browser: http://www.rtcmoodle.org/admin/replace.php. Search the database for your old IP address (216.231.36.33) and replace with your URL (www.rtcmoodle.org). You may need to restart your webserver. If you need more help, take a look in the Installation Forum where there are people in the same situation smile.

Any help?

Ken