How to run php in Windows - WAMP server

To run php programs we mainly require
Apache server
MySQL
PHP
Ok now don't worry, you don't have to install all these. In this guide we use the Wamp server which basically includes all these. You can download it from the below link.


Download
WAMP server

Install it in your Windows machine. Just follow the instructions. Its a simple installation procedure.

After installation, run the server...
Click on START, and then start WAMP server to get your server start running. You will see the WAMP server icon in the taskbar if its running.


The default installation directory of WAMP is "C:/wamp"
C:/wamp/www is the base directory for all your projects.
In the directory "C:/wamp/www" create a directory (eg : myprog)


In this directory now create the php file which you want to execute.
Open a notepad, type in the program and save it with .php extension.

Get sample php scripts from here







Now click on the WAMP server icon in the right side of your taskbar.

Click on Localhost.
WAMP server Homepage will now pop out and you will be able to see your project list.

Click on the directory created before (eg: myprog) You should now be able to browse through all the programs in that directory.



Click on the php program to execute. DONE!!

Now wasn't that so simple! :)

13 comments:

Unknown said...

really useful and solution of your Questions

akayas said...

i have downloaded wamp ...bt whenever i start it astray menu error pops up wahat it is plzzzzzzz help

Khayali Shah said...

Jst exit the wamp server and then start it again. Assure that the wamp server is online and not offline. If it is offline den click "Put online".

Khayali Shah said...

Jst exit the wamp server and then start it again. Assure that the wamp server is online and not offline. If it is offline den click "Put online".

Unknown said...

sir,
i follw all rules described above
but it does not runs and display a message


"Not Found

The requested URL /tata.php was not found on this server."

Avinash said...

Aditya you can download MSVCR100.dll file and install it, it will definately work.

Avinash said...

Aditya you can download MSVCR100.dll file and install it in your system, it will definately help.

Unknown said...

sir .
i install the wamp server on my computer .
but he doesn't work
when we click on localhost he doesn't show the directory files. can you let me how i access the php file.

Rupesh said...

sir ,
where to store .sql database in wamp server

Anonymous said...

si hw we can run the program in php threw wamp server?????

Darren the Dood said...

Wow awesome! Thanks for the post it really helped me!

Anonymous said...

I have installed WAMP Server.It is running successfully but when i make a php file .It always save as .txt extension,not as php.
Help me Please.
Minku

PRABHACARE said...

simply wonderful! Keep it up buddy

Post a Comment