Installation help (wordpress - moodle on the same server)

Installation help (wordpress - moodle on the same server)

by Cameron Campbell -
Number of replies: 16

Hello all: 

So here's what I'm going trying to do: 

  • Main directory: 
    • Main wordpress site (wordpresssite.com)
    • Subdomain of wordpress site (something.wordpresssite.com)
    • Moodle site (links with fancy magix integration plug in to something.wordpresssite.com)

So, I put moodle folder into the main directory, extracted etc etc. Made a mysql database

Being a somewhat hopeful person I then figured moodle.wordpresssite.com would lead me to the install process. 

This, being reality, didn't work and lead me to a 404 error. The version of moodle I'm working with is 3.8+ stable. 

I'm feeling quite dopey and unsure what to do next. Can someone help? 

Cameron 

Average of ratings: -
In reply to Cameron Campbell

Re: Installation help (wordpress - moodle on the same server)

by Ken Task -
Picture of Particularly helpful Moodlers

Wordpress uses .htaccess files a lot.  Those are hierarchical in that one above the directory where moodle code is affects or has effects on the moodle code directory.

One thing for sure ... no one knows what "fancy magix integration plug in" means nor what that might be!  Surely it has a name.  Please provide that much of clue.

Good providers (where you host) usually have documentation and  FAQ's or forums for customers having issues with their sites.   Suggest looking there and reviewing what has been done so far.  Many things are not intuitive ... servers don't think like humans! smile

Or providing some information about your hosting/setup etc.  But NO logins/passwords - sensitive info.

'spirit of sharing', Ken

In reply to Ken Task

Re: Installation help (wordpress - moodle on the same server)

by Cameron Campbell -
Sorry Ken, I figured the intergration plug in was not a big deal to the instal (plus that was posted pre-coffee) I'm going to use edwiser.

The host, sadly, was chosen by the person who I'm helping out, and I'm finding their documentation and help to be unhelpful.

What kind of info would you need? I'm trying to get this done on ionos.ca, it seems that their cloud hosts have Moodle pre-installed, but my friend is using the basic hosting package.

So, what I've got going on is what you can see in the attached info. 

Sorry I'm being vague, it's not by design but because I'm probably exceptionally stupid. 
Attachment Capture d’écran, le 2019-12-20 à 18.01.09.png
In reply to Cameron Campbell

Re: Installation help (wordpress - moodle on the same server)

by Cameron Campbell -
So an update, I discovered https://my.ionos.ca/ does have an simple installer for moodle on their regular hosting plan. So I used it and everything was awesome. I had a 404 error on the original Wordpress subdomain, so I just moved it up a level in the directory and it works.
In reply to Cameron Campbell

Re: Installation help (wordpress - moodle on the same server)

by Ken Task -
Picture of Particularly helpful Moodlers

Sorry didn't get back earlier ... holidays and all ..,

Well congrats on figuring it out!

About those hosting provider simple installers ... yes, they seem to do ok installing initially.  And they might do ok (the right things Moodlese wise) on an update within a series of Moodle, but many don't do well on 'upgrades' ... like from 3.8.x to 3.9.0 when it comes out.

Hopefully, your 'customer' isn't one that just has to have the latetest/greatest.  Might want to warn your 'customer' about provider providing 'upgrade' scripts/buttons.  Customer will see that button in their account/access.

Not saying undo ... just be forewarned ... that's all! smile

'SoS', Ken

In reply to Ken Task

Re: Installation help (wordpress - moodle on the same server)

by Cameron Campbell -

Hi Ken, it's fine. I've been off for a bit as well. 

Yeah, the customer really doesn't care that much about latest and greatest and I'll manage any of their upgrades. 

The only really problem I've run into so far is that I can't find the moodledata folder. Can one just create one manually? I've read something about this but then you have to edit the config file, yes? 

Cameron 

In reply to Cameron Campbell

Re: Installation help (wordpress - moodle on the same server)

by Ken Task -
Picture of Particularly helpful Moodlers

That install script you used ...  did something you won't find in any official moodle docs ... it might have created a hidden moodledata directory in the code of Moodle.

Use whatever you have to browse files and look at the config.php file (very key to functioning of moodle) and one can find a config line that points to the full path of moodledata.

One user in these forums that used one of those installers found in moodle code/config.php file a data directory named something like .haewrjhdata .... first, note in the name the leading 'dot' ... that's hidden ... not only from CLI but also anyone using a web browser hitting the moodle site.

In a 'typical' moodledata directory, one will find directories like:

cache
environment
filedir
lang
localcache
lock
models
muc
sessions
temp
trashdir

