2 Installing PHP
2 Installing PHP
To install PHP, we will suggest you to install AMP (Apache, MySQL, PHP) software stack. It is
available f or all operating systems. There are many AMP options available in the market that
are given below:
o WAMP f or Windows
o LAMP f or Linux
o MAMP f or Mac
o SAMP f or Solaris
o FAMP f or FreeBSD
o XAMPP (Cross, Apache, MySQL, PHP, Perl) f or Cross Platform: It includes some
other components too such as FileZilla, OpenSSL, Webalizer, Mercury Mail, etc.
If you are on Windows and don't want Perl and other f eatures of XAMPP, you should go f or
WAMP. In a similar way, you may use LAMP f or Linux and MAMP f or Macintosh.
Note: Make sure to turn of f your antivirus and other malware protection software. Set your
UAC to the lowest level.
Step 1: Click on the above link provided to download the XAMPP server according to your
window requirement.
Step 2: Af ter downloading XAMPP, double click on the downloaded f ile and allow XAMPP to
make changes in your system. A window will pop-up, where you have to click on
the Next button.
Step 3: Here, select the components, which you want to install and click Next.
Step 4: Choose a f older where you want to install the XAMPP in your system and
click Next.
Step 9: XAMPP is ready to use. Start the Apache server and MySQL and run the php
program on the localhost.
Next, fire up the XAMPP Control Panel, and this is where you can switch the
components on or off. Usually, we will only need the Apache web server and
MySQL database server – So turn those on.
STEP 3) “RUN” FROM BROWSER
Don’t like the default root folder? You can change it by editing a few lines of
configuration. Go to the XAMPP Control Panel, hit the config button, and
choose “Apache httpd.conf”. Look for the document root section, and change
it to wherever you like.
httpd.conf
#DocumentRoot "D:/xampp/htdocs"
#<Directory "D:/xampp/htdocs">
DocumentRoot "D:/http"
<Directory "D:/http">