All kinds of installation problems.....

All kinds of installation problems.....

by Adrian Baker -
Number of replies: 9
Hi there

I'm trying hard to install Moodle on my Linux hosted website - www.t20suzuki.com

It seemed to go well, but at the end I got the 'Blank page' problem when trying to access moodle. I read the FAQ files and read about the

$CFG->dirroot

problem in config.php .

Mine did read:

<?php /// Moodle Configuration File

unset($CFG);

$CFG->dbtype = 'mysql';
$CFG->dbhost = 'localhost';
$CFG->dbname = 'bscphysics';
$CFG->dbuser = '*********';
$CFG->dbpass = '*********';
$CFG->dbpersist = false;
$CFG->prefix = 'mdl_';

$CFG->wwwroot = 'http://www.t20suzuki.com/public_html/moodle';
$CFG->dirroot = '/home/tsuzuki/public_html/public_html/moodle';
$CFG->dataroot = '/home/tsuzuki/public_html/mdata';
$CFG->admin = 'admin';

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

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


So I changed the dirroot variable to read:

$CFG->dirroot = 'http://www.t20suzuki.com/public_html/moodle';


And now the blank screen problem goes away but instead I get the following error messages:


Notice: Fatal: $CFG->wwwroot is not configured! Exiting. in /home/tsuzuki/public_html/public_html/moodle/lib/setup.php on line 88

Warning: main() [function.main]: open_basedir restriction in effect. File(/adminlib.php) is not within the allowed path(s): (/home/tsuzuki/public_html/) in /home/tsuzuki/public_html/public_html/moodle/admin/index.php on line 25

Warning: main(/adminlib.php) [function.main]: failed to open stream: Operation not permitted in /home/tsuzuki/public_html/public_html/moodle/admin/index.php on line 25

Fatal error: main() [function.require]: Failed opening required '/adminlib.php' (include_path='.:/usr/share/pear') in /home/tsuzuki/public_html/public_html/moodle/admin/index.php on line 25


* Server Operating System name: Linux
* Browser name: Firefox 2.0.12
* Moodle version: the latest version
* Moodle install type? New
* Phpinfo attached? (N): Not attached, but it all seems to be working OK



Any help appreciated.
Thanks

(Edited by Helen Foster to remove database username and password - original submission Saturday, 19 April 2008, 11:02 PM)

Average of ratings: -
In reply to Adrian Baker

Re: All kinds of installation problems.....

by Steve Hyndman -

A couple of things...

1. You posted your db name, username, and user password to the world, so if those are real, you may want to at least change the password. I would change both the username and password.

2. Assuming moodle is installed in a directory called moodle, then it looks like your dirroot may have been okay except you had public_html in the path twice. Instead of this:

$CFG->dirroot = '/home/tsuzuki/public_html/public_html/moodle';

Try this:

$CFG->dirroot = '/home/tsuzuki/public_html/moodle';

3. Based on your config file, I assume you have created a directory in public_html called mdata and intend to use this for your moodle data directory? Although that will work, it would be better for security purposes if you created that directory on the same level as public_html and change this:

$CFG->dataroot = '/home/tsuzuki/public_html/mdata';

to this:

$CFG->dataroot = '/home/tsuzuki/mdata';

Also, I'm assuming moodle is able to find the database okay and if so, then you have the database connection information entered correctly. However, most hosts will require you append your account username to the dbname and dbuser...but if you're not having problems connecting to the database, then your info must be okay, so disregard.

4. Finally, make sure you have no extra lines at the end of the config file.

Steve

In reply to Steve Hyndman

Re: All kinds of installation problems.....

by Adrian Baker -
Hi there

Thanks for the reply. I changed the dirroot as suggested, but still didn't get the set up working. Having fiddled around with various things I decided to try again and re-install.

I removed config.php and installed again. All of the set up went ok, with no error messages. However, it still won't work - I again got the blank page problem. I then changed the dirroot again and now get the message:


Notice: Fatal: $CFG->wwwroot is not configured! Exiting. in /home/tsuzuki/public_html/public_html/moodle/lib/setup.php on line 88


However, if I go to config.php wwwroot is given as:

$CFG->wwwroot = 'http://www.t20suzuki.com/public_html/moodle'


Which is correct (I think). However, you can see in the error message above that the address is given as:
/home/tsuzuki/public_html/public_html/moodle/
but I don't have a directory /public_html/public_html - it is only /public_html




If I now go to my website in a webbrowser to access moodle at the address:
http://www.t20suzuki.com/public_html/moodle/

I get the following error message


