Unable to install

Unable to install

by Gabri Z -
Number of replies: 36

Hi, 
 I'm going to manually install Moodle from scratch (for those who followed my previous post, it turns out that production server is very different from test one, it allows me to create moodledata outside root and has no Softaculous available). Good. 

I have created moodledata one level above website 'root'.
I have copied all files in website root and checked that files have 644 permissions and folder 755
I navigate to the website  and get an Error 404. I have also tried to open specific files (.e. index.php or install.php) still get Error 404 message.
What could be the issue? Shouldn't the installer start?

Average of ratings: -
In reply to Gabri Z

Re: Unable to install

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
I don't see any indication from you that you created a database.

Also, more details about how you are installing on your server would be helpful. Which Moodle version? Are you installing to a hosted server? Have you made sure that your server meets all minimum Moodle requirements? What database are you using? How did you copy the files?
In reply to Rick Jerz

Ri: Re: Unable to install

by Gabri Z -
I have a MySQL database ready, but the installation does not start. I don't even reach the point where I enter DB infos.
I am installing on a hosted server, yes. Hosted by Aruba, an italian provider. I have copied the files with FileZilla.
In reply to Gabri Z

Re: Ri: Re: Unable to install

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
Typically, FileZilla fails at moving all of the many moodle files. This could be your problem.
In reply to Gabri Z

Re: Unable to install

by Ken Task -
Picture of Particularly helpful Moodlers

I don't think it would be a privacy nor security issue to share at least where we are trying to install a moodle.   Provider is?  Operating system is?

Is this 'production' hosting aleady providing a web application firewall?

One could provide specific instructions or corrections to docs one might find to use to install due to environment.   Nginx?  Apache as a _?   Locate web service logs .... especially the error log ... there should be a clue in there! smile

Rick might be onto something ... did you create a blank database before attempting to install?

'SoS', Ken

In reply to Ken Task

Ri: Re: Unable to install

by Gabri Z -
Provider is Aruba (an italian provider).
About firewall, I don't see any in Plesk dashboard.
I see PHP is 7.4.18
I see there are Apache and nginx settings but I know nothing about managing a web server. Only experience with Apache I have is editing .htaccess file.
In reply to Gabri Z

Ri: Unable to install

by Gabri Z -
UPDATE: I've contacted support, and while it's not Softaculous, there's the option to install Moodle from the "Application" section in the Plesk panel. I think I'll go this way, thank you.
In reply to Gabri Z

Re: Ri: Unable to install

by Ken Task -
Picture of Particularly helpful Moodlers

Could be 'outta the pan' and into the fire ... kinda.  Plesk is a panel like cPanel.

This might help:

https://docs.plesk.com/en-US/12.5/customer-guide/websites-and-domains/web-applications/installing-apps.72341/

I have been into an OVH hosted server using Plesk before.   IF Aruba hosting is same there might be an additional tweak to open_base_directory setting so that one can place moodledata outside of document root for apache.

So the plesk installer will get you up and running ... but what of near future updating and upgrading?   Does Plesk have a clickable tool for updating and/or upgrading?

https://docs.moodle.org/dev/Releases#Moodle_3.10

Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months)
A non-LTS version.

https://docs.moodle.org/dev/Roadmap#Moodle_4.0_in_November_2021

Oh, yeah ... never count out a person that has had K12 experience before working with other industries.   Matter of fact, if you want to stress test a moodle (wp or joomla as well), turn just 5 6th grade students at it! smile

'SoS', Ken

In reply to Gabri Z

Re: Ri: Unable to install

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
My guess is that since you have a hosted server, you might have to use Aruba's auto-installer. My guess is that it will not be the current version of Moodle. My guess is that you might be fine for experimenting, but might have troubles if you try to use this server's Moodle for production. But it is worth a try.
In reply to Gabri Z

Re: Ri: Unable to install

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Thursday exploring Moodle features https://moodle.org/mod/forum/discuss.php?d=421909 (25 posts already), and Friday in to the installation. What is the agenda for today, Saturday? Linux?
wink

Not that any one of them is rocket science, but in combination and in a hurry, would confuse a mere mortal.

Assuming those auto-installers you mentioned give you a supported Moodle version and allow you to install additional plug-ins, it is prudent to delegate the installation part during the first lap and concentrate on Moodle features. In case you have the urge, here are the instructions for installing "from scratch": https://docs.moodle.org/en/Installation. Have fun!

N.B. I don't know whether it is only me - there is a separate forum dedicated to Moodle installation and upgrade.
Average of ratings: Useful (1)
In reply to Visvanath Ratnaweera

Ri: Re: Ri: Unable to install

