Opening moodle from other computers

Opening moodle from other computers

Craven Buitendach -
回帖数:6
Hi Guys,

I am quite new at this, but i have the problem of moodle displaying correctly on my computer, but other computers accessing it on my computer through our internal network, which works but it looks like it doesnt load the CSS correctly, as the images and layout is totaly mixed.

Any suggestions ?

Thanks for the help!
回复Craven Buitendach

Re: Opening moodle from other computers

Jon Witts -
Plugin developers的头像 Testers的头像
You need to change the wwwroot setting in config.php from localhost to the domain name of your server.
回复Jon Witts

Re: Opening moodle from other computers

Craven Buitendach -
Hi Jon,

Thanks for the prompt reply, i have tried changing that setting and restarting my apache server to no avail.

Here is my config.php:

<?php /// Moodle Configuration File

unset($CFG);

$CFG->dbtype = 'mysql';
$CFG->dbhost = 'localhost';
$CFG->dbname = 'moodle';
$CFG->dbuser = 'root';
$CFG->dbpass = '######;
$CFG->dbpersist = false;
$CFG->prefix = 'mdl_';

$CFG->wwwroot = 'http://onsite';
$CFG->dirroot = 'C:\Moodle\server\moodle';
$CFG->dataroot = 'C:\Moodle\server/moodledata';
$CFG->admin = 'admin';

$CFG->directorypermissions = 00777; // try 02777 on a server in Safe Mode

and here is an image of the site from another computer:
http://img40.imageshack.us/i/testnbz.jpg/
回复Craven Buitendach

Re: Opening moodle from other computers

Jon Witts -
Plugin developers的头像 Testers的头像
This definitely looks to me like your wwwroot has not changed. Create a php file with the following in and upload it to the root of your moodle install, then load it in your web browser and post he output back here.

----------------------------------

<?php

require_once('config.php');

echo '<p>' . $CFG->wwwroot . '</p>';

?>
回复Jon Witts

Re: Opening moodle from other computers

Craven Buitendach -
You are correct that query has the following output:

http://localhost


Is there anywhere else i can set it ?

回复Craven Buitendach

Re: Opening moodle from other computers

Jon Witts -
Plugin developers的头像 Testers的头像
Let me guess... You are using the XAMPP Package?
回复Jon Witts

Re: Opening moodle from other computers

Craven Buitendach -
Yup.

I reinstalled it by typing in my hostname instead of localhost, and it seems to have solved the problem.

Thanks for the help Jon