I'm writing this as much for my own reference as anyone else's. It seems that every time I update Apache, MariaDB, PHP, PHPMyAdmin or some combination thereof, I hit problems that waste hours in the fixing.

At the time of writing, the offending tools are Apache 2.4.34, MariaDB 10.2.9 (silently fails when it finds missing default values, grrr...), PHP 7.2.8 and PMA 4.8.2.

Windows 10, but applies to pretty much any version from XP on.

Apache installed as a service, fails to start

Error #1

In the Windows Event Log :

The Apache2.4 service terminated with the following service-specific error: 
Incorrect function.

Helpful !

To get to the bottom of this, try the Windows Power Shell (the CMD tool will be okay too).

Navigate to your Apache install dir - in my case

cd C:\xampp-7.19\apache

Find the httpd.exe file - usually in /bin

cd bin

Test the syntax :

.\httpd.exe -t

If all is well, you should see :

Syntax OK

Otherwise, there's your first place to start debugging.

Error #2

The output of .\httpd.exe -t

AH00112: Warning: DocumentRoot [F:/Documents/Web Sites] does not exist  (OS 3)The system cannot find the path specified.  : AH02291: Cannot access directory 'F:/Documents/Web Sites/logs/' for error log of vhost defined at C:/xampp-7.19/apache/conf/extra/httpd-vhosts.conf:60 AH00014: Configuration check failed   

 I'm not sure if this is specific to Windows 10, but you can point your "Documents" folder to alternative locations, which might be on another drive or share. In windows explorer, it continues to show as "Documents" but if you right-click it and select "Properties" then "Location", it will show you the actual path, which in my case was "My Documents".

 Sounds like a basic error (and it is) but still took me a while to figure out.

Finallly, some tips rather than fixes :

For PHP, put your config in a separate php.conf file and include it. This means your config will survive updates, assuming you don't delete the file.

For example :

AddHandler application/x-httpd-php .php
AddType application/x-httpd-php .php .html
LoadModule php7_module "c:/xampp-7.19/php/php-7.2.8/php7apache2_4.dll"
PHPIniDir "c:/xampp-7.19/php/php-7.2.8"

This allows you to play with different PHP versions on the same install.

For MariaDB, I recommend installing it separately from XAMPP but you can keep your default config in the XAMPP directory e.g. in Windows Services, set the path to the MySQL executable as :

C:\Program Files\MariaDB 10.2\bin\mysqld.exe" "--defaults-file=c:\xampp\mysql\bin\my.ini" "mysql"