Getting Apache2, MySQL and PHP on Windows 10 (WAMP) Applications, WordPress Labs No Comments. WAMP (Windows, Apache2, MySQL and PHP) is an alternative to LAMP (Linux, Apache2, MySQL and PHP), the opensource stack that allows webmasters to create. How to install web server on Windows 10 (Apache 2.4, PHP 7, MySQL 8.0 and phpMyAdmin) 1. Downloading Apache, PHP, MySQL, phpMyAdmin. Download the latest C Redistributable Visual Studio 2017: (direct link to download the 64-bit version, a direct link to the download of the 32-bit version). Apr 04, 2016 In this tutorial, you’ll learn how you can make your own WAMP server by installing Apache, PHP and MySQL server manually on Windows 10. Learn to install Apache, PHP and MYSQL on Windows 10 Machine step by step.
Home » How To » How to Install PHP on Windows 10 Using Web Platform Installer. (Optional) If you need to connect to SQL Server using PHP, you need to install Microsoft Drivers 4.0 (x64) for PHP v7.0 for SQL Server in IIS. Click on Install button. PHP 5.4 series will be the last versions to support Windows XP and Windows 2003. We will not provide binary packages for these Windows versions anymore after PHP 5.4. For users upgrading from PHP 5.3 there is a migration guide available here, detailing the changes between those releases and PHP 5.4.0.
PHP 7.4 builds use Visual Studio 2017
We used Visual Studio 2019 to build the early releases of PHP 7.4 (up to and including 7.4.0beta2). And although Visual Studio 2019 is generally an improvement over Visual Studio 2017, due to compatibility issues we have decided to switch back to Visual Studio 2017 for our PHP 7.4 builds, and we are planning to stick with this for the complete lifetime of PHP 7.4.
Note that it is still possible to use Apache VS16 builds from Apachelounge in combination with PHP 7.4, since VS 2019 is forward compatible with VS 2017.
Our master snapshots are still built with Visual Studio 2019, and we are planning to stick with Visual Studio 2019 for PHP 8.0.
1. Downloading Apache, PHP, MySQL, phpMyAdmin
- Download Apache for Windows: https://www.apachelounge.com/download/
- Download PHP 7 for Windows (select ‘Thread Safe’): http://windows.php.net/qa/
- Download MySQL for Windows (select ZIP Archive): http://dev.mysql.com/downloads/mysql/
- Download phpMyAdmin: https://www.phpmyadmin.net/
- Download the latest Visual C++ Redistributable for Visual Studio 2015-2019: (direct link to download the 64-bit version, a direct link to the download of the 32-bit version).
Now we have files:
- httpd-2.4.29-Win64-VC15.zip
- php-7.2.0-Win32-VC15-x64.zip
- mysql-8.0.11-winx64.zip
- phpMyAdmin-4.7.7-all-languages.zip
- vc_redist.x64.exe
Run and install the vc_redist.x64.exe file, we will not return to it.
2. Create necessary folders
On the drive C create a directory Server; inside it create the bin directory (we will install Apache, PHP, and MySQL there) and data directory (our websites and databases will be located there).
We continue our preparations. In the data directory create two folders:
- DB (database will be stored here)
- htdocs (websites will be stored here)
3. Installation and configuration Apache 2.4 on Windows
Unpack the Apache files (archive httpd-2.4.25-win64-VC14.zip) to the C:Serverbin directory (we are interested only in the Apache24 folder):
After unpacking, go to the c:ServerbinApache24conf folder and open the httpd.conf file with any text editor.
Replace
with
replace
with
replace
with
![Php Php](/uploads/1/2/4/8/124895617/288232294.jpg)
replace
with
replace
with
No stereo mix windows 7. replace
with
and replace
with
Save and close the file. Apache configuration is complete!
Open a command prompt (it can be done by simultaneously pressing Win + X). Select ‘Windows PowerShell (admin)’:
Copy-paste:
and press Enter.
If you see Firewall prompt, select ‘Allow access’.
Also copy-paste and run:
Afterwards in your bowser follow the link http://localhost/ you’ll see something like that
It means:
- Apache works
- directory c:Serverdatahtdocs is empty
You can play with your new shiny web-server: add html-files to the folder, your server is running.
4. Installation and configuration MySQL 8.0 on Windows
In the c:Serverbin folder unpack MySQL archive (the mysql-8.0.11-winx64.zip file). Rename it to mysql-8.0 (just for short).
Go inside the mysql-8.0 folder and create my.ini file. Open this file with any text editor. Copy-paste the following lines:
Save and close it.
Configuration is completed! But we have to initialize and install MySQL 8.0 on Windows. Open Command Prompt (as Admin) and run:
Once the process completed, inside the C:ServerdataDBdata folder automatically generated files should appear:
From now MySQL service will start automatically with every Windows boot.
If initialization failed and there is lack of files in the C:ServerdataDBdata folder and MySQL service failed to start, or in the C:ServerdataDBdata*.err file you got errors like that:
To cope the issue, remove all files from C:ServerdataDBdata folder, and to the my.ini file add the line:
After that initialize MySQL again:
Everyone who has issues with MySQL service, to fix it try to reset MySQL installatoin and install in from scratch:
1. Remove the service:
2. In the c:/Server/data/DB/data/ folder remove all files
3. Initialize and install the service:
If the problem persists please provide the content of the C:ServerdataDBdata*.err file.
5. Installation PHP 7 on Windows
In the c:Serverbin create new PHP folder and copy there the contents of php-7.1.1RC1-Win32-VC14-x64.zip.
Again open the c:ServerbinApache24confhttpd.conf file and append it with lines:
And restart Apache:
In the c:Serverdatahtdocs folder create i.php file and copy to there:
In a browser open the http://localhost/i.php address. If you see something like this, it means PHP works:
6. Configuration PHP 7
In the c:ServerbinPHP folder rename php.ini-development file to php.ini. Open it with a text editor. Find the string
and replace it with
Now find the group of strings:
and replace it with
Now uncomment this group of strings:
They should look like:
Save the file and restart Apache.
7. Installation and configuration phpMyAdmin on Windows
To the c:Serverdatahtdocs folder copy the content of phpMyAdmin-4.6.5.2-all-languages.zip. Rename phpMyAdmin-4.6.5.2-all-languages to phpmyadmin (for brevity).
Php For Windows Server
In the c:Serverdatahtdocsphpmyadmin folder create config.inc.php file and copy there:
Open in your browser http://localhost/phpmyadmin/
Enter root as name, do not fill password. If everything is fine it should look like that:
8. Usage and backup web-server
In the c:Serverdatahtdocs folder put your local web sites, create HTML, PHP and another files. For instance, I created c:Serverdatahtdocstestajax.php file, so this file will be available at the address http://localhost/test/ajax.php and so on.
To create full backup including all web sites and databases, just copy data folder in a save place. If you will need restore your information, with backup you can do it easily.
Before updating web-server modules, backup bin folder, if you will have issues you can fallback to previous versions.
Make backup of the following files, with them you can deploy new instance of the server faster.
- c:ServerbinApache24confhttpd.conf
- c:Serverbinmysql-8.0my.ini
- c:ServerbinPHPphp.ini
- c:Serverdatahtdocsphpmyadminconfig.inc.php
These files keep all settings and when we are installing new web server instance most of the time we are engaged in their editing
9. Extra PHP configuration
Some PHP settings you should know:
It is not necessary to do something with them, but if you are rested into the limits, they will be useful
10. Extra phpMyAdmin configuration
If in phpMyAdmin you see error message:
Follow http://localhost/phpmyadmin/chk_rel.php and click
'Create a database named 'phpmyadmin' and setup the phpMyAdmin configuration storage there'.
You will see:
It means you fixed the problem.
11. Setting up the mail plug
In the C:Serverbin folder, create one more folder named Sendmail. Now in this new folder create a file sendmail.php and copy-paste the following content:
Open the C:ServerbinPHPphp.ini file and append the string:
Save the file and restart your web-server. From this moment every sent letter will be saved in C:ServerbinSendmailemails
12. How to add PHP folder to System PATH in Windows
You should add PHP folder to System PATH, otherwise you will have errors every time you start Apache:
To avoid that, add PHP folder to System PATH. Push the Start (‘Win’) button, start typing ‘Edit the system environment variables’ and open the setting window.
Click the ‘Environment Variables’ button:
In the window ‘System variables’ click on ‘Path’ and later on ‘Edit…’
Click on ‘New’ and type ‘C:ServerbinPHP’:
Lift the record to the very top:
Save changes and close all windows. Restart the server.
13. Configuring cURL in the Apache web server on Windows
If you do not know what cURL is, then you do not need it. So feel free to skip this step.
cURL is a console utility that allows you to exchange data with remote servers using a very large number of protocols. cURL can use cookies and supports authentication. If a web application requires cURL, then this must be specified in the dependencies. For many popular applications, cURL is not required, for example, for phpMyAdmin and WordPress therefore there is no need to configure cURL.
If cURL is not configured correctly, you will get errors:
Or:
To make cURL works in Apache on Windows, you need:
1) Be sure to add the PHP directory to PATH (system environment variables). How to do this said just above: https://miloserdov.org/?p=55#12.
2) In the C:ServerbinPHPphp.ini file the extension=curl line should be uncommented.
3) Download the https://curl.haxx.se/ca/cacert.pem file, then in the C:Server folder create a new folder named certs and move the downloaded file to this new folder (C:Servercerts).
4) In the C:ServerbinPHPphp.ini file find the sting
And replace it with
5) Restart your web-server.
14. Fixing the Asynchronous AcceptEx failed error
When you have hangs, slow traffic and/or when having in your log entries like Asynchronous AcceptEx failed.
You can try the following settings:
15. How to protect the Apache web server from hacking in Windows
Recommended for you 'How to protect the Apache web server from hacking in Windows'.
Php Server Win 10
How to delete web-server Apache from Windows
If you no longer need a web-server installed with this guide, follow the steps below to uninstall it.
Attention: all the web-sites and their databases created on your local web-server will be deleted!
Stop services and remove them from auto start:
Delete the folder C:Server.
Last Updated on
Related articles:
Install Php
- Web server installation guide on Windows: Apache, PHP, MariaDB and phpMyAdmin. How to provide local web server security (100%)
- How to protect the Apache web server from hacking in Windows (100%)
- How to install Apache, PHP, MySQL, and phpMyAdmin on Windows XP (95.7%)
- How to upgrade from MySQL 5 to MySQL 8 (90.9%)
- Kali Linux web server shows blank pages (SOLVED) (82.6%)
- How to extract all web site passwords stored in web bowser (RANDOM - 2.3%)