Notice: Fatal: $CFG->wwwroot is not configured! Exiting. in /home/tsuzuki/public_html/public_html/moodle/lib/setup.php on line 88

Warning: main() [function.main]: open_basedir restriction in effect. File(/pagelib.php) is not within the allowed path(s): (/home/tsuzuki/public_html/) in /home/tsuzuki/public_html/public_html/moodle/lib/blocklib.php on line 18

Warning: main(/pagelib.php) [function.main]: failed to open stream: Operation not permitted in /home/tsuzuki/public_html/public_html/moodle/lib/blocklib.php on line 18

Fatal error: main() [function.require]: Failed opening required '/pagelib.php' (include_path='.:/usr/share/pear') in /home/tsuzuki/public_html/public_html/moodle/lib/blocklib.php on line 18

Fatal error: Call to undefined function: redirect() in /home/tsuzuki/public_html/public_html/moodle/index.php on line 38

There seems a lot of /public_html/public_html/ in this message, but I don't have this directory....


Hmm - puzzling
In reply to Adrian Baker

Re: All kinds of installation problems.....

by Richard Enison -
AB,

I think SH was on the right track. Most likely public_html is your web document root, so what you should have in your config.php file is

$CFG->wwwroot = 'http://www.t20suzuki.com/moodle';
$CFG->dirroot = '/home/tsuzuki/public_html/moodle';

We can worry about dataroot later; first let's at least make sure the website is accessible.

Of course you would access the site in your browser as

http://www.t20suzuki.com/moodle

If that doesn't work let us know and we will have to talk about your web server (presumably Apache) configuration.

RLE
In reply to Richard Enison

Re: All kinds of installation problems.....

by Adrian Baker -
thanks so much for your interest and help smile

However, your suggestion for wwwroot is wrong as there is no folder in my webspace called:

http://www.t20suzuki.com/moodle/

Enter this in a browser and see! However, there is a folder moodle here:

http://www.t20suzuki.com/public_html/moodle/

I don't know why it is in a public_hml folder, but when I installed a database using 'MyPanel' on my website, that is where it went....

I'm using MySQL database that is part of my hosting deal. If i look in my 'bscphysics' database using MyPanel there are hundreds of moodle files and folders there, and as I said the installation all seemed OK






In reply to Adrian Baker

Re: All kinds of installation problems.....

by Adrian Baker -
Hi again

I logged onto MyPanel and checked all my settings. I did notice this:

Path to webspace: /home/tsuzuki/public_html

so that must be where the public_html comes from. however, i never have to use the wording public_html to access any page on my website. For example:

http://www.t20suzuki.com/public_html/index.htm gets an error message, but

http://www.t20suzuki.com/index.htm gets you straight to my home page

Also, yes, I am using Apache. I have MySQL version: 4.1.20 (patched) too

I'm very new to MySQL, Apache and databases, so please bare with me....


In reply to Adrian Baker

Re: All kinds of installation problems.....

by Richard Enison -
AB,

I just deleted a post I made in response to your last one, because I think I misread it. Could you clarify what you mean by your home page that you get when you browse to http://www.t20suzuki.com/index.htm? Do you mean the main page of your Moodle site or some other page altogether? Because there shouldn't be an index.htm page in the same folder with the main Moodle script files. The main Moodle file is index.php, not index.htm.

If we cannot clarify this point, I will have to insist upon asking you to attach your Apache configuration file (usually called httpd.conf) or it will be impossible to help you further.

And I am willing to bear with you, but not to bare (get naked) ... big grin

RLE
In reply to Adrian Baker

Re: All kinds of installation problems.....

by Steve Hyndman -

That's because Richard has no reason to suspect that you created a folder in your website called public_html....that's not really a typical thing to do.

If you have a directory called moodle (which contains your moodle source code) in a directory called public_html, then your path to moodle will be:

http://www.t20suzuki.com/public_html/moodle/

and your path to your website root will be

http://www.t20suzuki.com/

Not really sure why you have the public_html directory there, but it should work...you just need to get all the paths in your config correct.

Steve

In reply to Steve Hyndman

Re: All kinds of installation problems.....

by Adrian Baker -
Hi again

Yes, what you put here is exactly correct.

My website homepage (about motorcyles I restore and race) is at this address:

http://www.t20suzuki.com/

Whereas moodle is at this address:

http://www.t20suzuki.com/public_html/moodle/

I had a good search around my hosting FAQ site last night and there is sometimes a problem with running php scripts unless you set up a new 'tmp' folder and change one of the settings. I did this, but it takes up to 24hours to take affect. It probably won't help, but it was worth a try.