WAMP Development Machine Setup Note

Install vanilla Apache 2.4, PHP 7.0, MySQL 5.7 separately
Not using XAMPP because I don’t like their structure.
And they run PHP by Apache module, which cause bug and crash (Especially on Laravel).

For my own note (For copy and paste :D)

Updated 2017-05-03: Change to fastcgi setup to prevent Apache crashing

PHP

Installation:
http://windows.php.net/download/
Download VC14 x64 Non-Thread Safe
Extract to C:\PHP
Setting:

Copy C:\PHP\php.ini-development to C:\PHP\php.ini

Edit php.ini, uncomment lines like

extension=php_curl.dll
extension=php_mbstring.dll
extension=php_mysqli.dll
extension=php_openssl.dll
extension=php_pdo_mysql.dll

Apache 2.4

Installation:
http://www.apachelounge.com/download/
Download “Apache 2.4.x Win64”, and extract to C:\Apache\
Download “mod_fcgid” and extract to C:\Apache\modules\mod_fcgid.so

Run command as Administrator:

C:\Apache\bin\httpd.exe -k install

Setting:
Enable PHP
Create C:\Apache\conf\extra\httpd-php7.conf

LoadModule fcgid_module modules/mod_fcgid.so

<IfModule fcgid_module>
   FcgidMaxProcesses 300
   FcgidMaxProcessesPerClass 300

   FcgidOutputBufferSize 65536
   FcgidConnectTimeout 10
   FcgidProcessLifeTime 0
   FcgidMaxRequestsPerProcess 0
   FcgidMinProcessesPerClass 0
   FcgidFixPathinfo 0
   FcgidProcessLifeTime 0
   FcgidZombieScanInterval 20
   FcgidMaxRequestLen 536870912
   FcgidIOTimeout 120
   FcgidTimeScore 3

   FcgidPassHeader Authorization

   FcgidInitialEnv PHPRC "C:\\PHP"
   FcgidInitialEnv PATH "C:\\PHP;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;"
   FcgidInitialEnv SystemRoot "C:\\Windows"
   FcgidInitialEnv SystemDrive "C:"
   FcgidInitialEnv TEMP "C:\\WINDOWS\\TEMP"
   FcgidInitialEnv TMP "C:\\WINDOWS\\TEMP"
   FcgidInitialEnv windir "C:\\WINDOWS"

   DirectoryIndex index.html index.htm index.php

   <Files ~ "\.php$">
      Options Indexes FollowSymLinks ExecCGI
      AddHandler fcgid-script .php
      FcgidWrapper "C:/PHP/php-cgi.exe" .php
   </Files>
</IfModule>

Edit C:\Apache\conf\httpd.conf, Add

# PHP7
Include conf/extra/httpd-php7.conf

Enable .htaccess (Optional)
Find <Directory "C:/Apache/htdocs">
Change

AllowOverride None

to

AllowOverride All

Uncomment Lines like:

LoadModule rewrite_module modules/mod_rewrite.so

Enable VHost (Optional)
Uncomment

Include conf/extra/httpd-vhosts.conf

Test PHP

Create C:\Apache\htdocs\phpinfo.php

<?php
phpinfo();

MySQL / MariaDB

https://dev.mysql.com/downloads/installer/
OR
https://downloads.mariadb.org/
Download MSI Package Windows x86_64

PHP XDebug (Optional)

https://xdebug.org/wizard.php
Just follow instruction

3 Replies to “WAMP Development Machine Setup Note”

  1. The the next occasion I read a weblog, Lets hope so it doesnt disappoint me as much as this. I am talking about, I know it was my choice to read, but I personally thought youd have some thing intriguing to say. All I hear is a lot of whining about something you could fix if you werent too busy trying to find attention.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.