Thursday, June 4, 2009

3 in 1 xampp = PHP + MySQL + Apache

Hi every one,
Well I was assigned to build a web site that uses php and MySQL to register users
who will be students and professors and show them courses and other options.
Any way, I needed to setup all of php, MySQL and Apache (as a server). I looked up on the internet and it wasn't that easy. Yes you will download the three of them easily as they are all free, but it will need a lot of work in order to integrate them with each other and run them.
In order to get rid of all of these nasty stuff, all you have to do is to download and install a package called xampp whih includes all the above tools and it is very easy to install and use as well.

Here are the steps to have your own server where you can build a database and PHP files:

1 - You have to download xampp, it is open source so you will find the suitable version for your machine. just go to xampp home page

2 - Choose the version that suits your operating system - xampp is avaliable for Windows, Linux, MAC and Solaris -

3 - You can download the installer or the zip or the exe. I recommend the installer, it is easy and safe, also it is only 35 MB.




4 - Run the installation normally, it would be better not to install it in C because you may get bothered for security options on Vista.

5 - After the installation is done, go to the folder where you installed xampp, run the xammp controller



6 - You should have a window like this:



7 - If the Apache server is not runing, just click on start, do the same for mysql in case you need it.



You will find it on your tool bar





8 - Now it is all set for us to run the server, just go to your internet browser
and tyoe this in the address bar:
http://localhost/xampp/index.php

If you have the same as this then every thing is set you can build your own php NOW.




9 - Now let's build our site:

- Make a new folder that should contain all the pages, we will name it MyWeb

You have to make this new folder as a subfolder in the folder named htdocs you can find this folder in the folder where you installed xampp.



- download this file called firsPage.php

Put firstPage.php in the folder MyWeb that we created at the previous step.

10 - Write this url in your address bar
http://localhost/MyWeb/firstPage.php
and click Enter

Yes you just did it !!



If you have any comments or questions, don't hesitate


HOPE THIS HELPED, THANKS FOR READING

7 comments:

  1. There is also WAMP...
    http://www.wampserver.com/en/
    and it is great...

    Although I worked with both of them, I cannot favor one of them to the other, but I used Wamp lately and it was so good...

    you can check the comparisons here for more details...
    http://www.google.com/search?q=wamp+vs+xampp+2009&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a

    Happy Assignment...!!!
    :P

    ReplyDelete
  2. Thanks Eng. Amr :D
    I will try this Wamp isa but first I have to finish this "Happy assignment" :D :D

    ReplyDelete
  3. nice article khaled.. i mean.. nice tutorial :D
    you should offer it to w3 schools, but don't accept less than 1000 grand for it :D

    ReplyDelete
  4. thanks mostafa ... hope it helped, I will put some stuff about data base and PHP soon isa,
    By the way, I would take only500 ... get me a deal :D :D.

    ReplyDelete
  5. Khaled, You're my savior, I lvoe you man, I love you

    ReplyDelete
  6. Thanks Khaled for this Good article , good job man , keep going

    ReplyDelete