Stuck on the first part of a Moodle install

Stuck on the first part of a Moodle install

by Andrew Carlson -
Number of replies: 4

Hi folks,

I'm struggling with a configuration error that's giving me a 500 IS error on my first Moodle install. I'm not a systems administrator and much of the details of sql and PHP tend to be beyond my capability, but I installed Moodle on a server a few years ago and didn't have any trouble, so I'm not sure what i'm doing wrong. I appreciate any help.


Here are the particulars of the issue:

  • Server Operating System name (version also if possible): Apache 2.4.29
  • PHP version (e.g. PHP 5.3.2): 7.0.27
  • Database server type and version (e.g. MySQL 5.5.18): Maria DB 10.0.34
  • Browser and version (e.g. Internet Explorer 8): - Firefox
  • Moodle version (e.g. 2.1): - $release  = '3.4+ (Build: 20171208)';
    $branch   = '34';
    $maturity = MATURITY_STABLE;
  • Moodle install type? (New/Upgrade): New
  • Moodle config.php attached (please remove passwords): Attached

The instance is located at professorcarlson.net/bangladeshc4d. Any advice is most appreciated.


Average of ratings: -
In reply to Andrew Carlson

Re: Stuck on the first part of a Moodle install

by Ken Task -
Picture of Particularly helpful Moodlers

Your server appears to be hosted on DigitalOcian.

Might want to check over one of these found via:

https://www.google.com/search?q=digitalocean+install+moodle

$CFG->dbhost    = 'localhost';  ... no port necessary as that should be using socket connection anyway.

$CFG->wwwroot   = 'http://www.professorcarlson.net/bangladeshc4d'; - added http:// or if site under cert.  which it is, then URL should be https://

$CFG->dataroot  = '/home/professo/moodledata' ... see the '/' in front ... of home?  It's the full path on your system to moodledata ... if you ssh into your server, then navigate to that directory via cd name_of_dir, pwd (show where you are) then another cd next directory ... which should be professo ... then again to moodledata there might be some moodle stuff already there.   pwd shows present working directory

and a ls -ld /home/professor/moodledata will show ownerships/permissions on that directory.

this drectory should have ownerships/permissions of the user under which your web server runs.   If ubuntu www-data:www-data ... if centOS apache:apache.

Moodle needs to be able to read/write to it.

chmod ugo+rwx /home/professo/moodledata -R

u=user

g=group

x=execute

When it comes to server, 'devil is in the detail' ... close doesn't cut it. ;)

'spirit of sharing', Ken


In reply to Ken Task

Re: Stuck on the first part of a Moodle install

by Ken Task -
Picture of Particularly helpful Moodlers

After re-reading ... my command line stuff will probably not sit well with ya ... even though it's a good thing to learn when running a moodle, but ... you probably have access to cPanel ... that has a file browser (you can find location of files/folders and change ownerships/permissions on them), a file editor (you can edit config.php file), as well as other 'tools'.

Use cPanel. ;)

Might be a good thing to learn how to backup the site ... code directory, a database dump (via cPanel or phpmyadmin), and the moodledata directory.   Backup so you don't loose what you've gained. ;)

'spirit of sharing', Ken


In reply to Ken Task

Re: Stuck on the first part of a Moodle install

by Andrew Carlson -

Hi Ken, thanks so much for your help.

I do use cPanel, so that definitely helps. The /moodledata directory permissions are set to 7-6-0 (user has full rights, group has read/write, world has none). I will try some different configurations for this, but so far it's not working.

I'll keep pushing it and see what I can come up with! Thanks again.

In reply to Andrew Carlson

Re: Stuck on the first part of a Moodle install

by Ken Task -
Picture of Particularly helpful Moodlers

Do you have a VPS or is your account on a shared system?

Make the config file changes.   No need to restart any service for those changes to take place and be active.

Dunno what 7-6-0 means .... really. :|

However, you have a word press or something up above the moodle directory.   It's working so look at ownerships/permissions on those files for clues for owner/group.   However, moodledata is where the moodle will place files you upload to the moodle.   You might not have anything like that in the word press.

Since moodledata isn't directly accessible via web browser, you can be more liberal with permissions *IF* you are allowed to set 'liberal' permissions ... this relates to the first question about VPS (you should have full access) or shared ... means you will be restricted.

With 3.4 of Moodle you must run the php 7.0.x and if that's the true version of you MySQL please see:

https://docs.moodle.org/dev/Moodle_3.4_release_notes#Database_requirements

Is this being installed by some script DigitalOcean is providing you?

In https://www.digitalocean.com/community/tutorials/how-to-install-moodle-on-ubuntu-16-04

** READ ALL OF Step 3 **

Step 3 — Configuring Moodle in the Browser

To finish configuring Moodle, we'll bring up the site in a web browser and provide it with some additional configuration details. In order for the web server to save the configuration, we need to temporarily alter the permission for the Moodle web root.

Warning:
The permissions open this folder up to everyone. If you are uncomfortable with doing this, simply don't change the permission. The web interface will provide instructions for you to manually modify the configuration file.

If you do change the permissions, it is very important to undo this as soon as you have completed the setup. That step is included in this tutorial.

'spirit of sharing', Ken