how can i doing to automatic change the ipaddress from $CFG->wwwroot ??

how can i doing to automatic change the ipaddress from $CFG->wwwroot ??

by jay trivedi -
Number of replies: 4

i just installed the moodle in wemp server ...network(internet) establish in our university..the problem is our university change the ipaddress in every 2 month  ..and every time i change the (ip)address in $CFG->wwwroot ...is  that any other way to automatic change the ip-address like when univesity change the ipaddress... in config.php ($CFG->wwwroot )ip-address will automaic change..?????

help moodlers......

Average of ratings: -
In reply to jay trivedi

Re: how can i doing to automatic change the ipaddress from $CFG->wwwroot ??

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
In reply to Visvanath Ratnaweera

Re: how can i doing to automatic change the ipaddress from $CFG->wwwroot ??

by jay trivedi -

okk...Thanks Visvanath for the link...but my other friend told me that ...in iis it is possible that when ip address change.. iis automatic gatting the new one...we do not change the ip address manually in cofig.php($CFG->wwwroot)..is it true??

In reply to jay trivedi

Re: how can i doing to automatic change the ipaddress from $CFG->wwwroot ??

by Ken Task -
Picture of Particularly helpful Moodlers

Pardon intrusion ... think Visvanath might have taken a deserved holiday, so as not to delay you and think he would agree ...

IF you do get the variable to adjust to the new IP address, there is one side affect of that ... all previous links to documents/images, etc. in content that has already been created gets broken.  Moodle uses that variable to build full url links to content files AND records that IP address in the database tables that link to content.  So, a link that had pointed to say http://192.168.1.20/blah ... won't get automagically updated to http://new192.168.x.x IP.  Not without having to use the search and replace admin utility to replace all the now errant references in the DB.

If one uses a FQDN that can be resolved in DNS then makes no difference if the IP address of the server changes ... the name stays the same - thus all previously developed content needing a full URL still continue to work.

'spirit of sharing', Ken

Average of ratings: Useful (1)