Answer the question
In order to leave comments, you need to log in
Why is php not working in ubuntu?
Installed apache, php using this link Installing Lamp
First, I installed apache2, added chrome localhost in the address bar and the picture appeared as in the manual.
Next, I created a test.site folder, as well as on the site, and installed php.
php -v outputs
PHP 7.0.30-0ubuntu0.16.04.1 (cli) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.30-0ubuntu0.16.04.1, Copyright (c) 1999-2017, by Zend Technologies
phpinfo() Answer the question
In order to leave comments, you need to log in
sudo apt-get update
sudo apt-get install libapache2-mod-php7.0
sudo a2enmod php7.0
sudo service apache2 restart
Try to do it like this.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question