Setup your complete first PHP workbench with windows

Hello friends I'm again here with old but interesting topic, this is fully dedicated to beginners who don't to anything about Setup PHP server and taking everything very complex to start. Don't worry I will try describe everything very simple as possible.

Why setup PHP workbench is important for beginners ?

Hmm, it's common questing and strike in your mind before your startup, let me clear why important for you.

We all know well PHP is OpenSource Programming Language and leading in web technologies. After implementation of OOPS it's become more powerful and interesting. 

Most of top website running on PHP as Google, Facebook etc, also PHP is a platform independent language.

Servr setup in PHP is very easy and completely free. Supporting multiple databases also there are so many advantages but I think you can get details more better if you go official website http://php.net/ .

Let's setup first PHP workbench very easy:

Php is a server side scripting language that's so you should need a server to run, one min. please if you a question in your mind "what is server side scripting language ?".

If you try to run a simple .html file then it will directly run on your browser, also after implement some javascript code it will run as normal without any worry. But when you try to run a .php file you can't.

That's why it's called server side scripting language.

Installation PHP Apache Server : There are several type of free servers (WAMP,XAMPP etc) but I'm going to install XAMPP.

Download XAMPP from https://www.apachefriends.org/download.html .

Now we will do a most important thing to avoid port block, because normally your Apache run on port 80 and if you are using skype then most probability unable to run due to Already Busy Port.

Changing Apache Port in XAMPP to Avoid Port Conflict Issue-

Goto C:\xampp\apache\conf and open httpd.conf and search for below line:

Listen 80
ServerName localhost:80

Change 80 to as you want, example I'm changing 80 to 82. After that close XAMPP if it's running on Windows Tray and restart XAMPP and start Apache and MySQL as below image.

start apache in windows php workbench setup

After that open http://localhost:82/ in your browser to check your server live or not.

Making your First PHP web page:

After server setup it's time to check everything well or not. We are going to make a .php file and echo a welcome message.

Goto C:\xampp\htdocs\ and create a folder test and in that folder create a simple .php file name as index.php using notepad and write follow lines.

<?php

echo "TricksWay Welcomes  You";

?>

Save above and open your browser and access http:localhost:82/test/ you will see result as below image.

first php file php workbech setup

That's all you done, your first PHP workbench setup well.

How to Setup MySQL command prompt in Windows ?

It's not necessary to know this at the time but I'm sharing so you can learn it if you want. It will helps you in future when you go for learn MySQL.

Open CMD from Windows Start Menu and Type command line one by one as below: (I'm setting up for XAMPP you can change directory if you are using another instead of XAMPP )

cd \

cd xampp

cd mysql

cd bin

mysql -u root -p

connect mysql from windows command prompt

After that it will ask for password, remembers it's not asking your PC password so leave it blank and hit enter if you didn't changed in MySql.

I tried to clear everything as my best, but as human may I failed to clear something so in that case just left your comment. I will try to reply as soon as time allow.

* Do you like this story? Then why not share it with your Friends *
If you enjoyed this post and wish to be informed whenever a new post is published, then make sure you subscribe to our regular Email Updates!

Himanshu is a young engineer living in India. Currently working at LiveCareer as a software engineer. He is an ethical hacker & blogger too, doing lots of crazy stuff... If you seem interesting, go through his portfolio: www.himstar.info : "Open Source. Millions of open minds can't be wrong!"

Leave a reply:

Your email address will not be published.

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

Site Footer

Sliding Sidebar

We are India’s largest Startup Community


We are team of ' Delhi Startups ' , most active startup community with strict spam policy.
We are making !deas happen..for future, business and jobs without charging anything, with connecting entrepreneurs.. It's a reason to trust on us.
Come and join or subscribe, we will defiantly give a reason to like us.

Our Facebook Page