FlipKart

Thursday 26 February 2015

Setting up XAMPP


XAMPP is the most popular PHP development environment .Infact it is a Apache distribution containing MySQL, PHP, and Perl .

This post describes of basic installation of XAMPP in windows and Linux.
If there are any problems in installation
Visit   http://devendradora.blogspot.in/2015/02/problems-in-installation-of-xampp.html

Setting up of environment


1) Download the software from https://www.apachefriends.org/index.html
    ** You can find the software for most of the os like linux based (ubuntu,fedora) ,Windows , OSX etc. (For 32 bit systems choose x86 file and x64 file for 64 bit systems)

For windows OS
2) Once your download is complete, install the program, click on Run.

3) Accept the default settings and click on NEXT ....and then on Finish.

4) Now open Xampp control panel .

5) Start the Apache and MySQL . You can also start the other components, if you want to use them.

6) Open  any webbrowser(Mozilla , Chrome ,opera) and type localhost or 127.0.0.1 in the address bar .

7) A page appears that offers you to choose language . Click on the language of your preference.

8) Welcome page of xampp is displayed.  

For more details visit http://www.wikihow.com/Install-XAMPP-for-Windows

For Linux based OS

2)Once your download is complete, navigate to the location of your downloaded  file say the file name is xampp-linux-x64-5.6.3-0-installer .
If your system is dual boot with windows make sure that you move the downloaded file to the location which is only used by linux as there may be some permission issues if it is in shared location of windows and linux.

Open terminal (CTRL + ALT + T ) and change your directory to specified location . For e.g  cd Downloads

3)Make the file executable  
  sudo chmod +x   xampp-linux-x64-5.6.3-0-installer 
**sudo means root access ,+x means executable 

4) sudo ./ xampp-linux-x64-5.6.3-0-installer  


5) Accept the default settings and click on NEXT ....and then on Finish.

6)To start Xampp (basically called lampp in linux)

 sudo /opt/lampp/lampp start

7) Open  any webbrowser(Mozilla , Chrome ,opera) and type localhost or 127.0.0.1 in the address bar .

8) A page appears that offers you to choose language . Click on the language of your preference.

9) Welcome page of xampp is displayed.  

For more details http://www.wikihow.com/Install-XAMPP-on-Linux

Problems in installation of XAMPP ?
Visit   http://devendradora.blogspot.in/2015/02/problems-in-installation-of-xampp.html

If everthing goes fine until now then you have installed XAMPP successfully.

For Windows OS 
a) Navigate to installation directory of Xampp and open htdocs.
 eg.  c:/>xampp/htdocs
  ** htdocs : It is the location where you can place your various web projects.

b) Create a folder named say webdev

c) Create a sample html or php file say  login.php or login.html

d) Open  web browser and type  
localhost/webdev/login.php or 127.0.0.1/webdev/login.php in the address bar 
e)Your web page gets displayed.


For Linux OS 

a) Navigate to installation directory of Xampp and open htdocs.
 eg.  open terminal CTRL+ ALT + T and then type following commands

       cd /opt/lampp/htdocs

  ** htdocs : It is the location where you can place your various web projects.

b) Create a folder named say webdev
     mkdir webdev
     cd webdev

c) Create a sample html or php file say  login.php or login.html

d) Open  web browser and type  
localhost/webdev/login.php or 127.0.0.1/webdev/login.php in the address bar . If access denied then in the terminal , type 
   chmod +755 webdev   

e) Your web page gets displayed.






 





Problems in installation of XAMPP ?

Some common Errors:

a)Apache shutdown unexpectedly.
This may be due to a blocked port, missing dependencies.
Possible Solutions:
Most of the times these errors are due to the same port (Default :80) is used by some other services say Internet Information Services (IIS) ,Skype etc.

Possible solutions :

So either these services can be turned off or port of the apache should be changed to solve the above the problems.

Method1 :
Steps :
-> open your xampp control panel then click its "config"
-> choose the "Apache (httpd.conf)" and find this code below and change it into this one:
# change this to Listen on specific IP addresses as shown below
# to prevent Apache from glomming onto all bound IP addresses.
# Listen 0.0.0.0:80
# Listen [::]:80
Listen 80
->save it (ctrl + s)
->Click again on config
-> choose "Apache (httpd-ssl.conf)" find this code below and change it again:
# Note: Configurations that use IPv6 but not IPv4-mapped addresses need two
# Listen directives: "Listen [::]:443" and "Listen 0.0.0.0:443"
# Listen 0.0.0.0:443
# Listen [::]:443
Listen 443
->save it (ctrl + s)

Method 2 : Change the port 80 to some other port say 81
steps :
-> open your xampp control panel then click its "config"
-> choose the "Apache (httpd.conf)"
->Change line
Listen 80 to Listen 81
-> Change line
ServerName localhost:80 to ServerName localhost:81
->start the apache

Method 3 :Turning off the IIS server
Steps :
-> Go to the "control panel" -> "Programs & Features" -> "Turn Windows On or Off".
-> Uncheck your "Internet Information Services" then click ok.
Still doesn't Work ?
No problem ,have you installed any virtual machines such as vmware ?

Method 4:
If you have VMWare Workstation installed , the option to share VM's is listening to port 443. That is preventing an Apache-server to start (xampp).
steps:
-> open vmware software
-> Choose Edit > Preferences > Share VM's
and change 443 to some other value for instance
->Start the apache server

Hope this works !!!