Moodle 2.3 to 2.6.1+ for Windows comes with pieces of XAMPP 1.7.4. Although it works well, the version of PHP that comes included with it is buggy, lacks some key features for development such as a modern control panel and phpMyAdmin.
Here is how you can fix some of the problem and upgrade your environment.
Upgrading PHP
What prompted me to look into this was that Apache was constantly crashing and the following message appeared my Apache error log:
[notice] Parent: child process exited with status 3221225477 --- Restarting.
Here is how to upgrade PHP:
- Download PHP 5.3.29 -- be sure to get the "Thread Safe" .zip package not the installer and NOT the Non Thread Safe. version.
- Unzip the contents to the php subfolder of your XAMPP installation directory, overwriting the files which are already present
- Copy the following files found in the php folder into the apache\bin folder: icutu49.dll icudt49.dll icuin49.dll, libeay32.dll and ssleay32.dll
- Copy the following files found in the php folder into the apache\modules folder: php5apache2_2_filter.dll and php5apache2_2.dll. For Apache 2.4, it would be just php5apache2_4.dll as there is no php5apache2_4_filter.dll.
- Edit the php.ini file found in the php folder and make the following changes:
-- Add a semi-colon in front of the following line: extension=php_ming.dll
Since applying this upgrade, Apache hasn't crashed and, in fact, is now much faster 🙂
Tip: If you use zend_extension's, you may also need to remove the path from the DLL depending on whether extension_dir setting has been set in your php.ini file. For example, change:
zend_extension = "\xampp\php\ext\php_opcache.dll"
…to simply:
zend_extension = "php_opcache.dll"
Upgrading XAMPP Control Panel
XAMPP 1.7.4 came with XAMPP Control Panel v2.5 which is virtually featureless. Complete the following steps to discover the wonders of CPL 3.2.1:
- Download Contol Panel version 3.2.1.
- Extract the files and copy the following into the root of your xampp folder:
-- Files: xampp-control3.exe, catalina_stop.bat, catalina_service.bat and catalina_start.bat
-- Folders: locale
Visit ApacheFriends to locate the latest version and a list of changes (v2.5 isn't even listed in the changelog anymore!).
Adding phpMyAdmin
[To do]
Upgrading Apache
[To do]
Moodle packages for Windows includes Apache 2.2.7. Upgrading it and still having Apache RewriteRule still work is a little more challenging of an upgrade. If you have done it successfully with Moodle, let me know. Otherwise I will add the information when I get around to figuring it out.
Upgrading MySQL to MariaDB
See How to upgrade MySQL to MariaDB in 5 Minutes on Windows.
September 21, 2014 at 4:49 AM
Hi Michael,
Thanks so much for this advice. I have been having exactly the same problem with a crashing Apache server. Fingers crossed that this will do the trick.
Before I implement it though – I am running Apache 2.4, not 2.2 and there is no php5apache2_4_filter.dll file in my php directory. All the others you have listed for 2.2 are there in 2.4 form. Do you happen to know if this file is not required or has it been replaced by something else?
Thanks again for your article.
Peter
September 21, 2014 at 9:24 PM
Hi Peter,
You are welcome. Glad you found the article useful.
You are right, there is no php5apache2_4_filter.dll. Though I haven’t tried it myself, I can’t imagine that it is required since it doesn’t exist. I’ve looked all over for one and have yet to find any mention of it.
By the way, if you make a backup copy of your Apache and PHP folders before starting (example, apache.backup and php.backup) and things don’t work out, you can easily put everything back the way it was by deleting the modified apache and php folders and renaming your original ones back to the way they were.
Thanks again for your feedback and question. I really appreciate hearing from folks like you. Let me know how it works out for you with Apache 2.4.
Best regards,
Michael