Detri Amelia Chandra
  • HOME
  • GIS
  • HTML
  • Bootstrap
  • CSS
  • Javascript
  • Ubuntu
  • Useful Tools
    • URL Redirect Tool
    • URL Download Encryptor
No Result
View All Result
Detriamelia.com
  • HOME
  • GIS
  • HTML
  • Bootstrap
  • CSS
  • Javascript
  • Ubuntu
  • Useful Tools
    • URL Redirect Tool
    • URL Download Encryptor
No Result
View All Result
Detriamelia.com
No Result
View All Result

3. How to Install Apache, MySQL and PHP in Ubuntu 18.04 LTS Part 2

11/11/2019
in PHP, Ubuntu
install-apache-mysql-and-php-in-ubuntu-18-04-lts-part-2

How to Install Apache, MySQL and PHP in Ubuntu 18.04 LTS Part 1

This article is a continuation of the previous article about How to Install Apache, MySQL and PHP in Ubuntu 18.04 LTS Part 1. For those who have not read the article, you must first read the previous article. Because for the smooth running of this tutorial, a lot has to do with the article.

Let’s just go straight to the tutorial continued.

3. Install PHP

To install PHP on Ubuntu 18.04, please open a terminal and run the following syntax:

1
sudo apt install php libapache2-mod-php php-mysql

After installing PHP, create the info.php file in the Apache root document folder. Typically, the apache root document folder is /var/www/html/ or /var/www/ on most Debian-based Linux distributions. On Ubuntu 18.04 LTS, it is /var/www/html/.

Let’s create the info.php file by running the following syntax in the terminal:

1
sudo vi /var/www/html/info.php

Add the following syntax in it:

1
2
3
<?php
phpinfo();
?>

Press the ESC key and type :wq to save and exit the file. Restart the apache service to apply the changes.

1
sudo systemctl restart apache2

Now try accessing the info.php file by typing the url http://localhost/info.php in your browser. Then it will appear as shown below:

PHP-Demo
If successful it will appear as shown above

Congratulations, your installation is complete. If you still don’t understand, or have questions that you want to ask, please leave your comments below. May be useful… 🙂

Tags: ApacheMySQLPHPUbuntu
ShareTweetShare

Related Posts

PHP Forms - Validation With Required Fields
PHP

14. PHP Forms – Validation With Required Fields

Hi everyone, this time we will discuss about PHP Validation using the Required Field. Not many people know, it turns...

15/02/2020
PHP Form Handling
PHP

13. New Performing PHP Form Handling

Detriamelia.Com - Running form functions in PHP is not difficult. By using the $ _POST and $ _GET methods it...

13/02/2020
Learn PHP Global Variables - Superglobals With Example
PHP

12. Learn PHP Global Variables – Superglobals With Example

On this occasion, we will discuss Global and Superglobal Variables. These variables are some that are very important to implement....

20/01/2020
PHP Array Example, Complete Editions
PHP

11. PHP Array Example, Complete Editions

Welcome back to the PHP programming learning page. This time we will discuss arrays, more precisely arrays in PHP. Arrays...

17/01/2020
Next Post
PHP Syntax, Variables and PHP Echo/Print

4. PHP Syntax and PHP Variables

PHP Syntax, Variables and PHP Echo/Print

5. PHP Echo and Print Statements

Comments 1

  1. Pingback: Cara Install Apache, MySQL dan PHP di Ubuntu 18.04 LTS - Detri Amelia Chandra

Leave a Reply Cancel reply

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

Recommended

Understanding PHP Condition If Else, Elseif Statements

7. Understanding PHP Condition If Else, Elseif Statements

15/01/2020
install-apache-mysql-and-php-in-ubuntu-18-04-lts-part-2

2. How to Install Apache, MySQL and PHP in Ubuntu 18.04 LTS Part 1

11/11/2019
PHP Forms - Validation With Required Fields

14. PHP Forms – Validation With Required Fields

15/02/2020
Fungsi Peformatan Rupiah Pada Angka PHP

How to Make Rupiah Format Function for Number Using PHP

02/04/2019

Instagram Feed

    The Instagram Access Token is expired, Go to the Customizer > JNews : Social, Like & View > Instagram Feed Setting, to refresh it.
  • HOME
  • GIS
  • HTML
  • Bootstrap
  • CSS
  • Javascript
  • Ubuntu
  • Useful Tools
Detriamelia.Com

© 2022 Detri Amelia Chandra - IT Tips and Programming Tutorials.

No Result
View All Result
  • HOME
  • GIS
  • HTML
  • Bootstrap
  • CSS
  • Javascript
  • Ubuntu
  • Useful Tools
    • URL Redirect Tool
    • URL Download Encryptor