Install Php Mysql Apache Phpmyadmin Windows 10

  1. Apache Mysql Php Download
  2. Install Php Mysql Apache
  3. How To Install Php Mysql Apache On Linux
  4. Install Mysql On Windows 10
  5. Php Mysql Apache Download
Aug 18, 2015

How install Apache 2.4 PHP 5.6 and MySQL 5.6.26 on Windows 10

How to install and setup PHP and MySql in windows 10 and 7 By installing WAMP server on your windows you can run Apache, PHP, and MySql under a single package. Run sample PHP and MySql script. Windows 10 has been released on the world and so an updated how to guide for installing Apache, PHP and MySQL on the latest release. In this post like previous we will cover installing all the programs individually. Steps to Install PHP 7.0, Apache 2.4.17, & MySQL 5.6 on Ubuntu 15.10, 15.04 & 14.04 LTS operating systems. Can’t install phpmyadmin 🙁.

Windows 10 has been released on the world and so an updated how to guide for installing Apache, PHP and MySQL on the latest release. In this post like previous we will cover installing all the programs individually. This will cover installing 64 bit versions of the programs.

Apache 2.4 Install

First download Apache 2.4 from http://www.apachelounge.com/download/ (httpd-2.4.16-win32.zip) Apache 2.4.16 VC11
This release is supported by the PHP 5.6 install from windows.php.net for Apache 2.4.

Extract the zip and copy it to the root of C:. This will be C:Apache24 when it is all done.

Microsoft Visual C++ 2012 Runtime

Download and install Microsoft Visual C++ VS 2012 x86 from https://support.microsoft.com/en-us/kb/2977003 this is required for Apache to run.

PHP 5.6.12 and higher

Download php-5.6.12-Win32-VC11-x86 from http://windows.php.net/download/ . Extract and rename folder to php and move to C:.

Edit Apache’s config file, c:Apache24confhttpd.conf and add the following lines to the bottom of the file.

Apache Mysql Php Download

2
4
AddHandler application/x-httpd-php.php
PHPIniDir'C:/php'

While we are at it we can add index.php to Apache’s list just incase we want to have a starting page as php.

Find Directory index and add index.php

2
4
6
8
;Directory inwhich the loadable extensions(modules)reside.
;extension_dir='./'
extension_dir='ext'
Uncomment mysql modules
extension=php_mysqli.dll

Save the changes and open a command prompt. Check to make sure it shows loaded modules.

So now we have Apache running and configured to use php. Lets create a file called info.php, save it and see if Apache parses the info correctly to display the results.

Open Notepad or your favorite Windows editor and type and save the following.

2
phpinfo();

Open your browser and type, localhost/info.php for the location and you should receive alot of information about PHP.

MySQL
Download and install mysql-installer-community-5.6.26.0.msi. Change installation directory to C:MySQLMySQL Server 5.6 instead of Program files as there could be permissions issues. Once the installation is completed you can let the configuration wizard run and setup the database server. The defaults will work just fine, but remember what you set the password to for root.

At this point you should have a working Apache / PHP / MySQL installation running and ready for you to use!

