Skip to content

Instantly share code, notes, and snippets.

@Fusion86
Last active October 14, 2020 16:58
Show Gist options
  • Save Fusion86/a87089c156fa0b62fa2cf0994091c7da to your computer and use it in GitHub Desktop.
Save Fusion86/a87089c156fa0b62fa2cf0994091c7da to your computer and use it in GitHub Desktop.
Kerntaak - Windows, Apache, MySQL, PHP, PHPMyAdmin (Manual)

Manually install Apache, MySQL, PHP and PHPMyAdmin

Or A noob's guide to pass the Wietingen test.
For Windows, but works for others as well (with a few minor changes, mainly the paths)

Apache

  • Download
  • Extract in C:\Apache24
  • Go to C:\Apache24\bin
  • Install Apache as a service httpd.exe -k install (Run as admin)
  • Open ApacheMonitor.exe

PHP 5.6

  • Download
  • Extract in C:\Apache24\php

MySQL Community Installer

  • Download
  • Run and install the Server Only package
  • Keep all the settings on default and set the root user's password to something you can remember (like: password)

Apache config

In ./config/httpd.conf

  • Add LoadModule php5_module php/php5apache2_4.dll
  • Add AddType application/x-httpd-php .php at the bottom of <IfModule mime_module>
  • Add PHPIniDir "c:\Apache24\php" to the bottom of the file

PHP config

  • Copy php.ini-production and rename to php.ini
  • Set the doc_root = line to doc_root = c:\apache24\htdocs in the newly created php.ini
  • Uncomment the ; extension_dir = "ext" line, and change it to extension_dir = "C:\Apache24\php\ext" or wherever you installed PHP, make sure the path is absolute!
  • Enable extension=php_pdo_mysql.dll, extension=php_mysqli and extension=php_mbstring.dll (by removing the ; at the start of the line)
  • You should now be able to start the Apache service throught ApacheMonitor

Time to test some stuff

  • Make a phpinfo.php in your htdocs folder and paste <?php phpinfo() ?> in it
  • Go to http://localhost/phpinfo.php, there should be a long list with info. If you see just a blank page with the code we pasted in it then your PHP is not working. Read the above stuff again and fix it before continuing past this point

PHPMyAdmin

  • Download
  • Extract in ./htdocs/phpmyadmin/
  • In the folder ./htdocs/phpmyadmin/ rename config.sample.inc.php to config.inc.php and change the cfg['blowfish_secret'] = '' to cfg['blowfish_secret'] = 'thisismysecret,thishastobeprettylongsojusttypesomerandomcrap'
  • Go to http://localhost/phpmyadmin/index.php and log in with your username and password (if you see a white page then something isn't working right. Check your apache2/logs and google the errors you see)

Problem solving

Check the log in C:\Apache24\logs\error.log if something isn't working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment