I recently configured php7 on Ubuntu 14.04 by following blog http://www.zimuel.it/install-php-7 and I installed it successfully as per blog. but when try to run the php file (/var/www/test.php) then it is downloaded instead of executing. I have no idea what configuration I missed. and when I entered localhost in browser then it comes with response "it works".
(Edit) I had a similar problem that first looked like that Apache randomly showed me correct data and sometimes gave me a download option. It showed up that it was completely different processes that competed about answering to port 80. Killing everything alive fixed that problem and this has actually very little to do with the real problem. So the rows below actually solved the download-problem for me, at last.
LoadModule php7_module modules/libphp7.so
AddHandler php7-script .php
AddType application/x-httpd-php-source .phps
AddHandler application/x-httpd-php .phps
AddHandler application/x-httpd-php .php
AddType application/x-httpd-php .php
In your apache configuration in /etc/apache2/sites-available try to remove this lines with comments:
#RemoveHandler .php
#RemoveHandler .php7.0
#php_admin_value engine Off
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With