Of those the most important is 'filedir' ... that's where moodle stores any file uploaded through it's interface.

Am guessing the installer script and the way it's  programmed is to create a data directory that's secure ... but only by obscurity - and maybe web server config.

One thing that does ... makes your backup of what one thought was moodle code only a lot larger.   Plus, one must be aware of that if upgrading the site manually - or even if using providers scripts to upgrade.

'SoS', Ken


In reply to Ken Task

Re: Installation help (wordpress - moodle on the same server)

by Cameron Campbell -
Thanks Ken, ultimately all I want to do is change the upload file size and/or locate a place to FTP my module to.

UPDATE!: Ken, I found the folder, a slight variation of the name, but barely. 

So if I want to upload via FTP I do it into filedir?
In reply to Cameron Campbell

Re: Installation help (wordpress - moodle on the same server)

by Ken Task -
Picture of Particularly helpful Moodlers

Upload file size limits/settings are in PHP ... then one can set in Moodle - at site and course level.

"locate a place to ftp my module to" ... never mess with moodledata/filedir/   There should be a warning.txt file in there that tells ya that! smile

So what is '... my module ..' ... is that an addon/plugin to moodle or is that something for content in a course?

One can install plugins/addons via Admin Interface or if one knows where the plugin/addon should go in moodle code directories, one could install via command line.

For a place FTP where Moodle can see to upload files beyond the limits of PHP uploads, one could use a file system repository in moodle.

See: https://docs.moodle.org/38/en/File_system_repository

Possible 'catch 22' ... could your FTP client see the hidden .xxxxxxdata/repository/'mymodules' file system repo once it's set up?

'SoS', Ken


In reply to Ken Task

Re: Installation help (wordpress - moodle on the same server)

by Cameron Campbell -
Yeah, there was actually a HUGE warning to not mess with it.

When I said "module" I meant "Scorm package".

I set up the repository, works great.

