ComputersSoftware

Step-by-step installation of PHP for various operating systems

If you want to create a quality website, then you just need to use the language of PHP. With it, you can write so-called scripts - these are programs that result in the work of web pages that are sent to the browser and displayed on the screen.

The page generated by the script differs in its variable content. Its final form depends on the factors considered in the source code of the program. For example, such factors may be the server time or user information stored in the database. To create such scripts, PHP must be installed.

What is required to work with PHP?

In order for your scripts to work, you will need three main applications:

  • In fact, the interpreter of the language of PHP. This is a program that "turns" PHP into HTML.
  • Web server is a program that accepts browser requests, forms a web page and returns it. If you create a site on your home computer, then Apache is best suited for the web server role. If you already host the site on the Web, then both Apache and PHP will be installed on the server.
  • Installing PHP and developing applications on it is impossible without a web browser. But here problems should not arise: most likely, this program you already have. If not, the most common ones are Chrome, Firefox and Opera. You can choose any one at will.

Installing PHP ( Ubuntu)

First, we'll look at the installation process on a Unix-like system using Ubuntu as an example.

1. Download the selected Apache and PHP distributions from their official sites, then unpack them into various directories.

2. Now go to the Apache folder , configure it with the command "./configure --enable-so", and then install it with "make" and "make install". Then - actually, the installation of PHP.

3. Go to the folder with the unpacked PHP distribution, configure it: "./configure --with-apxs2 = / usr / local / apache2 / bin / apxs --with-mysql", then install the program with the same two commands, As in the previous paragraph. The configuration automatically configures the relationship between PHP, Apache and the MySQL database.

Installing PHP (Windows)

In this operating system, installing and configuring PHP and Apache is much simpler.

Download the installers for these applications from the same sites, then simply run them in turn and follow the instructions. If after installation you have a problem with running the Apache + PHP bundle, try searching for solutions on the software manufacturer's site - there will certainly be described the way to solve it.

Installing Denver

For the Windows operating system , there is a more convenient and understandable option for using PHP. This is the Russian project "Denver" (short for "The gentleman's set of web developers"). Installation of PHP, Apache and MySQL in it occurs automatically.

"Denver" is a ready-made web server with support for all necessary functions, convenient access, the ability to edit the site on the local machine, as well as a well-thought-out mechanism for managing the entire system. In addition, "Denver" is distributed absolutely free of charge.

Using PHP in the development of your website is a definite plus to the project. This language is very functional and effective, as well as specially tailored for writing web applications. Installing PHP is a simple process, but the subsequent configuration of applications separately and their interaction may not be very fast.

Similar articles

 

 

 

 

Trending Now

 

 

 

 

Newest

Copyright © 2018 en.delachieve.com. Theme powered by WordPress.