I recently configured php7 on Ubuntu 14.04, following the blog http://www.zimuel.it/install-php-7, and successfully installed it according to the blog. but when you try to run the php file (/var/www/test.php) it loads instead of executing. I have no idea what configuration I missed. and when I entered localhost in the browser, it comes up with the answer "it works."
You need to enable PHP under Apache, for example:
sudo a2dismod php5sudo service apache2 restartsudo cp / etc / apache2 / mods-available / php5.conf / etc / apache 2 / mods-enabled / php7.confsudo service apache2 restart
sudo a2dismod php5
sudo service apache2 restart
sudo cp / etc / apache2 / mods-available / php5.conf / etc / apache 2 / mods-enabled / php7.conf
: http://www.hashbangcode.com/blog/compiling-and-installing-php7-ubuntu
(Edit) , , Apache . , , 80. , . , , .
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
Ubuntu 18.04. , .
1: , php7 /etc/apache2/mods-available. , php7.conf php7.load 3, .
/etc/apache2/mods-available
php7.conf
php7.load
2. php7 apache. php7.2, , sudo apt-get install libapache2-mod-php7.2. php , .
sudo apt-get install libapache2-mod-php7.2
3: apache. sudo a2enmod php7.2 .
sudo a2enmod php7.2
4: Apache, sudo service apache2 restart.
CentOS 7 php 7.2 php 5.6 PHP , !
apache /etc/apache2/sites-available :
#RemoveHandler .php #RemoveHandler .php7.0 #php_admin_value engine Off
Source: https://habr.com/ru/post/1619654/More articles:How to hide the context menu of CefSharp.WinForms.ChromiumWebBrowser? - .netНа каких типах данных я могу использовать предложение Oracle PL/SQL RANGE для ограничения переменной? - oraclereadv () failed to execute a PROPFIND request while reading php: // input (PHP 7, nginx) - phpСоздайте Vec> от Vec > - collectionsIs there any java bean generation in eclipse? - eclipseHow can I use this parallel sum function to use vector instructions? - c ++RecyclerView with packaging content elements - androidOverwrite __init__ from a complex object - pythonIs it possible to add a CHECK constraint using the free API in EF7? - entity-framework-coreDatabase queries freeze for 5-6 seconds every minute - c #All Articles