by Gabri Z -
Thanks for further insight. Look, I had decided on auto-install already. Website must be online wednesday and while I would had preferred to solve the issue and get Moodle installed by me, time is a premium so, that was what I planned to do. BUT. But it was late-ish (11pm) so I decided to stop there, get a cup of tea and go to sleep, postponing any further work to the day after. This morning, after a good sleep I have checked the files in FileZilla, before removing them to prepare to launch the auto install... and noticed my mistake :D
In reply to Gabri Z

Ri: Unable to install

by Gabri Z -
Ok, this is embarassing: issue was caused by the most stupid of errors: I had copied files in the wrong folder.

I am installing "manually" (navigating to url, not Linux command line) and everything is kinda of fine. All server requirements are met, but I get two error messages:
one regarding https: it seems the hosting doesn't use the protocol? How possible?
the other regarding the fact that db doesn't use utf8mb4. I'll check these with the host customer support.

Thanks everyone for the help
In reply to Gabri Z

Ri: Unable to install

by Gabri Z -
Ok, I think I managed to change db collation to utf8mb4. There's a way to find if Moodle is fine with mySQL settings now?
In reply to Gabri Z

Re: Ri: Unable to install

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
Gabri, not trying to be critical at all, I see that you are a novice at some of these things, and you are doing a good job learning little by little. This learning will help you manage your Moodle.

First, Moodle is easy to install on a server that meets Moodle's requirements. It appears to me that your server might not. Many hosted servers do not.

Second, although an "auto-installer" might work, they fail in the long run. Good to see you trying to install Moodle on your own.

Third, you are trying to learn both "server" and "Moodle" stuff at the same time.  This can take a while.  Your problems, and questions, are quite broad.  For example, someone might ask "How do I get from point A to point B?"  We then ask, "Are you walking, driving a car, by ship, train, or bike?"  Then if you say by car, we would ask "Do you have the keys?"  "Do you know how to drive?"  I think you get the point.

Which Moodle installation docs are you following. I ask because of your "utf8mb4" comment about your database.

As you can see, there are folks here on Moodle.org that will help guide you. There are many different kinds of servers, and for example, my server uses cPanel and not Plesk. So I can't help you via Plesk. As a suggestion, you might want to include some screenshots so that we know what you are seeing. Our eyes only see your words, but a picture every once in a while might help.
In reply to Rick Jerz

Ri: Re: Ri: Unable to install

by Gabri Z -
Thank you.

I am following this guide: https://docs.moodle.org/35/it/Installare_Moodle
That as far as I can tell, it's a direct translation of this one here: https://docs.moodle.org/310/en/Installing_Moodle

Server seems to meet all requirements. During install I had all green markings on server requirements, besides the two warnings mentioned above, that did not prevented installation anyway.

Warnings I got during installation were (roughly translated back from italian):

1) The site does not use the secure HTTPS protocol. It is strongly recommended to configure the site in HTTPS to increase its security and facilitate integration with other systems.

2) MySQL and MariaDB are set to use 'utf8'. This character set does not support four-byte characters where some emoticons are included and its use will cause errors while saving to the database, resulting in data loss. Please change the character set to 'utf8mb4'. For more information, consult the documentation.

I think I have managed to set MySQL collation to utf8mb4 following this guide:
https://mediatemple.net/community/products/dv/204403914/default-mysql-character-set-and-collation
(Actually, compared to the guide, PHPMyAdmin allowed me to change DB and Table collation at once).
In reply to Gabri Z

Re: Ri: Re: Ri: Unable to install

by Ken Task -
Picture of Particularly helpful Moodlers

Do get a cert for server now as any development in Moodle will currently record http:// and that will make re-config a little more difficult ... last thing you need considering time other factors, etc..

Getting cert for server depends upon hosting ... and panel ... so maybe this will help:

https://support.plesk.com/hc/en-us/articles/213946825-How-to-install-an-SSL-certificate-for-a-domain-in-Plesk-Let-s-Encrypt-other-certificate-authorities-

You are gaining on it!

After getting cert, might be a really good time to do a site backup ... code, DB dump, + moodledata.

'SoS', Ken


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

Ri: Re: Ri: Re: Ri: Unable to install

by Gabri Z -
Yes, I am waiting to perform the "Remaining tasks" in the guide to have both issues fixed, too.

I have a "SSL/TLS Certificates" item in my Plesk panel. Accessing the area there's a button "get one free". This should solve the issue, but while I have worked with PHPMyAdmin in the past, I know nothing about server managemet and SSL certificates, so I am less confident on clicking random stuff. I am waiting a reply from the customer support (that is ignoring me, it seems) to have confirmation that that will solve my issue.
In reply to Gabri Z

Re: Ri: Re: Ri: Unable to install

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
Just a few notes about the database. You cannot have both MySQL and MariaDB running. It's one or the other.
The collation should be set to utf8mb4_unicode_ci.
Does your database have both a user and a password? Both will be needed to install Moodle.
I don't seem to see you telling us which version of Moodle you are trying to install?
What is the type, and the version number of your database? A screenshot confirming this would be helpful.
A screenshot showing that your have created the moodledata folder would be helpful. Are you using FileManager in Plesk?

Follow Ken's ideas about an SSL certificate.

Do you know that your server is really up and running? When you go to www.yourdomain.com, does anything show?

(I am traveling this weekend and may not be able to guide you. But others here might help.)
In reply to Rick Jerz

Ri: Re: Ri: Re: Ri: Unable to install

by Gabri Z -
Hi Rick, thank you.

I have managed to install Moodle already. Version is 3.10.3
Database is MySQL, don't know the version.

Collation is
character_set_database: utf8mb4
collation_database: utf8mb4_unicode_ci

I do have created moodledata and it has been correctly recognized by the install process.

If I go to www.yourdomain.com I see Moodle frontpage (with a security warning as I have not set up https yet).
In reply to Gabri Z

Re: Ri: Re: Ri: Re: Ri: Unable to install

by Ken Task -
Picture of Particularly helpful Moodlers

The following is of no help now, but, IMHO, should be added to docs on installing .... visiable/seen on the URL below and not off on some other page.

Installing Moodle
https://docs.moodle.org/310/en/Installing_Moodle

Concept: Begin with the end in mind!

In the section entitled:

Set up your server

Two suggested steps (and in order) that should be prelim to the next section
in installing a moodle.

1. Get a fully qualified domain name for your server

Justification: config.php requires a definition for how the site will be
accessed.  Using an IP address upon initial install will have to be changed and
if one does begin with the end in mind, using IP address means a re-visit and extra steps to correct.

2. get a valid certification for the site.

Justification: config.php has requires a definition for host the site will be
accessed (URL) that includes http:// or https:// - the latter is protocol used
to access a secure site.   Make sure port 443 is opened in firewall and that your web service can respond to https://.

Free cert LetsEncrypt or commercial.  Hosting provider should be able to help with either.

Then next step ..
Download and copy files into place

Wiki or not ... anyone can edit or not (nope, not me, thanks!) smile

'SoS', Ken

Average of ratings: Useful (1)
In reply to Gabri Z

Re: Ri: Re: Ri: Re: Ri: Unable to install

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
Gabri, it appears that you might just about be there, except for your SSL certificate. Let us know your success, when finished.
In reply to Gabri Z

Ri: Unable to install

