problem installing moodle site on linux server

problem installing moodle site on linux server

by rana saad -
Number of replies: 5

hi,

i have a problem installing my site on local server i have installed lamp successfully, config.php is attached but when i call website i get the attached message: Unknown database  'database name'

i tried deleting and recreating database. no luck 

please help!

Attachment config.png
Attachment message.png
Average of ratings: -
In reply to rana saad

Re: problem installing moodle site on linux server

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

That's not the name of a MySQL database.  It's probably the name of a file with some sql statements in it. 

See (for a start) - MySQL

In reply to Howard Miller

Re: problem installing moodle site on linux server

by rana saad -

Which name are you refering to the one in config.php or the one in browser page although they r same . I will try and look at mysql page i forgot to mention that the site is based on old cersion of moodle 1.9 i think

In reply to rana saad

Re: problem installing moodle site on linux server

by Ken Task -
Picture of Particularly helpful Moodlers

Think Howard has found the issue ...

DB name you currently have in config.php ... shouldn't begin with  elearrmoo_ as those kinds of things in true MySQL is a 'prefix' ... look lower in config.php and you should see a line for 'prefix'.

And, databases are not normally named with .sql file name extensions.

So connect the database via mysql client as root/super user.   Then issue at the mysql> prompt,

show databases;

The ';' is required.

Should see 'mooelearninglmsstaging' if I've read the screen capture correctly.

Also, better find out what version of Moodle ... exactly ...

in moodle code directory issue:

fgrep '$release' version.php

If it is a 1.9 you'll see close to:

$release = '1.9.19+ (Build: 20130513)';

If 1.9.x you might have to 'dummy down' the version of PHP you are running on that server.  1.9.x ran well on php 5.3 and the code might have many 'depreciated' lines of code for higher versions of PHP.

How you 'dummy down' PHP on your Linux flavor determined by the 'flavor of Linux' ... meaning ... Ubuntu XXX, or CentOS X.X etc..

'spirit of sharing', Ken


In reply to rana saad

Re: problem installing moodle site on linux server

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Linux server, but files edited on Windows! (OK, I see the huge Windows 10 screen below.) I am referring to the '^M' character at the end of lines.

And it is odd that you have '?>> ending your config.php. What is the Moodle version? Newer Moodle versions have the following two lines:
// There is no php closing tag in this file,
// it is intentional because it prevents trailing whitespace problems!
In reply to Visvanath Ratnaweera

Re: problem installing moodle site on linux server

by Ken Task -
Picture of Particularly helpful Moodlers

Missed that ... good catch Visvanath! smile

There's a couple of config lines that I don't re-call them being 'standard/stock' for a 1.9.x ... or any standard/stock higher version ...

$CFG->portal =
$CFG->tunite =
And I thought that all config lines that had a url in them were not to use a 'trailing slash'.

Do see a comment ... 'New Code May 07 2012 for logout'?   So it's not a stock moodle but one that has been customized.   Could this be a 1.9.x version of iomad? https://www.iomad.org/   Don't recall when they iomad first released.

'spirit of sharing', Ken