Answer the question
In order to leave comments, you need to log in
PHP stopped being interpreted by Apache, what could be the cause?
I am a user of the ubuntu 14.04 system, it costs apache 2.4. and php 5.5.9.1
The matter of installation was still in the summer. Everything worked fine. In the last two days. The only thing that changed drastically in the system was the attempt to install Krita and Pinta, there seemed to be nothing more significant. I did not perform any settings for new local servers.
Just in one day, instead of working out the interpreter when requesting a php file on any domain, Chrome now offers to download them.
I suspect that this is most likely in Apache, since when loading sites on nginx php seems to work as it should.
Apache itself starts without errors. In the logs when accessing the site, it is written
[Fri Oct 23 16:49:20.046612 2015] [authz_core:debug] [pid 9386] mod_authz_core.c(802): [client 127.0.0.1:55545] AH01626: authorization result of <RequireAny>: granted
[Fri Oct 23 14:19:32.167175 2015] [mpm_prefork:notice] [pid 17003] AH00163: Apache/2.4.7 (Ubuntu) configured -- resuming normal operations
[Fri Oct 23 14:19:32.193444 2015] [core:notice] [pid 17003] AH00094: Command line: '/usr/sbin/apache2'
[Fri Oct 23 14:49:57.661341 2015] [mpm_prefork:notice] [pid 17003] AH00169: caught SIGTERM, shutting down
[Fri Oct 23 14:56:17.755882 2015] [mpm_prefork:notice] [pid 3268] AH00163: Apache/2.4.7 (Ubuntu) configured -- resuming normal operations
Answer the question
In order to leave comments, you need to log in
First, try something simple:
Next, check httpd.conf for:
AddHandler application/x-httpd-php .php5 .php4 .php .php3 .php2 .phtml
AddType application/x-httpd-php .php5 .php4 .php .php3 .php2 .phtml
For those who have just maybe installed Linux and configured apache2 with virtual hosts, you can use the command naturally in the terminal!
echo 'AddType application/x-httpd-php .php .html ' | sudo tee -a /etc/apache2/ httpd.conf
echo display
' AddType application/x-httpd-php .php .html ' what needs to be displayed for php code to work correctly in html
sudo tee -a how to do
/etc/apache2 /httpd.conf where to do it
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question