How to make a base installation of PHP on a server

From EN Ikoula wiki
⧼vector-jumptonavigation⧽ ⧼vector-jumptosearch⧽

en:How to make a base installation of PHP on a server he:כיצד להפוך את התקנה הבסיס של PHP בשרת ro:Cum sa faci o instalare de bază ale PHP pe un server ru:Как сделать базовой установки PHP на сервере pl:Jak zrobić w podstawowej instalacji PHP na serwerze ja:どのようにサーバーに PHP の基本インストール ar:كيفية إجراء تثبيت قاعدة من بي إتش بي على خادم zh:如何使基本安装的 PHP 服务器上 de:Wie erstelle ich eine base-Installation von PHP auf einem server nl:Hoe maak je een basisinstallatie van PHP op een server it:Come fare un'installazione di base di PHP su un server pt:Como fazer uma instalação base do PHP em um servidor es:Cómo hacer una instalación base de PHP en un servidor fr:Comment faire une installation de base de PHP sur un serveur


Introduction

This article explains how to perform a basic installation of PHP on a Linux or Windows system. It also indicates how much time can take an installation of this type and how to test the good performance.

Debian

Note:We will only describe here how php and php-fpm work with Apache


PHP "classique"=

Basic setup PHP

Connect in ssh on your Template:Server with the identifiers which were transmitted to you at the time of the delivery of your Template:Server. Once connected, update the APT repositories and proceed to the installation of Apache and PHP:

apt-get update
apt-get install apache2 php5

Test PHP

You must create a test page that you will place in the base directory of your site. Take in this example the file info.php in the directory /var/www/ Create a file info.php and place the following code:

<?php echo phpinfo(); ?>


The test remains the same as for a classic php installation. See: How to do a basic_PHP_installation_on_a_server#PHP test

<?php echo phpinfo(); ?>

Then test the page by launching a web browser : http://X.X.X.X/info.php

By replacing X.X.X.X by the IP address of your Template:Server. The IP address must be open to the client that tries to connect, at the Template:Server level as well as at the level of any firewall.

You must have a return as follows:

without_frame

This also allows you to know the modules currently installed on your Template:Server.

Windows

Basic installation IIS

To install IIS on Windows Server 2012 :

  • In the home page, click on the thumbnail Server Manager, then click OK
  • In the Server Manager, click on "Manage", then on "Add Roles and Features".
  • Dans l'assistant Add Roles and Features, dans la page Before You Begin, cliquez sur Next
  • In the Select destination server page, click on Select a server from the server pool, then click on Next
  • On the Select server roles page, click on Web Server (IIS)
  • In the page Select features, click on Next
  • In the Web server Role (IIS) page, click Next.
  • On the Select role services page, note the pre-selected role services installed by default, then click Next


Source

Tuto LAMP : http://www.mimiz.fr/blog/installation-et-configuration-dun-Server-lamp-linux-apache-mysql-et-php-sur-un-Server-ubuntu-7-10/

Fast CGI :

Note: You only need to install the default IIS 8 role services for a static content web server.
  • In the page Confirm installation selections verify your choices, then click Install.
  • On the Installation Progress page, verify that your installation of the Web Server (IIS) role and the mandatory role services has been completed correctly, then click Close
Note: Estimated time : 10 min

Installation basique CGI

To install CGI on Windows Server 2012:

  • You must first install IIS by following the previous procedure
  • In the home page, click on the Server Manager thumbnail, then click on OK
  • In the Server Manager, click on Manage, then on Add Roles and Features.
  • In the Add Roles and Features wizard, in the Before You Begin page, click on Next
  • In the page Installation Type, select Role-based or feature-based installation, then click Next
  • In the page Select destination server, click on Select a server from the server pool, then click on Next.
  • In the page Select server roles, note the preselected features installed by default, then select CGI. (for this pull down Web Server (IIS), then Web Server, then Application Development) This option also installs FastCGI, which is recommended for PHP applications, then click Next
  • In the page Select features, click on Next
  • In the page Web server Role (IIS), click on Next
  • On the Select role services page, note the pre-selected role services installed by default, then click Next
  • In the page Confirm installation selections verify your choices, then click Install.
  • In the page Installation progress, verify that your installation of the role of Web Server (IIS) and mandatory role services has been completed correctly, then click Close.
Note: Estimated time : 10 min

Test IIS

To check if IIS has been installed, type the following in a web browser:

Note: Estimated time : 5 min

PhP installation

Basic installation PHP

Installing PHP using the Web Platform Installer: The recommended method to install PHP on a Windows or Windows Server computer is to use the Web Platform Installer (Web PI)

  • Open a browser and go to the following website: https://www.microsoft.com/web/downloads/platform.aspx
  • Select Free Download and run the downloaded file (you may need to change your browser's security policy to do this)
  • At the top of the window Web Platform Installer, click on Products
  • Search for the version of PHP desired (At the time of writing this article, the current version is PHP 7.1.7), click on Add and then Install
  • The page Web Platform Installer displays the version of PHP and its dependencies that will be installed
  • Web Platform Installer installs the PHP packages
Note: Estimated time : 10 min

Test PHP

Test your PHP installation:

  • Open a text editor, for example notepad, as administrator
  • In a new file, type the following text:
<?php phpinfo(); ?>
  • Save the file as C:\inetpub\wwwroot\Phpinfo.php
  • Open a browser and enter the following URL: http://localhost/phpinfo.php
  • A well formatted web page displays the current PHP parameters
Note: Estimated time : 5 min

Source

Fast CGI :

PHP for Windows :



You are not allowed to post comments.