installation problem in step 8

installation problem in step 8

by Martin Koops -
Number of replies: 4

Helle,

 

My name is Martijn and I am new to this community and a newbie to Linux. I am a physics teacher in the Netherlands and like to get moodle up and running on my server in this summer holiday, so i can start doing electronic learning in the next year smile

After 3 days of hard work behind the computer I gotr Linux up and running and managed to advance untill step 7 in the installation on the page http://moodle.org/doc/

I have set in the php.ini

$CFG->wwwroot = 'file:///var/www/html/moodle';

(instead of the  http://example.com/moodle/admin. )

Then going to the file://var/www/html/moodle/admin using Mozilla (browser in Linux) Iget to see a directory listing of

admin.php
auth.php
config.html
etcetera

selecting site.html brings me to a page reflecting a lot of PHP code, a form with  text like "

<?php p($form->fullname)?>, and stuff like that.

 

can anyone help me, I do not understand where I made waht mistake...

kind regards,

Martijn

Average of ratings: -
In reply to Martin Koops

Re: installation problem in step 8

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Oh, you have to put in that variable, EXACTLY what you need to see the main page of Moodle, the URL to access to Moodle (but no the FILE location to it in your hard disk, but the HTTP one!!).

Imagine that:

- You have installed (or are installing) Moodle in a host. That host must have a IP. We can imagine it is 1.2.3.4.

- Your have a http server running. And you know the directory where you put the html files. It is the directory whose content are showed when you type http://1.2.3.4 in your browser. We call it the "root" directoy). Exactly in that directory (I suppose) you have decompressed Moodle, so you will have a "moodle" named directory there. You have to know, then, the RELATIVE PATH from your "root" directory to your "moodle" directory. In this example is exacly 'moodle' (the result of substract the absolute file path of your "root" directory from the absolute file path of your "moodle" directory).

The general rule to set the $CFG->wwwroot variable is:

$CFG->wwwroot = 'http://IP/RELATIVE_PATH';

In this example, it will be:

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

You can, if you want, replace the IP part with the HOSTNAME of your machine (if it has a valid one), for example:

$CFG->wwwroot = 'http://www.mymachine.com/moodle';

Are you able to configure it now ? Any problem ?

Enjoy step 8 smile
In reply to Eloy Lafuente (stronk7)

Re: installation problem in step 8

by Martin Koops -

OK

Now I think maybe the problem is the definition of the webserver. I have it installed and for the time being it does not have a www address (i think).
It has an IP address 10.0.0.152 (ifconfig teels me that is the address to reach eth0) and is it called localhost (default value)

For a test I have put a simple index.htm in the root and looked , form another  (Windows) computer in my local network for: 10.0.0.152/index.htm but no results were found.

Did I alrady go wrong configuring the webserver or do I have to get the real www address my provider gives me? I suppose I should be able to test the site local?

Kind regards.

P.S. Due to other occupations I may not be able to reach you guys again before next week or so ...

In reply to Martin Koops

Re: installation problem in step 8 Use Phpinfo.php

by Runy Calmera -

All,

I also had some issues when installing Moodle on a server. What helped me was a file callend phpinfo.php. Just copy the text below into notepad and call it phpinfo.php. Then  put it in your rood directory on your server (upload it). Then go to your browser and type in http:\\yourdomain.com\phpinfo.php.

You will get a list of all your variables on your server, mysql etc. This will help you configure the config.php file.

 

Contents of the file:

 

<?
phpinfo();
?>

 

Greetings,

In reply to Martin Koops

Re: installation problem in step 8

by Patrik Nilsson -

Hi

I make a little guess on the info you provided and take it from the start just in case.
When you run a linux server you need 2 networkcard to do what you try to do I think.
You need eth0 for your local network and eth1 for your internet connection or the other way around if you like. But I assume you got that since you downloaded moodle and got a working internet connection. You can then try typing in a browser on the server, http://localhost/moodle or http://127.0.0.1/moodle and that should work to type in the configfile of moodle too i think. Do you run apache as the webserver ?
When installing the server you also gave it a name on the localnetwork, you should be able to type that also and that should work from your windows machine. http://name/moodle since you don't got a www adress its not http://www.name.com or http://name.com just http://name/moodle .
You can browse your network in windows and look at entire network and you can see the name of your linux server there as long as they are on the same subnet. But you don't need a www adress to get to your server. You are correct in that you can just type the IP adress but the webserver need to be setup to answer on that ip adress. But to know if you configured the webserver correct we need to know what webserver. But localhost usually works to type, Also try the post above because if you see the php code it sounds like you haven't installed php.