Contents
The default location for the php. ini file is: Ubuntu 16.04:/etc/php/7.0/apache2. CentOS 7:/etc/php.
How do I know if PHP is installed on Ubuntu?
How to check the PHP version on Linux
- Open a bash shell terminal and use the command “php –version” or “php -v” to get the version of PHP installed on the system. …
- You can also check for the package versions installed on the system to get the PHP version. …
- Let’s create a PHP file with content as shown below.
How do I run PHP on Ubuntu?
STEPS
- UPDATE & UPGRADE PACKAGES. Before starting the installation of packages, it’s better to update and upgrade the packages we have on our system. …
- INSTALL APACHE2. A PHP file requires a web server to run. …
- INSTALL PHP. PHP on Ubuntu can be installed using the below command. …
- INSTALL MYSQL. …
- INSTALL PHPMYADMIN.
13 апр. 2019 г.