Lost my Moodle

Lost my Moodle

by Greg Thomas -
Number of replies: 18
hi
Hope someone can help me !
I lost my moodle 1.9.4 after upgrading Ubuntu from 8.10 to 9.04
All I get is the apache "It Works!" message
Do i have to reinstall MySql or entire Moodle itself.
Thanks in anticipation
GregThomas
Average of ratings: -
In reply to Greg Thomas

Re: Lost my Moodle

by Jon Witts -
Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Did you let the upgrade overwrite your apache config files? Where was your moodle to start with? /var/www/ ?
In reply to Jon Witts

Re: Lost my Moodle

by Greg Thomas -
No, I have not asked it to overwrite any config files
Yes, moodle is located at /var/www
In reply to Greg Thomas

Re: Lost my Moodle

by Greg Thomas -
Jon,
Pls help
All I get is the Apache "It works!" message when I type in the URL
GT
In reply to Greg Thomas

Re: Lost my Moodle

by Greg Thomas -
Is it something to do with file permissions
Someone pls help
In reply to Greg Thomas

Re: Lost my Moodle

by mark white -
Please let show us your config file.

Are the other computers on a different subnet?

What os are you using, linux or windows?

Sorry for all the questions, just trying to get to the root of the problem.

I am in Sheffield next week if I can help.

Mark
In reply to Greg Thomas

Re: Lost my Moodle

by Jon Witts -
Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Where is the moodle folder? Is it at /var/www/moodle? what happens when you enter http://<server name>/moodle ?
In reply to Jon Witts

Re: Lost my Moodle

by Greg Thomas -
We split with our associates in Sheffield, am back in Bombay.
Yes the moodle folder is at /var/www/moodle
Since I have a static IP, we had pointed the URL to my Ubuntu machine and we could access the courses on the internet till last week, i.e. till we upgraded our ubuntu to 9.04.

Jon, I tried http://URL/moodle instead of the usual http://URL and am able to view the couple of course categories that we have, but without the logo and the pictures.when I click on the "login" link or any of the course categories, I get the following message
"404 Not Found"
"The requested URL /course/category.php was not found on this server."
Apache/2.2.11 (Ubuntu) PHP/5.2.6-3ubuntu4.1 with Suhosin-Patch Server at "My URL" Port 80


Have pasted the config.php file here

unset($CFG);

$CFG->dbtype = 'mysql';
$CFG->dbhost = 'localhost';
$CFG->dbname = 'moodle';
$CFG->dbuser = 'moodleuser';
$CFG->dbpass = 'xxxx';
$CFG->prefix = 'mdl_';

$CFG->dbpersist = "false";

$CFG->wwwroot = 'http://my URL';
$CFG->dirroot = '/var/www/moodle';
$CFG->dataroot = '/var/moodledata';
$CFG->directorypermissions = 00777;
$CFG->admin = 'admin';
require_once("$CFG->dirroot/lib/setup.php")

In reply to Greg Thomas

Re: Lost my Moodle

by Jon Witts -
Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
It sounds like both your apache configuration has been corrupted / over written in your upgrade. You need to change your apache config files so that the document root directory points to /var/www/moodle instead of /var/www

I am not sure if this will solve all your problems but it should help you along a bit...
In reply to Greg Thomas

Re: Lost my Moodle

by mark white -
Look at your apache conf ile. Looks like your virtualname hosting set up has gone wrong.
In reply to mark white

Re: Lost my Moodle

by Greg Thomas -
Hi
Where can I find my apache config files, is it /etc/moodle/apache.conf
Well, this is how it looks like and how do I change my virtual namehosting setup
GT

Alias /moodle /usr/share/moodle/

<DirectoryMatch /usr/share/moodle/>

Options +FollowSymLinks
AllowOverride None

order deny,allow
# deny from all
allow from 127.0.0.0/255.0.0.0
allow from all

<IfModule mod_php5.c>
php_flag magic_quotes_gpc On
php_flag magic_quotes_runtime Off
php_flag file_uploads On
php_flag short_open_tag On
php_flag session.auto_start Off
php_flag session.bug_compat_warn Off

