Step 3 Installing PHP and phpadmin another Explanation

What is PHP?

First of all, you should know that PHP is an interpreted language. And as in the case of servers, the acronym PHP can have several meanings. In fact, when we talk about PHP, we can talk about either the language or the interpreter.
Here, when we talk about installing PHP, it means that we will install the interpreter, in order to use the language.
PHP (the language this time) is mainly used to make a site dynamic, that is to say, that the user sends information to the server which returns the modified results according to this information. Conversely, a static site doesn’t adapt to information provided by a user. It’s saved as a file once for all, and will always deliver the same content.

&

 PHP is free

It’s one of the most widely used programming languages, and it is even the most used for web programming, with about 79% market share.


install PHP


We will again use the administrator to install PHP with the command line.

sudo apt install php php-mbstring

Control if PHP is working

To know if PHP is working properly, it’s not very complicated, and the method is quite similar to the one used for Apache.
You will first delete the file “index.html” in the directory “/var/www/html”.
sudo rm /var/www/html/index.html
Then create an “index.php” file in this directory, with this command line
echo "" > /var/www/html/index.php
From there, the operation is the same as for the Apache check using cat in command line but if we want to test it in the browser we will need phpmyadmin 

Comments