I am running Moodle 4.1.3+ on a MacBook Pro (macOS Ventura 13.3.1) using MAMP Version 6.3.
I set up this install 2 years ago following Rick Jerz's instruction video to install Moodle on a Sandbox - Mac (
).
At that time, I installed Moodle 3.10.2 and, subsequently, I followed the upgrading notes provided by Rick (don't have the reference) through every Moodle upgrade to 4.1.3+. However, those steps will not work for the upgrade to 4.2+.
It appears that MAMP 6.3, which I am using, does not have the correct MySQL database, which apparently is 8.
I checked the MAMP website and the latest version of MAMP 6.8 also does not have MySQL 8.
Does this mean that I cannot upgrade to 4.2+ using MAMP on my MacBook?
Dan
Hi Dan, it's Rick.
Here's the problem. Moodle 4.2 requires MySQL 8, which MAMP doesn't provide, yet.
But, there is a workaround. Go to htdocs/your moodle 4/admin folder. In it, you will see an "environment.xml" file. Edit this file using any text editor. Search for version="4.2". Below this, you will see the required versions of various databases. I assume that your MAMP uses MySQL. So, edit the line for name=mysql, and change this to your MySQL version. In my case, it becomes version=5.7.34. Save the file, and Moodle 4.2 should work if you have ungraded correctly and don't have a plugin that is incompatible with Moodle 4.2.
I asked about this in a post and was told that Moodle 4.2 doesn't use anything specific in MySQL 8, yet.
Here's the problem. Moodle 4.2 requires MySQL 8, which MAMP doesn't provide, yet.
But, there is a workaround. Go to htdocs/your moodle 4/admin folder. In it, you will see an "environment.xml" file. Edit this file using any text editor. Search for version="4.2". Below this, you will see the required versions of various databases. I assume that your MAMP uses MySQL. So, edit the line for name=mysql, and change this to your MySQL version. In my case, it becomes version=5.7.34. Save the file, and Moodle 4.2 should work if you have ungraded correctly and don't have a plugin that is incompatible with Moodle 4.2.
I asked about this in a post and was told that Moodle 4.2 doesn't use anything specific in MySQL 8, yet.
Below is how this line appears in my text editor.
Incidentally, I happen to be vacationing in Pittsburgh right now. You might know Pittsburgh, too.
Hi Rick,
Thanks very much for your input.
Thanks very much for your input.
I am close to Moodle 4.2+ running on my MacBook except for the error "php_extension gd" must be installed and enabled. I can't spend more time on it right now and will return to this issue later this afternoon.
Yes, I am in Pittsburgh, though lived most of my adult life in British Columbia, Canada. My wife is a native Pittsburgher. Hope you are enjoying your vacation here. Nice weather finally!
Dan
That gd extension is supposed to be bundled in MAMP. I have never done anything to enable it. So you have me puzzled.
Rick,
I successfully upgraded to MAMP ver 6.8; hoping that would provide the necessary PHP gd extension. So, I am running Moodle 4.1.3+ on MAMP 6.8 with no problem. Started the upgrade to 4.2+. I made the changes to "environment.xml" to deal with the MySQL issue. However, MAMP 6.8 only allows two PHP versions 7.4.33 and 8.2 through its GUI. Moodle 4.2+ crashes on PHP version 8.2. I receive an error message that there is a problem in /Applications/MAMP/htdocs/moodle/cache/classes/config.php at line 146 (and am not able to decipher the code at that line). Anyway, returned my Moodle installation to 4.1.3+ for now.
I successfully upgraded to MAMP ver 6.8; hoping that would provide the necessary PHP gd extension. So, I am running Moodle 4.1.3+ on MAMP 6.8 with no problem. Started the upgrade to 4.2+. I made the changes to "environment.xml" to deal with the MySQL issue. However, MAMP 6.8 only allows two PHP versions 7.4.33 and 8.2 through its GUI. Moodle 4.2+ crashes on PHP version 8.2. I receive an error message that there is a problem in /Applications/MAMP/htdocs/moodle/cache/classes/config.php at line 146 (and am not able to decipher the code at that line). Anyway, returned my Moodle installation to 4.1.3+ for now.
Dan