Jump to content

Recommended Posts

Posted

I've just installed Moodle on a test server running CentOS and it all seems fine on the local machine but when I try and access it from a remote machine it's as if the PHP isn't being parsed.

 

Do I need to set something within the PHP.conf file that I have missed or is it a security thing somewhere?

 

Any help would be much appreciated.

 

Rich

Posted

Hi,

 

Yes, PHP seems to be fully installed. I can see it's configuration on the server happily.

 

I think I've messed up the http.conf file somehow so that it works on the local machine but not on a remote machine, however I have no idea what I've done.

 

Rich

Posted

Check the moodle apache config or the moodle config file.

 

You need to check the server address that is stored in one of these config files as moodle seems to do url creation from a base address in one of the files IIRC.

  • Thanks 1
Posted

Just for some further info; this is my moodle config file:

<?php /// Moodle Configuration File

 

unset($CFG);

 

$CFG->dbtype = 'mysql';

$CFG->dbhost = 'localhost';

$CFG->dbname = 'moodle';

$CFG->dbuser = '********';

$CFG->dbpass = '*******';

$CFG->dbpersist = false;

$CFG->prefix = 'mdl_';

 

$CFG->wwwroot = 'http://localhost/moodle';

$CFG->dirroot = '/var/www/html/moodle';

$CFG->dataroot = '/var/www/moodledata';

$CFG->admin = 'admin';

 

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

 

require_once("$CFG->dirroot/lib/setup.php");

// MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES,

// RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.

?>

Posted
Just for some further info; this is my moodle config file:

 

$CFG->wwwroot = 'http://localhost/moodle';

 

 

This would be the line that you need to change.

 

Change localhost to the IP or DNS name of your server.

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...