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.