Install PHP 7.2 Hypertext Preprocessor on Ubuntu 17.10/18.04

Install PHP 7.2 (Hypertext Pre-Processor) on Ubuntu

Install PHP 7.2 ubuntu is a server-side scripting language used in most web development and also used to serve the dynamic content. It can run scripts to connect to the MySQL database. you can install PHP latest version and check-in ubuntu.

Once you can also check before installing the PHP version in the ubuntu machine and also test the PHP is working by creating a test page that will show all the information about the PHP version.

you can use this command to check the version installed php -v

Check Out: Install Microsoft .Net Framework 4.7

First, We’re going to check whether PHP installed or not on the machine.

Install PHP 7.2

PHP not installed on our Ubuntu machine and Now let’s install the required 
packages.

apt-get install php libapache2-mod-php php-mysql

php latest version ubuntu

Check Out: Installation of Mysql 5.7 Database Server

Now PHP installed on Ubuntu machine with these dependencies

install php in ubuntu

You can also install PHP-mcrypt package if you want And Now create a file under the directory /var/www/html/test.php

Edit these file and put this PHP code

<?php

Phpinfo();

?>

Save and exit

Check Out: Rpmdb Open Failed

 

Test the PHP setup and browse with your system IP

http://192.168.140.138/test.php

Check Out: Check Inode Number Of a File Or Directory

if you get these output means PHP is installed properly and working.

You’re done check php in ubuntu latest version

Share on:

I'm the founder of Curious Viral. I hope this blog will provide you complete information about Linux Technology & I would like to share my technical knowledge with you which I have learned during this period.

Other Posts You May Like...

Leave a comment