Setup your own Apache MariaDB PHP phpMyAdmin on Windows!
In this topic I'm going to explain step by step how to make your own localhost
PHP - MariaDB - Apache - PhpMyAdmin
for development purposes without using any third party software Like XAMPP OR WAMP etc...
Why using bloated softwares like XAMPP or WAMP?
when you can build your own localhost your self without waiting for any updates or installing tools that you'r not using at all!
It gives you more flexibility over your localhost and more control.
also you don't have to wait for third party updates as you can make it your own self directly.
Recommended OS:
- Windows 7
- Windows 8.1
- Windows 10
Also you wil need a text editor like Notepad++
Before we start you need to download
Apache Lounge | PHP | phpMyadmin | MariaDB |
---|---|---|---|
v2.4.29 | v7.2.0 | v4.7.6 | v10.2 |
Download x64 | Download x64 (Thread Safe) | Downoad | Download x64 |
Then make sure you've the following:
Visual C++ Redistributable for Visual Studio 2012
Visual C++ Redistributable for Visual Studio 2017
To avoid any errors like "MSVCR110.dll", "MSVCR140.dll"
Setup Apache
Extract your apache ZIP file to your hard drive and it will be like that:
C:\Apache24
Now you wil need to edit:
C:\Apache24\conf\httpd.conf
Use CTRL + F to search for:
#ServerName www.example.com:80
Uncomment it and change it your system's host name for example
ServerName localhost
Then save it.
Open Command Prompt as an Administrator
Type:
cd C:\Apache24\bin
Enter
Then Type:
httpd.exe -k install
Enter
if the result like the following:
Installing the 'Apache2.4' service
The 'Apache2.4' service is successfully installed.
Testing httpd.conf....
Errors reported here must be corrected before the service can be started.
then everything is fine
Now Start Apache Service:
httpd.exe -k start
Now you've finished.
Open a browser and browse to:
http://localhost
If the page saysIt works!
That means Apache has been successfully installed.
To stop apache service open command prompt again then type:
httpd.exe -k stop
Also you can use ApacheMonitor
Located in:
C:\Apache24\bin
Also you can check the service by Windows + R
Then type:
services.msc
Search for Service Named "Apache2.4" That's it
Setup MariaDB
open "mariadb-10.2.11-winx64.msi" that you've downloaded
Follow the steps in the installer
Next > Accept Terms > Next
Now I Think you don't need third party tool called HeidiSQL
left click on third party tools and select entire feature will be unavailable
Next
Hit Next > Default instance properties (should be fine) > Next > Next > Install
MariaDB installed successfully.
Setup PHP 7
Extract "php-7.2.0-Win32-VC15-x64" to a New Folder called PHP for example
C:\PHP
Rename
php.ini-development
to
php.ini
Open php.ini with your text editor then search for:
; extension_dir = "ext"
change it to your php path for example:
extension_dir = "C:\PHP\ext"
now we have to enable some extenstions like:
mbstring
mysqli
pdo_mysql
you can start doing that by uncomment lines in php.ini
for example search for:
;extension=mbstring
then remove;
and so on for the rest.
Now we've to configure Apache to use PHP 7
Add the following lines toC:\Apache24\conf\httpd.conf
after all the LoadModule lines
LoadModule php7_module C:/PHP/php7apache2_4.dll
<IfModule php7_module>
DirectoryIndex index.html default.php index.php
AddHandler application/x-httpd-php .php
PHPIniDir "C:/PHP"
</IfModule>
Go to:
C:\Apache24\bin
Now Restart Apache Service by command prompt or use ApacheMonitor:
httpd.exe -k restart
Now go to:
C:\Apache24\htdocs
Create info.php file:
<?php
phpinfo();
?>
Then Save it.
Check your php info for example:
http://localhost/info.php
phpMyAdmin
Extract phpMyAdmin-4.7.6-all-languages.zip to:
C:\Apache24\htdocs
Rename:
phpMyAdmin-4.7.6-all-languages
To:
phpMyAdmin
Then move it to:
http://localhost/phpMyAdmin
Login with your root username and your root password for MariaDB
usually username is:
root
Congratulation now you've your own localhost and its ready for use!
References:
Function PHP Info
The Lastest Visual C++ Downloads
Apache Windows Document
phpMyAdmin FAQ
Posted on Utopian.io - Rewarding Open Source Contributors
A great contribution. That what I was looking for.
Wow! that's a lot better than XAMPP and other ready tools.
@OriginalWorks
The @OriginalWorks bot has determined this post by @jinzo to be original material and upvoted(1.5%) it!
To call @OriginalWorks, simply reply to any post with @originalworks or !originalworks in your message!
Thanks for helping
Hey @jinzo I am @utopian-io. I have just upvoted you!
Achievements
Suggestions
Get Noticed!
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x
Thank you for the contribution. It has been approved.
For next time please ... more detail and informative
You can contact us on Discord.
[utopian-moderator]
For more information, click here!!!!
Send minimum 0.050 SBD to bid for votes.
The Minnowhelper team is still looking for investors (Minimum 10 SP), if you are interested in this, read the conditions of how to invest click here!!!
ROI Calculator for Investors click here!!!
This post has received a 0.35 % upvote from @drotto thanks to: @jinzo.
This post has received a 33.33 % upvote from @steemdiffuser thanks to: @jinzo. Steem on my friend!
Remember, above average bids get additional upvotes from our trail members!
Get Upvotes, Join Our Trail, or Delegate Some SP
This post has received a 12.20 % upvote from @kittybot thanks to: @jinzo.