Version 5.7 is required and you are running 5.6.41.84.1 in bluehost - moodle

I installed moodle 4.0 in bluehost recently. When I wanted to install any plugin it giving an error
Version 5.7 is required and you are running 5.6.41.84.1
It needs me to update mysql to 5.7.
When I spoke with my hosting providers, they said to get dedicated or VPS server to get the update. I cannot afford right now.
I tried to upload 3.9 plugin, but no use.
I'm stuck at the movement.

You'll need to install a version of Moodle which uses MySQL 5.6
Moodle 3.8 supports MySQL 5.6
https://docs.moodle.org/dev/Moodle_3.8_release_notes#Database_requirements

It seems Moodle 4.x+ is not using any special feature of MySQL 5.7. I changed the minimum requirements to 5.6 and it works without any issues (Not sure if anything happens in the future though, but all plugins, etc work properly).
Some shared hosings similar to Bluehost are still offering Mysql 5.6.x. The way to get around this limitation is by changing the minimum requirements of Moodle 4.x in its environment settings.
In the "environment.xml" file inside admin directory of Moodle 4.x, change all four occurrences of version="5.7" to version="5.6" as follows:
<DATABASE level="required">
<VENDOR name="mariadb" version="10.4" />
<VENDOR name="mysql" version="5.6" />
<VENDOR name="postgres" version="12" />
<VENDOR name="mssql" version="14.0" />
<VENDOR name="oracle" version="19" />
</DATABASE>

Related

Restore Moodle Backup issues: error reading from database

I am trying to restore a backup of Moodle version 2.7 with PHP 5.5 and MySQL 5.5 from one server to another server with Moodle 3.9 and PHP 7.4 and MySQL 8.0. But I am getting the following error:
I even tried the to change ##default_storage_engine to ##storage_engine in /lib/dml/mysqli_native_moodle_database.php but still not working. I also verified the disk space. There is enough space on the disk.
You need to follow an upgrade path from Moodle 2.7
https://docs.moodle.org/311/en/Upgrading_FAQ#How_do_I_upgrade_from_1.9.x_to_3.11.3F
First install Moodle 2.7.20 on the new server and restore the database.
Then upgrade to Moodle 3.2.9
Then you can upgrade to Moodle 3.9.x
Note that you will need to upgrade any additional plugins that were installed too. I'd recommend doing this at each upgrade stage for each version.
If you haven't already, you will also need to back up the site data folder at the same time as the database backup. The site data folder contains uploaded files, these are not stored in the database. As well as custom languages.
https://docs.moodle.org/39/en/Upgrading

PHP Version upgrade without affecting other host in shared hosting

What are the other option to upgrade PHP Version to latest without affecting other Sub domain
I'm complete new to the server side configuration.I'm working on a project setup at testsubdomain.mydomain.com Which need to use latest versoin of PHP 7. I tried AddHandler AddHandler application/x-httpd-php72 .php .php5 .php4 .php3 it is not working. Our cpanel does not include PHP Version Manager.How to upgrade PHP Version without affecting other sub domains
Better to update your cpanel version to the latest one as well as update Easy Apache 3 to Easy Apache 4 which will then have the PHP multi manager facility with which you will have the PHP 7.x version installed and you can easily change the php version for a specific domain.
You can't. It is because your are using people services. Especially cPanel, it is control by user account. The PHP version is bind to the user account. This is how cPanel works. https://documentation.cpanel.net/display/EA4/PHP+Home#PHPHome-Vendor-providedPHPversions
If you want different version in one server, I suggest you have a dedicated server or VPS then installed with docker. Like that you have different PHP version environment.

Upgrade Moodle 2.5 to Moodle 3.3

