How to install PHP in windows, Linux or in Mac OS.

How to install PHP

How to install PHP

To develop in php the first need is to install php, and in this post we will learn how to install php in windows, linux or in a mac os. Its needed to make your local machine as a local server as can be develop and tun php code in your local machine opening through http://localhost/

The first step is to gather information about your machine,

you need to know about your machine or computer before start installation of php, the point to mark is as described below,

* the os ruing in your computer.
* the bit of operating system.
* if your machine is windows you must check whether there is .net framework installed, if not then please install.
* you have to remember that you have to install Apache, mysql and phpmyadmin in your machine.

How to install php in your windows and mac machine?

There is two most popular application available for windows machine to install php, and they are xampp server and wamp server.

to download xampp please go to https://www.apachefriends.org/download.html
and to download wampp go to https://www.wampserver.com/en/#download-wrapper

select your operating system and the bit you want to install.

after download please double click on the xampp or wampp.

after installation xampp and wamp both will create some folder in your selected drive.

wampp will create [Drive]->wamp->www , the www folder is the folder where your php application will be stored.
xampp will create [Drive]->xampp->htdocs , the htdocs folder is the folder where your php application will be stored.

How to install php in linux operating system.

In this step we are going to see how to install php in a linux operating system. To install php first need to open the terminal or comment prompt. and then first need to install Apache then needed to install php mysql and at last needed to install phpmyadmin.

the command line is given below, please do follow the command and instructions to install php.

The first step to install Apache first login as super admin in your machine.

-> then write the command
# apt-get install php5-common libapache2-mod-php5 php5-cli
-> please follow the steps to install apache.
-> then stop and then start the apache by following the comments
-> the comments are
# /etc/init.d/apache2 stop
# /etc/init.d/apache2 start

Then install the additional PHP 5 packages,

-> write the command to install ihe additional PHP 5 packages,
# apt-cache search php5
# aptitude search php5
# aptitude search php5 |grep -i mysql

Then install PHP with mysql and cURL

-> to install PHP with mysql and cURL please write the command line in your terminal of linux.
# apt-get install php5-mysql php5-curl

Now the finale steps to install PHP myadmin.

-> to install phpmyadmin follow the steps and command given below.
# apt-get update
# apt-get install phpmyadmin php-mbstring php-gettext

Then must restart Apache by following the given command line
# /etc/init.d/apache2 stop
# /etc/init.d/apache2 start

*** sometime there may be needed to give sudow before apt-get to install the applications.

How to install PHP

How to install PHP

I hope you have installed php in your machine, please write comment to make the site better and more useful.

Thanks for reading.

Share The Post On -

Add a Comment

Your email address will not be published. Required fields are marked *

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