by Gabri Z -
UPDATE: Imanaged to activate SSL protection (wasn't that hard 😀) but now Moodle site looks like it "lost" connection to CSS...

[EDIT]
Solved! Thanks to Ken's comment above regarding config.php 👍
Just downloaded it and changed http into https.
In reply to Gabri Z

Ri: Unable to install

by Gabri Z -
Now I have to activate cron, but I'm at a total loss. It seems I have to execute it by command line, but I see no terminal in Plesk. How I am supposed to do so?
In reply to Gabri Z

Re: Ri: Unable to install

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
My guess (since I don't have Plesk but have cPanel) is that there is a tool in Plesk for "cron." Others might know.

Put "create a cron job in Plesk" into your search engine. I found:
https://support.plesk.com/hc/en-us/articles/115003121073-How-to-add-a-scheduled-task-in-Plesk-UI-using-crontab-syntax-

I found this video on YouTube: 
Average of ratings: Useful (1)
In reply to Rick Jerz

Ri: Re: Ri: Unable to install

by Gabri Z -
Yeah, I found it already, thank you! Sorry, didn't update the discussion.
My issue now is that maximum run frequency option available is once per hour.
There is a "cron style" option that allows to enter some text, possibly the solution lies there, but not sure how to express once evey minute.
I have contacted support to see how to get around this.

[EDIT]
I've possibly solved this issue, too:
https://support.plesk.com/hc/en-us/articles/115003372214-How-to-set-up-a-task-to-be-executed-every-X-minutes-on-a-Plesk-server-


Now it's time for a new challenge: update (Moodle is warning me that 3.10.4 is out).
In reply to Gabri Z

Re: Ri: Re: Ri: Unable to install

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
I have seen others talk about that 1-hour cron problem on hosted servers. Worst case, stick with the 1-hour. Someday you might want to consider getting a VPS. A VPS will give you much more flexibility. What you are learning will help, too.

Upgrading your moodle might not be too hard. I am not sure if you have been installing a lot of plugins, which could complicate the upgrade.  I made some videos that might help, but I made these using cPanel, not Plesk.

See https://moodle.org/mod/forum/discuss.php?d=401983#p1621924
Average of ratings: Useful (1)
In reply to Rick Jerz

Ri: Re: Ri: Re: Ri: Unable to install

by Gabri Z -
Thank you, I have managed to set cron every 1 minute using the guide above.
In reply to Gabri Z

Ri: Unable to install

by Gabri Z -
One question about upgrading.

Once I have copied the new version files, I have to copy back all themes, plugins, etc. What about plugins I have installed from inside Moodle installer? Even if I have the zip files, how I know where they were copied into?

Also, if I understand it correctly, the Moodle installation directories stay 'clean', only themes and plugins are eventually copied there. All my content (images and files) are in moodledata, so when I update I don't have to bother about these. Is this correct?
In reply to Gabri Z

Re: Ri: Unable to install

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
I cannot answer your questions the way you asked them. And there are many different ways people install their Moodles, so it is hard for me to say.

No, you don't need to worry about Moodle's standard plugins, only those that you have added. How many have you added via the "zip" files?

You do have to worry about your Moodle's config.php file, as I describe in my video about upgrading.
Average of ratings: Useful (1)
In reply to Rick Jerz

Ri: Re: Ri: Unable to install

by Gabri Z -
Thanks Rick. I am aware of config.php, thank you very much.

I have installed just one plugin by uploading its zip file directly from within Moodle. The one that adds Zoom support.

All other stuff I have added were shipped with the theme and I have manually uploaded via FTP in their respective folders, then updated DB from Moodle admin area.

My doubt is: since Zoom plugin has been already installed, I cannot re-install it from within Moodle, am I correct? I just need the files where they are supposed to be.
Problem is: the plugin zip file doesn't tell me where it is supposed to be unpacked (compared to the theme that has all the stuff I need to copy in their parent directories (i.e. theme itself in /themes, additional blocks in /blocks, and so on).
In reply to Gabri Z

Re: Ri: Re: Ri: Unable to install

by Ken Task -
Picture of Particularly helpful Moodlers

Pardon intrusion ... now that you've installed addon plugins and are beginning to add users etc., it's time for a full site backup ... that's an archive of code directory, a database dump, and minimal moodledata/filedir/

Best way to do a full site backup is command line, but you've already said you have no Terminal icon in Plesk.    Thus it is imagined that you will have to use Plesk file browser + PHPMyAdmin to accomplish.

Consult providers FAQ's or Knowledge base and/or Plesk docs.

Do make sure you have enough space to make a full site backup.   No one can tell you if you do ... no one could guess about the size of your DB dump nor moodledata/filedir ... so don't ask.

Plesk file browser might help with size of moodledata/filedir/ ... Plesk might also have some info about size of database.

*** DO MAKE A BACKUP ***

Moodle releases new code every week ... not sure many moodle server admins get every update when released ... too disruptive ... so strongly suggest you start working out a plan for updates/upgrades.   Talk to your customer.

Ref: https://docs.moodle.org/dev/Releases

'SoS', Ken


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

Re: Ri: Re: Ri: Unable to install

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
I see that Ken just posted, too. Yep, take his advice and do a backup. There are three things to worry about in backing up: 1) Your Moodle database, 2) Your moodledata folder, and 3) Your Moodle application.
In reply to Ken Task

Ri: Re: Ri: Re: Ri: Unable to install

by Gabri Z -
Thanks. I have already made a backup.
Basically it's the same as making backups of WP or Joomla (files+db), just with the addition of moodledata.
In reply to Gabri Z

Re: Ri: Re: Ri: Unable to install

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
I don't use the Zoom plugin, however, I downloaded it to my computer and unzipped it. Then, I looked at the readme.md file, and it says: Install plugin to mod/zoom.

The downloaded plugin file also begins with "mod_", suggesting that it goes into mod.

So, this is where it goes.  You should have a folder moodle/mod. 

Average of ratings: Useful (1)
In reply to Rick Jerz

Ri: Re: Ri: Re: Ri: Unable to install

by Gabri Z -
Oh, I see. Thank you!
In reply to Gabri Z

Re: Ri: Re: Ri: Re: Ri: Unable to install

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
As you are "seeing," Moodle is a very deep product. My guess is that I have "mastered" perhaps 10% of it. You are progressing quite well with your learning, Gabri.
In reply to Rick Jerz

Ri: Re: Ri: Re: Ri: Re: Ri: Unable to install

by Gabri Z -
Thanks for the kind words, Rick!