I am brand new to Apache and PHP.
I created a helloworld.php file and when I run it, the file downloads and the command is never executed.
I use Ubuntu 16.04 with Apache 2 and PHP 7.1 .
I tried completely reinstalling everything and also editing the apache2.conf file with this :
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
But this did not work.
I tried installing LAMP from : https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-16-04
But during the last step, I created an info.php file with these lines of code :
<?php
phpinfo();
?>
And the above lines were displayed as it is.
I tried finding the solution, but most of them mention a httpd.conf file, which I am not able to find anywhere.
I know this question has been asked multiple times before, but I didn't find a satisfactory solution.
http://localhost/file.phporfile:///file.phpdirectly in the browser? @HarshBhardwaj