Related Posts

  1. it says php not recognised as any internal or external command, operable program or batch file.

    • Did you ever find a solution? I am experiencing the same error.

    • Check your work. I followed his instructions after days of trying to follow other’s, and finally got it to work. Never had a problem with Apache 2.2 on Windows XP (or even Windows 10), but installing Apache 2.4 is different for some reason. Go figure. But it’s now working!

  2. Nice article, thanks, it worked for me. I’ve used php 7, apache 2.4 vc14 and Microsoft visual C++ 2015 update 1. I enjoy a clean installation, no need of WAMP, LAMP…

    • Kindly Share the versions you have installed…

      Which version of php 7 preferably share the link to download

  3. Hi,
    Thanks for these instructions, I am very new to anything to do with php or Mysql. I am trying to buid a database on my own computer (not for publishing on the web) and I am assuming I still need to install everything as per instructions. I managed to get apache up and running but get an error message when testing php.

    the error message is
    c:> php -m
    php is not recognized as an internal or external command, operable program or batch file.

    Can you give any advice on what might be causing the problem please? I think it might be to do with your instruction about editting the php.ini file. I found the code

    ;Directory in which the loadable extension (modules) reside ….

    And inserted the code

    Uncomment mysql modules ….

    immediately after

    extension_dir =”ext”

    But I am not sure if this is where it was meant to be inserted (the only bit of instruction I couldn’t follow).

    Any help would be greatly appreciated,

    Many thanks,
    Rob

  4. I have followed all the steps but in the end in “localhost/info.php” the page cant be found. my info.php y saved in httdocs

    • I had the same error. How did you fix this error?

      Thanks

    • I had this problem too. One more reboot fixed the problem for me

  5. I need some help with two things,
    First what do I do with this part exactly? “Next we need to input a value for ServerName variable.” Do I change this line to something or simply leave it uncommented?

    ServerName http://www.example.com:80

    Also the part with the envrionment variables I do not think I am doing right.

    I can add:

    C:php
    C:apache24
    C:apache24bin

    all separately in Path for Environment Variables but I cannot add

    ;c:php;c:apache24;c:apache24bin;”

    How am I supposed to correctly edit the variables?

    • Actually I believe I did the environment variable part right but still don’t know what to do for servername.

      Also when I type c:Apache24binhttpd -S into the command prompt it says

      “httpd: Syntax error on line 72 of C:/Apache24/conf/httpd.conf: Cannot load modules/mod_access_compat.so into server: The specified module could not be found.”

      And whether I comment line 72 or not it will say that.

  6. Hi,

    Everything seems to be going great but when I installed apache and tested it, I get an error with the php setting in the config file that we added. Cannot Load C:/php/php5apache2_4.dll into server: %1 is not a valid Win32 application.

    I followed all the steps, what can be amiss? Thanks!

    • Same problem here. The error is reported right during the installation of the Apache server “errors reported here ust be corrected before the service can be started. httpd: Syntax error on line 525 of C:/Apache24/conf/httpd.conf Cannot load c:/php/php5apache2_4.dll into server: %1 nx92 is not a valid Win32 application”

      Also followed all the steps and encounter this problem when installing the Apache server under Windows 10.

      • And there I fixed it…

        If anyone get this error, it means that the installed versions of Apache and PHP are not the same (e.g. Apache 64bit and PHP 32bit).

        To fix the problem, I had to install the 64bit version of PHP (not the 86x version stated in the instructions), which means basically just downloading the right version, extract all files and replace the existing php folder with the folder containing the extracted files, renamed as “php”.

        Now everything works. Thanks for this great post!

  7. Simple and nice instructions. anyone having a little knowledge about technicality of computer can understand this. Worked for me! Thanks.

  8. Is this compatible to Window 7? Thank you.

  9. I had configured following your steps but when i try to start apache an pop up says : The request operation has failed!

    i don’t know what to do ;s
    i have win 10 pro x64

    • I’m stuck at the same place. I’ve commented out those added lines in httpd.conf and the Apache server starts. The php server works fine. But when those lines are added back in and the Apache server restarted, it doesn’t start up.

      Any ideas, newlife007?

  10. You can entirely eliminate the need to manually configure Apache for PHP if you are using a managed hosting platform, like Cloudways (https://www.cloudways.com/en/php-cloud-hosting.php ). Their platform already has Apache, MySQL, Nginx, Memcached and Varnish configured.

  11. I am having the exact same problem that Miguel reported on March 22. when I type localhost/info.php my browser says “cannot reach this page. I didn’t see a reply with an answer to his problem which will probably solve mine too. My Apache server seems to startup and run properly because there were no errors reported. My path has been changed per the instructions and info.php was saved into the c:apache24htdocs directory.

  12. Not seen this mentioned, but have used this before, very easy to install and configure Apache and MySql with PHP install

  13. Was hoping to find steps for setting up LAMP in bash on the new WSL. Particularly how to actually hit the server once it’s running. Maybe a future how-to?

    Unrelated: how many geeks do you administer? 😉

  14. I had the same problem, however I download php from http://windows.php.net/downloads/releases/php-7.0.12-nts-Win32-VC14-x86.zip and it works

  15. . And for php 5. I had downloaded php from http://windows.php.net/downloads/releases/php-5.6.27-nts-Win32-VC11-x86.zip and it works too.

    Best regards

  16. My Error to localhost/info.php:

    Evolis

    Installed Apache 2.4.23 webserver on windows 10.
    64 bit AMD machine.
    it was successful.

    Then installed PHP 7.1.13 Win32 VC14 x64

    from the above steps
    everything worked till

    php -m

    ERROR:
    when tried to run
    localhost/info.php

    got an HTTP ERROR 404

    SOLUTION (in my case):
    As I have Skype and it uses port *80

    I set the PORT in APACHE config file to *8888

    Hence to access the info.php in browser type

    localhost:8888/info.php
    localhost:/info.php

  17. If you copy and paste changes to the httpd.conf from the screen
    (LoadModule php5_module “c:/phpphp5apache2_4.dll”
    AddHandler application/x-httpd-php .php
    # configure the path to php.ini
    PHPIniDir “C:/php”)
    , compare the existing quotes used in httpd.conf to what you pasted in. There is a difference between fancy quotes and regular quotes. Apache wont run if there are fancy quotes in the httpd.conf file.

  18. i have followed the whole mentioned steps the same, and there is no error, but still localhost page can not be found through the browser.

    • Hi Save your info.php file in to C:Apache24htdocs

  19. Just wanted to say thanks!
    Everything worked perfectly – you the man!

  20. Just thought i would add some thing to this nice tutorial……Some time in win 7 and win 10 in the Apache httpd you need to make this path the full. extension_dir = “ext” change to “C:php/ext” or in my case extension_dir = “C:php7/ext”

    Hope this helps a few

  21. exscuse me i ment in the PHP.ini my bad

  22. Thanks for this article, working perfectly.

    Thanks

  23. Apparently several others have had the same problem. I have installed Apache24, PHP7 and MySQL (64-bit versions) in Windows 10 exactly per the instructions provided.

    When DocumentRoot in httpd.conf is configured as C:apache24htdocs” info.php shows up perfectly. When DocumentRoot in httpd.conf is changed to another directory where all the website files exist, only the html files show up (for example, index.html for the website). However, info.php produces a blank screen. There is no error message, only a blank screen. (Note: Yes, I have a copy of the info.php file in DocumentRoot directory.)

    Have spent “hours” on this. Any help will be appreciated. Thanks.

  24. Have downloaded httpd-2.4.27-Win64-VC15 and php-7.1.9=nts-Win32-VC14-x64.
    following your instructions
    edit apache conf file with
    LoadModule php5_module “c:/php/php5apache2_4.dll”
    or
    LoadModule php7_module “c:/php/php7apache2_4.dll”

    AddHandler application/x-httpd-php .php
    # configure the path to php.ini
    PHPIniDir “C:/php”
    There is no file named php5apache2_4.dll in php5 download or php7apache2_4.dll in php7 download

    Apache says cant locate module.

  25. Hi,

    I’m almost done with this setup. Thank you for this article with detailed steps.

    I’ve installed Apache 2.4 server, PHP 5.6 and MySQL 5.5

    I’m able to run the index.html file as localhost/index.html
    I’m also able to run the PHP program through command prompt successfully.
    But, when I try to execute the index.php file, I could see the code is displayed as a plain text instead of executing the PHP code.

    Could you please help.
    Thank you in advance!!

  26. gracias sirvió y mucho

Trackbacks/Pingbacks

  1. QGIS Server on Windows 10 – level2 - […] instructions on this post – http://lifeofageekadmin.com/how-install-apache-2-4-php-5-6-and-mysql-5-6-26-on-windows-10/ (install 64bit versions in both cases, you can skip MySQL […]

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

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

replace

with

replace

with

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).

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.

Install Php Mysql Apache

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'.

How to delete web-server Apache from Windows

Mysql

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!

How To Install Php Mysql Apache On Linux

Stop services and remove them from auto start:

Install Mysql On Windows 10

Delete the folder C:Server.

Last Updated on

Related articles:

  • 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 install and run Apache Real Time Logs Analyzer System (ARTLAS) (RANDOM - 9.1%)

Php Mysql Apache Download

Recommended for you: