Manually install Apache PHP MySQL Windows
Need to setup WAMP server or Manually install Apache PHP MySQL Windows a detailed guide on how to install Apache 2.4.x, PHP 5.x or PHP 7.x & MySQL on Any version of windows (Windows 7-8-10). The guide also includes steps for x64 bit Apache & PHP on x64 bit Windows machine. You can take full advantage of your development machine’s hardware resources.
Three Pre-Requisites for Manually install Apache PHP MySQL Windows tutorial:
- VC++ runtimes
First and foremost part of server setup. Apache listens the port 80 by default and serves the web requests.
Apachelounge is our favorite source for Apache Windows builds. To download Apache:
Apache for x64 bit Windows
Apache for x32 bit Windows
After download unzip the the package. Find the Apache24 folder. Copy it and place it on your C: drive (Or any drive of your preference).
Downloading PHP is the second part of manually install apache php mysql windows guide. PHP has started developing x64 bit build for windows os lately. We can go for x32 bit or x64 bit windows built.
To Download PHP:
PHP 7 for Windows
Rename php.ini-development to php.ini This will be the configuration file we will be using to configure our php settings.
MySQL will be the final step for application download and installation process. Download MySQL here. The installation is pretty simple and straight froward. Follow the onscreen instructions. This also includes external components auto installation, setup bundles with all required third-party components.
You need to install the VC++ run-time dependencies for Apache to run under windows environment. Download the x86 VC++ for 32-bit windows and x64 VC++ for 64-bit windows.
Open Apahce24 folder that we placed on C: drive(Your preferred location). Locate and open conf folder. Open httpd.conf file under the folder. We prefer Notepad++ for settings configuration. Change the configuration mentioned below to your httpd.conf file. Observe the Line 179-189, Line 242-250, Line 278 & 285 for changes. Download the configurationready httpd.conf file here
# PHP 7 configuration
LoadModule php7_module C:/PHP/php7apache2_4.dll
DirectoryIndex index.html index.php
AddHandler application/x-httpd-php .php
# End PHP 7 configuration
# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other
# <Directory> blocks below.
# Changing settings for virtual host creation
#Require all denied
Options Indexes FollowSymLinks Includes ExecCGI
Allow from all
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
# The Options directive is both complicated and important. Please see
# for more information.
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
# Controls who can get stuff from this server.
Require all granted
Open the PHP directory that you have saved to C: drive (your preferred drive). Find the php.ini file for configuration changes. Look following mentioned section on your php.ini file for changes.
; Maximum execution time of each script, in seconds
; Note: This directive is hardcoded to 0 for the CLI SAPI
max_execution_time = 30000
; Maximum input variable nesting level
; If you need variable nesting in some complex array structures etc...
max_input_nesting_level = 500
; How many GET/POST/COOKIE input variables may be accepted
; To process larger form input values via GET/POST
max_input_vars = 1000
; Maximum size of POST data that PHP will accept.
; Its value may be 0 to disable the limit. It is ignored if POST data reading
; is disabled through enable_post_data_reading.
post_max_size = 100M
; Maximum allowed size for uploaded files.
; Change if for larger size file uploads.
upload_max_filesize = 200M
; Windows Extensions
; Note that ODBC support is built in, so no dll is needed for it.
; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5+)
; extension folders as well as the separate PECL DLL download (PHP 5+).
; Be sure to appropriately set the extension_dir directive.
extension=php_exif.dll ; Must be after mbstring as it depends on it
;extension=php_oci8_12c.dll ; Use with Oracle Database 12c Instant Client
Apache as windows service:
Final step for Manually install Apache PHP MySQL Windows tutorial is to install apache as windows service. It will automatically start while login.
- Open command prompt with administrator privilege
- Goto your Apache24 directory
- cd c:apache24 (If you store Apache24 on C drive)
- Goto bin direcotry
- cd bin
- Fire the following command
- httpd.exe -k install “Apache24”
Advantage of using manual installation:
What benefit you get by following Manually install Apache PHP MySQL Windows tutorial when There are popular software bundles available such as XAMPP and WAMP? The main advantage of is to take advantage of x64 bit windows platform. MySQL Database performance would be the biggest gain and separation of applications is main advantage. You can update individual component without affecting other application bundle. It works and behave more like OS integral part as it works under Linux platform. You don’t need to open any application interface and turn anything on or off.