I want to upgrade a moodle website currently on version 2.5 to the latest version.
I need to clarify that is it possible to upgrade Moodle 2.5 directly to Moodle 3.3.
OR
As mentioned in the moodle upgradation document
"Note: You can only upgrade to Moodle 3.0 from Moodle 2.2 or later. If upgrading from earlier versions, you must upgrade to 2.2 as a first step."
I can only upgrade to Moodle 3.0.
Please confirm.
Thanks in advance.
In order to upgrade Moodle 2.5 to 3.3, start by backing up your site. This includes:
The Moodle files.
The Moodledata files.
The Moodle database.
Make sure you have everything and that no errors occurred while you were backing it up. If you want to be extra sure, restore it to a different location, maybe even locally on your computer and get it working there. Don't forget to adjust the settings in the config.php file as well as running the Moodle Search and Replace tool (it is not in the Moodle menus). Once you are sure that everything is working, and you still have the original unmodified backup files, you are ready to move on to the next step.
Verify your web server environment
Make sure your web server meets the hardware requirements for Moodle 3.3. Note the changes, especially in memory requirements from 2.5 to 3.3. Also make sure your server meets the software requirements for Moodle 2.7. In fact, when upgrading, it is best to verify the software requirements for every version of Moodle you will be skipping in order to find out which system components you will need to be add before proceeding.
Also, before you get started, make sure any 3rd party plugin and themes added to your site will be compatible with Moodle 2.7 and Moodle 3.3. If not, you will need to upgrade these first. If they are not available for the newer releases of Moodle, check with the maintainer of the plugin/theme to see if there might be an updated version forthcoming. If not, you will either need to fix any problems in the code yourself that may come up, switch to another similar plugin that provides similar functionality or remove the plugin completely.
Re-creating .git
The easiest way to upgrade Moodle is using Git. If Moodle was not installed using the "git clone" command, your installation will likely be missing the .git directory. You can check this by using the "git status" command. If you already have a .git folder, you can skip this section and go straight to Upgrade to Moodle 2.7. Otherwise, here is how you can re-create it:
Take note of the build date for your current Moodle installation. You'll find this on its Notification page near the bottom of the page.
Re-create your .git folder using the following commands:
# git clone a new copy of Moodle into another location
git clone git://git.moodle.org/moodle.git
# Checkout Moodle 2.5 (the version of your current site).
cd moodle
git checkout MOODLE_25_STABLE
Look through the log for a weekly release that is dated the same as your build number. The build number is a date in the following format: YYYYMMDD. Take note of the related commit number.
Next, rollback the files to the commit number of the build. Replace "56e05fced" with the actual commit number.
git reset 56e05fced
Once this is done, copy the just the .git folder into the web root of your current Moodle site.
Upgrading to Moodle 2.7
Before you get started, make sure any 3rd party plugin and themes added to your site will be compatible with Moodle 2.7. If not, you will need to upgrade these first.
git checkout MOODLE_27_STABLE
Login to your website as an administrator. You should see prompts that will guide you through the process of upgrading Moodle.
IMPORTANT: Up to this point, you could just roll back the files and everything should be back to the way it was. Once you move beyond this point, the only way to revert your website will be to delete the whole site and restore the backups you made earlier of your site's files and database.
Follow the prompts to upgrade the database. Be prepared as you may need to upgrade some of the plugins as well or make some upgrades to your web server and/or database environment.
Once you have everything running again, it will be time to upgrade to Moodle 3.3.
Upgrading to Moodle 3.3
Have you upgraded to Moodle 2.7 yet? If not, go back and complete that step first. Don't forget to make sure your web server meets the hardware requirements for Moodle 3.3.
Make sure your server meets the software requirements for Moodle 3.3 in order to successfully complete the upgrade from Moodle 2.7.
Next, upgrade Moodle from 2.7 to 3.3:
# Enable version tracking so that it is easier to upgrade Moodle in the future.
git branch --track MOODLE_33_STABLE origin/MOODLE_33_STABLE
# Upgrade Moodle to version 3.3.
git checkout MOODLE_33_STABLE
As you did before for Moodle 2.7, Login to your website as an administrator. You should see prompts that your database is about to be upgraded. If not, go to the Notifications page under Site Administration. Follow the prompts again to upgrade the database. As before, be prepared as you may need to upgrade more plugins and themes, and will likely need to make some upgrades to your web server and/or database environment.
That's it. If you followed the above instructions, your Moodle 2.5 site should now be upgraded to Moodle 3.3. To get the most out of your upgraded site, be sure to at least read the New Features page for each version of Moodle from 2.6 to 3.3.
To upgrade your site to newer bug/security release of Moodle 3.3, you will need to repeat some of the instructions. Essentially it will involve:
Backing up your site files (moodle and moodledata) and database.
Using the "git pull" command from within your Moodle folder.
Logging in as an administrator and following the upgrade prompts from the Site Administration > Notification page.
Verifying that everything on your site still work as expected.
Bug and security fixes come out every week but are only officially release every 2 months.
Hope you find this information useful.
Best regards,
Michael Milette
Per the upgrade documentation for 3.3 it says "You can only upgrade to Moodle 3.3 from Moodle 2.7 or later." https://docs.moodle.org/33/en/Upgrading
So you must first do an upgrade to v2.7 before you can do an upgrade to v3.3
Also note in the v2.7 upgrade documentation it says "You can only upgrade to Moodle 2.7 from Moodle 2.2 or later." https://docs.moodle.org/27/en/Upgrading
Personally I have found less problems when I do upgrades in smaller jumps. So in your case 2.5 to 2.7.20 is a requirement. In theory you could then go from 2.7.20 all the way to 3.3 but you may want to consider 2.7.20 > 3.0.10 then 3.0.10 > 3.3
I can say that I have actually upgraded Moodle 2.3, and Moodle 2.5 successfully to 3.x, though not 3.3 specifically.
That being said, you have to also take the following considerations:
Are you up to the minimal PHP version? (5.6.something)
Do you have the new modules required by 3.x version (3.3 added a few I think)
Are your modules ready for 3.x?
If you aren't sure of any of these, I would go grab a Vagrant/VirtualBox/Docker setup of Moodle, stage your current site (i.e. install it with the same software you have installed on your production server), and upgrade it locally to ensure everything goes as planned.
First you backed up before any moodle 2.5 upgrade.
Then download new moodle 3.3
After then unzip folder
go to xampp->htdocs->your project
paste and override new folder
Copy your old config.php file back to the new Moodle directory
Sometimes, the environment may cause issues, sometimes the Moodle versions. I have faced both. But managed to upgrade. Last time for upgrade to 3.9.2 installed the old version to local server for reference and did a clean install on the cloud. I have upgraded Moodle 2.x to 3.2 for a couple of institutions. Please feel free to contact if needed.
Few steps to consider in this
Take backup of Moodle app, Moodledata and DataBase
You have to follow the upgrade process twice
First you need to upgrade from moodle 2.5 to moodle 3.0
Now you can upgrade you new moodle 3.0 to moodle 3.3

