Blank Pages

Blank Pages

Chris Joseph發表於
Number of replies: 6

I am trying to get moodle up and running on a Red Hat 9 linix machine I just set up for this purpose.

I have followed the instructions from start to step 8  a couple times but continue to get blank pages when i try and start moodle.

Can anyone help ????

My server has no domain name yet so it's running on http://131.104.90.150

I have got PHP and MYSQL set up ok - http://131.104.90.150/php.php

and below is a look at my config.php file (user/pass I removed).

 

Any ideas as to why I am getting blank pages????

 

//=========================================================================
// 1. DATABASE SETUP
//=========================================================================
// First, you need to configure the database where all Moodle data       //
// will be stored.  This database must already have been created         //
// and a username/password created to access it.                         //
//                                                                       //
//   mysql      - the prefix is optional, but useful when installing     //
//                into databases that already contain tables.            //
//
//   postgres7  - the prefix is REQUIRED, regardless of whether the      //
//                database already contains tables.                      //

$CFG->dbtype    = 'mysql';       // mysql or postgres7 (for now)
$CFG->dbhost    = 'localhost';   // eg localhost or db.isp.com
$CFG->dbname    = 'moodle';      // database name, eg moodle
$CFG->dbuser    = '####';    // your database username
$CFG->dbpass    = '####';    // your database password

$CFG->dbpersist = true;          // Use persistent database connection?
                                 // (should be 'true' for 99% of sites)

$CFG->prefix    = 'mdl_';        // Prefix to use for all table names


//=========================================================================
// 2. WEB SITE LOCATION
//=========================================================================
// Now you need to tell Moodle where it is located. Specify the full
// web address to where moodle has been installed.  If your web site
// is accessible via multiple URLs then choose the most natural one
// that your students would use.  Do not include a trailing slash.

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


//=========================================================================
// 3. SERVER FILES LOCATION
//=========================================================================
// Next, specify the full OS directory path to this same location
// Make sure the upper/lower case is correct.  Some examples:
//               
//    $CFG->dirroot = 'C:\FoxServ\www\moodle';    // Windows
//    $CFG->dirroot = '/var/www/html/moodle';     // Redhat Linux 

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


//=========================================================================
// 4. DATA FILES LOCATION
//=========================================================================
// Now you need a place where Moodle can save uploaded files.  This
// directory should be readable AND WRITEABLE by the web server user
// (usually 'nobody' or 'apache'), but it should not be accessible
// directly via the web.
//
// - On hosting systems you might need to make sure that your "group" has
//   no permissions at all, but that "others" have full permissions.
//
// - On Windows systems you might specify something like 'C:\moodledata'

$CFG->dataroot  = '/www/uploads';


//=========================================================================
// 5. DATA FILES PERMISSIONS
//=========================================================================
// The following parameter sets the permissions of new directories
// created by Moodle within the data directory.  The format is in
// octal format (as used by the Unix utility chmod, for example).
// The default is usually OK, but you may want to change it to 0750
// if you are concerned about world-access to the files (you will need
// to make sure the web server process (eg Apache) can access the files.
// NOTE: the prefixed 0 is important, and don't use quotes.
    
$CFG->directorypermissions = 0777; 

//=========================================================================
// 3. SERVER FILES LOCATION
//=========================================================================
// Next, specify the full OS directory path to this same location
// Make sure the upper/lower case is correct.  Some examples:
//               
//    $CFG->dirroot = 'C:\FoxServ\www\moodle';    // Windows
//    $CFG->dirroot = '/var/www/html/moodle';     // Redhat Linux

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


//=========================================================================
// 4. DATA FILES LOCATION
//=========================================================================
// Now you need a place where Moodle can save uploaded files.  This
// directory should be readable AND WRITEABLE by the web server user
// (usually 'nobody' or 'apache'), but it should not be accessible
// directly via the web.
//
// - On hosting systems you might need to make sure that your "group" has
//   no permissions at all, but that "others" have full permissions.
//
// - On Windows systems you might specify something like 'C:\moodledata'

$CFG->dataroot  = '/www/uploads';


//=========================================================================
// 5. DATA FILES PERMISSIONS
//=========================================================================
// The following parameter sets the permissions of new directories
// created by Moodle within the data directory.  The format is in
// octal format (as used by the Unix utility chmod, for example).
// The default is usually OK, but you may want to change it to 0750
// if you are concerned about world-access to the files (you will need
// to make sure the web server process (eg Apache) can access the files.
// NOTE: the prefixed 0 is important, and don't use quotes.
    
$CFG->directorypermissions = 0777;  
 
 

評比平均分數: -
In reply to Chris Joseph

Re: Blank Pages

John Gone發表於
For step #3 "$CFG->dirroot = '/www/html/moodle';" please see http://moodle.org/doc/?file=faq.html#blankpages
and that should be it. Good luck
In reply to John Gone

Re: Blank Pages

Chris Joseph發表於

I did take note of the FAQ before I posted here but the server path for moodle on my Linux server is /www/html/moodle as I have put it in my config.php file.

When I put a different path I am given a page that tells me the dirroot is wrong and change it to /www/html/moodle.

But when it is set as /www/html/moodle in config.php it gives me a blank page.

Could there be another reson for getting blank pages??????

 

PLEASE HELP !!!!

In reply to Chris Joseph

Re: Blank Pages

John Gone發表於
I'm guessing that that's not a complete path. The ???/www/html/moodle has to exist in a directory somewhere doesn't it? Maybe try /var/www/html/moodle or something. I don't know anything about Linux except that you have to be really smart to learn it 微笑 Sorry I can't give you a better answer.
In reply to John Gone

Re: Blank Pages

Chris Joseph發表於

I found the problem.

I am using RedHat and found that there was a module I needed to add (php-mysql*.rpm) to get php and mysql to work together.

Once I added it and restarted the server it worked.

 

Chris

 

In reply to Chris Joseph

Re: Blank Pages

John Gone發表於
Glad to see you finally got your Moodle running Chris. Thanks for letting us know what the resolution was. The answer was in the installation instructions on the page: Installing Apache, MySQL and PHP

Quote from that page:


Redhat Linux
You should install all available RPM packages for Apache, PHP and MySQL. One package that people frequently forget is the php-mysql package which is necessary for PHP to talk to MySQL.


I'll make a reference to this issue in the Installation FAQ
Thanks Chris