php_value upload_max_filesize 2M
php_value post_max_size 2M
</IfModule>

<IfModule mod_php4.c>
php_flag magic_quotes_gpc On
php_flag magic_quotes_runtime Off
php_flag file_uploads On
php_flag short_open_tag On
php_flag session.auto_start Off
php_flag session.bug_compat_warn Off

php_value upload_max_filesize 2M
php_value post_max_size 2M
</IfModule>

<IfModule mod_dir.c>
DirectoryIndex index.php
</IfModule>

</DirectoryMatch>
In reply to Greg Thomas

Re: Lost my Moodle

by Jon Witts -
Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I thought you said your moodle was at /var/www/moodle not /usr/share/moodle?
In reply to Jon Witts

Re: Lost my Moodle

by mark white -
Very confused now.

Were is the index.html file that servers the "it works page"?

Were is your moodle folder?

Were is the moodledata folder?

What url are you using to access moodle?

Sorry for all the questions but I need more info.

As Jon says we thought the setup was normal default values. It now looks like moodle is installed in another folder and some apache redirection is taking place.

You said you got to your site but no icons etc. This points to wrong information in your config file.

Mark
In reply to mark white

Re: Lost my Moodle

by Greg Thomas -
Hi,

yes, I can see 2 files which can give out "It works!" message
usr/share/apache2/default-site/index.html (do you want me to delete this ?)
&
var/www/index.html

1 apache.conf located at /etc/moodle which I pasted yesterday and points to usr/share/moodle sad
and 1 apache2.conf located at /etc/apache2 (which doesnt talk about moodle)

The /var/www/moodle contains various sub-folders like blog, blocks, calendar, etc., so this must be the location of moodle folder
/var/moodledata has subfolders numbered 1 to 9 besides other folders called cache, sessions, filter, user, upgradelogs, so this must be the moodledata folder

The /usr/share/moodle folder contains a single file - config.php, do you want me to delete this ? And modify the line in /etc/moodle/apache.conf from
Alias /moodle /usr/share/moodle/
to
Alias /moodle /var/www/moodle/

I had tried installing Moodle in Jan using Synaptic. When I uninstalled it, some files may have been left over. This must be causing the apache redirection. In March I installed Moodle successfully as per instructions on Moodle site.

GT

EDIT - I tried after modifying the /etc/moodle/apache.conf file
Alias /moodle /usr/share/moodle/ to Alias /moodle /var/www/moodle/
& <DirectoryMatch /usr/share/moodle/> to <DirectoryMatch /var/www/moodle/>
Still get the message "It works!"
Could it be a problem with my MySQL data gone corrupt or with my LDAP
In reply to Greg Thomas

Re: Lost my Moodle

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Did you check the directory "lost+found"? smile
In reply to Visvanath Ratnaweera

Re: Lost my Moodle

by Greg Thomas -
Hi
Is the solution too complicated and time consuming, should I simply format my machine and reinstall Ubuntu and Moodle
GT
In reply to Greg Thomas

Re: Lost my Moodle

by mark white -
That would seem the quickest course of action. Can you backup your database and make copy of your moodledata folder?

If you reinstall the same version of moodle we may be able to recover your site.

BUT

I see from your url that you have http://demo.yourdomain.com. How Is this set up in DNS?

It looks like demo.yourdomain points to a different server from yourdomain.

This is ok as long as Apache and the moodle config files are setup properly.

Need to sort this out first.

Mark






In reply to mark white

Re: Lost my Moodle

by Greg Thomas -
My webhosting service provider has given me a demo URL which is pointed to the static IP of my Ubuntu machine. This has allowed us to access our moodle from the internet. Can't find the same version of moodle 1.9.4, is it ok to install 1.9.5 instead.
In reply to Greg Thomas

Re: Lost my Moodle

by mark white -
Go ahead.

So the demo url points to your ubuntu machine. Did you alter your hosts file on the ubuntu machine to poine demo to localhost?

Lets not worry about this for know lets get a working copy up and running.

Mark