Install YII2 on Centos 7

I read that it was impossible to install yii2 on a standard hosting platform (redhat, centos...) without deleting the AssetManager.
And install is lock with it. Access refused, permission denied.... Despite the rights 777 on the assets folder.
And in default way, hack code, disable control like (is_writable) to allow continued the install process to congratulation, but without css ....
But I can't modify all the code , to use it?
They're a lot of issue about assetmanager.
I tried yii1 few years ago, and it was wonderful framework... But everything is permitted under windows. Someone tried to install it under redhat, fedora, Centos.
There is a specific configuration ... Or yii2 not builted and designed for theses environments ?
Because i found tuto about laravel 5.1, Zend 2 since 2013... But nothing about Yii2, and only one... about Yii1... on this hosting OS.
Yii2 is ready for professionnel standard hosting environnement or is just for hobbist with Wamp under Windows ? (Online tuto is in majority on this OS, with Wamp...).
And maybe for that, it's work fine... like i test under windows
Thank you for the links. I had read
Finally I found the answer, which is never explained in the tutorial above (because often disabled and the module is not present in Ubuntu or Debian)
It's SELinux security. To install Yii2 there are the following commands:
semanage fcontext -a -t httpd_sys_rw_content_t 'each folder writable'
setsebool -P httpd_unified 1
Without this open rignt, you can't install Yii2
All what Yii 2.0 requires is a Web server supporting PHP 5.4 or above.
( currently not PHP 7 due to reserved word conflict that will be solved in future releases )
And yes 5 stables versions ready for production has been released, currently Yii 2.0.5
Here is a quick example about how to install Yii2 with CentOS6 which has nothing different from what is already described in the official docs.
If you know any CentOS related issue please post them and we will discuss answers, because sincerely i just did few searches and didn't found any besides few wrong apache or nginx configurations or missing packages like this CentoOS7 case. Otherwise if you need a pre-configured & working VM with Yii2 and CentOS 7, then you may check this vagrant repo.

Can't login into development copy of Typo3

I'd like to create a local copy on my Windows 8 machine to further develop existing extensions and test upcoming updates of a Typo3 6.1.7 installation. I tared everything up including the MySQL DB dump, extracted it into a fresh install of XAMPP and imported the database. After adjusting the DB and OpenSSL settings in the LocalConfiguration.php I tried to login with my password, but I get a message stating my credentials must be wrong.
The LoginSecurity on BE is configured with RSA, and the InstallTool states that my OpenSSL config is running correct. Then why can't I login? What did I miss?
Searching what could be wrong I looked at the requirements for Typo3 6.1.x, and it clearly states that it supports MySQL 5.5.x. Sure enough, the freshly installed XAMPP uses MySQL 5.6. I removed it, installed the other current XAMPP package with MySQL 5.5 and now it works.