BUT! (keeping in mind, once again, that this is not my hosting choice etc etc etc) now the SCORM package won't load. I'm getting the following in the popup (to be clear, assuming an installed server, I've worked on moodle for ermm. a long long time - it's the backend stuff I'm absolutely rubbish at) :
No valid arguments supplied or incorrect server configuration
More information about this error

Clicking on "more information about this error" leads me to: 

error/moodle/invalidargorconf

which seems erm.. cryptic. 

I now I"m a pain Ken, but any help you might be able to offer would be great.

Also, depending on where you are happy New Years/New Years Eve. 

Cameron


In reply to Cameron Campbell

Re: Installation help (wordpress - moodle on the same server)

by Ken Task -
Picture of Particularly helpful Moodlers

Well, that's a new one to me! :|

SCORM modules ... are uploaded as zips and then Moodle unzips (scattering all the files contained therein to the sea of files in moodledata/filedir/)

Using file system repo to circumvent PHP file upload liimits via FTP, probably isn't needed.

And ... once in config of SCORM there is the linking to the uploaded zip file ... an option to use 'aliases' or not.

Which did you choose?  If I re-call correctly, choosing 'aliases' leaves the zip where you uploaded it and unzips it there.  Might be the error it's reporting.

When you uploaded via FTP you had to do that as a user ... if not the same user that's being used to run Moodle ... that could be an issue.

Not using 'aliases' means the zip is unzipped and all those files related to that SCORM are placed in moodledata/filedir/

You could use whatever you have to execute sql queries on DB and what's in mdl_files table related to SCORM's ... what that query would be is your 'homework'! smile

So if the SCORM zip file size is over max file size uploads (a PHP setting) suggest researching how one increases the size of files that can be uploaded.

Dunno if you have it or not, but could have ... a thing called 'easyapache' ... which is really for version of PHP and the extensions loaded + other PHP settings ... site wide .. like permitted file size.  All that stuff found in cPanel.

I don't host where site is hosted so suggest you check FAQ's/Tutorials/Forums that provider might have for customers.   Might be thing for helpdesk a well.

Sooo .... ???????

And a Happy New Year to you and yours also!

'SoS', Ken


In reply to Cameron Campbell

Re: Installation help (wordpress - moodle on the same server)

by Cameron Campbell -
AHA! Figured it out (well I read a thing and figured it out!) (putting it here in case someone needs to see it) The article is here (https://moodle.org/mod/forum/discuss.php?d=181931) and basically you go into weblib.php and do a find for "PATH_INFO" and replace with "ORIG_PATH_INFO". Save and boom, off to the races (where "races" is SCORM packages finally load properly like they're supposed to".

All of this teaches me that I have to ask A LOT more questions about hosting before I choose my own plan. 

Ken, thank you so very much for taking time out of your holidays to help me out, I really appreciate it. SOS indeed. 

Average of ratings: Useful (1)
In reply to Cameron Campbell

Re: Installation help (wordpress - moodle on the same server)

by Ken Task -
Picture of Particularly helpful Moodlers

Congrats!  Now that's something else to make note for customer to be aware.   Your hack might work right now, but an upgrade to core code *will* wipe out that hack!

Accept Path info is really an Apache thing ... one standalone (not VPS) on CentOS 6 and 7, for example, has on by default in apache config.

"All of this teaches me that I have to ask A LOT more questions about hosting before I choose my own plan."

Right on target there!  Your experience with this has led to more awareness, but just think of the masses of folks who are not IT/Web server persons seeking a 'good' place to host a Moodle.  You don't know what you don't know ... and in this case, someone as I just described, would not have a clue as to what to ask!!! :\

Just for grins ... search via Moodle Admin UX for 'slash' to see if there isn't a setting for 'accept path info' in the Moodle?  In the Moodle it's called "slash arguments".

Rather than the hack ... go to:

Site administration -> Server -> HTTP

Where one will find:

HTTP
Use slash arguments slasharguments
Default: Yes

'Slash arguments' (using PATH_INFO) is required for SCORM packages and multiple-file resources to display correctly. If your web server doesn't support 'slash arguments' and you are unable to configure it, this setting can be disabled, though it will result in things not working.
Note: The use of 'slash arguments' will be required in future versions of Moodle.

So if that setting (set one way or another will work), suggest un-doing your hack and see if SCORM's play as they should or not.

BTW, there is one other additional way to set on or off .. by adding:

$CFG->slasharguments="1 or 0";

where 1 is on .... and 0 is off.

In the config.php file for the moodle.

If you can get it to work with a setting ... do it that way cause that setting gets retained in the DB for Moodle ... not any code - which will be replaced.

'SoS', Ken

In reply to Ken Task

Re: Installation help (wordpress - moodle on the same server)

by Cameron Campbell -
Ken, I'll check that out later. BUT this is a thing that comes up with this server A LOT if you google them. Basically they are playing silly buggers with a whole bunch of stuff (moodledata, slash arguments, etc etc). I'm looking at another host for some of our own projects and I'm going to ask a ton of questions.
In reply to Cameron Campbell

Re: Installation help (wordpress - moodle on the same server)

by Ken Task -
Picture of Particularly helpful Moodlers

Do remember that you used providers one click script to install the moodle - which could be a factor.

Suggest you download and install VirtualBox then get three instances of a guest OS installed ... a Ubuntu, a CentOS, and a Debian.   Go after the latest Long Term Support versions of the OS for each mentioned.   Then learn how to set up the big 3 ... apache/nginx, MySQL/MariaDB, and PHP.

You will find more info in Moodle docs about Ubuntu, BTW.

Those would be standalones - nothing hidden from you then.

When it comes to Moodle, learn how to install and maintain with git and I wouldn't go any lower than the current LTS version of Moodle ... think that is currently 3.5.highest.  

Now when it comes to VPS's or Dedicated servers from providers, have to remember they might be based on one of the 3 OS's mentioned, but what you are getting really is that providers vision of what's needed to host the most apps from their images ... pre-built with an OS, apache/nginx, MySQL/MariaDB, and PHP.

What one learns from your VB experience provides info for your questions ... but caution ... with providers you won't be asking questions of engineers but of sales folks. Can't tell ya the number of times I asked a technical question of a sales contact, heard back they didn't know but would ask an engineer and get back ... and never heard from them again.

It's a journey ... never ending! smile

'SoS', Ken

Average of ratings: Useful (1)
In reply to Ken Task

Re: Installation help (wordpress - moodle on the same server)

by James Steerpike -
Picture of Particularly helpful Moodlers

You can't beat the knowledge you get from setting up your own server.  Most of my skills have come from repeated ( and I mean many many times) installs of Lamp stacks and Moodle. My preference is Digitalocean for both low price and ease of wiping and starting all over. There are some excellent tutorials which will take you step by step through the install. At first the instructions are a mystery but soon you can understand why you are doing that step

I started with Debian and switched to Ubuntu. I didn't notice any difference as Ubuntu is Debian based.  I have never tried Centos as there doesn't seem to be any Moodle documentation as good as the Ubuntu Step by Step guide. Strength of support from tutorials and forums are I think the main reason for choosing an OS.

I run my production instance on a Digitalocean droplet. Something to be said for tinkering in the same environment before deciding everything is robust and ready to face students

Average of ratings: Useful (1)