Apache suddenly downloads PHP instead of executing it ... but only on one virtual site?

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Apache suddenly downloads PHP instead of executing it ... but only on one virtual site?

Carl Fink-6
Hi, Apache experts.

My server supports several virtual hosts (rwhutter.com, finknetwork.com,
learnhere.info) that use PHP. Two are running WordPress. Under
finknetwork.com is a Tiny Tiny RSS (www.tt-rss.org) installation at
(http://finknetwork.com/tt-rss/). This is not packaged for Debian, so I
installed it manually. It worked fine until yesterday, then suddenly the
PHP scripts started downloading instead of running.

The same darn Apache 2 instance continues to work fine for two separate
WordPress setups.

However, a third WP that I set up years ago under finknetwork.com also
stopped working: (http://finknetwork.com/learning/).

What the heck?

Debian Jesse server, with these packages:

apache2                            2.4.25-3+deb9u9|
libapache2-mod-php7.0    7.0.33-0+deb9u6

a2enmod reports that the PHP7.0 module is already enabled.

What changed in the past couple of days to cause this? Why are the
WordPress sites unaffected? How can I fix this?

Thanks for your attention.

There is no .htaccess. Contents of finknetwork.com.conf follow:

<VirtualHost *:80>
SuexecUserGroup "#1000" "#1000"
ServerName finknetwork.com
ServerAlias www.finknetwork.com
ServerAlias webmail.finknetwork.com
ServerAlias admin.finknetwork.com
ServerAlias autoconfig.finknetwork.com
ServerAlias autodiscover.finknetwork.com
DocumentRoot /home/finknetwork/public_html
ErrorLog /var/log/virtualmin/finknetwork.com_error_log
CustomLog /var/log/virtualmin/finknetwork.com_access_log combined
ScriptAlias /cgi-bin/ /home/finknetwork/cgi-bin/
ScriptAlias /awstats/ /home/finknetwork/cgi-bin/
ScriptAlias /AutoDiscover/AutoDiscover.xml
/home/finknetwork/cgi-bin/autoconfig.cgi
ScriptAlias /Autodiscover/Autodiscover.xml
/home/finknetwork/cgi-bin/autoconfig.cgi
ScriptAlias /autodiscover/autodiscover.xml
/home/finknetwork/cgi-bin/autoconfig.cgi
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/finknetwork/public_html>
Options +Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
allow from all
AllowOverride All
Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
AddType application/x-httpd-php .php
</Directory>
<Directory /home/finknetwork/cgi-bin>
allow from all
AllowOverride All
Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.finknetwork.com
RewriteRule ^(.*) https://finknetwork.com:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.finknetwork.com
RewriteRule ^(.*) https://finknetwork.com:10000/ [R]
RemoveHandler .php
RemoveHandler .php7.0
#php_admin_value engine Off
<Files awstats.pl>
AuthName "finknetwork.com statistics"
AuthType Basic
AuthUserFile /home/finknetwork/.awstats-htpasswd
require valid-user
</Files>
Redirect /mail/config-v1.1.xml /cgi-bin/autoconfig.cgi
Redirect /.well-known/autoconfig/mail/config-v1.1.xml
/cgi-bin/autoconfig.cgi
IPCCommTimeout 31
php_admin_value engine Off
</VirtualHost>

--
Carl Fink                           [hidden email]

Read my blog at blog.nitpicking.com.  Reviews!  Observations!

Reply | Threaded
Open this post in threaded view
|

Re: Apache suddenly downloads PHP instead of executing it ... but only on one virtual site?

Xavier Guimard-3
Le 29/10/2019 à 04:21, Carl Fink a écrit :

> Hi, Apache experts.
>
> My server supports several virtual hosts (rwhutter.com, finknetwork.com,
> learnhere.info) that use PHP. Two are running WordPress. Under
> finknetwork.com is a Tiny Tiny RSS (www.tt-rss.org) installation at
> (http://finknetwork.com/tt-rss/). This is not packaged for Debian, so I
> installed it manually. It worked fine until yesterday, then suddenly the
> PHP scripts started downloading instead of running.
>
> The same darn Apache 2 instance continues to work fine for two separate
> WordPress setups.
>
> However, a third WP that I set up years ago under finknetwork.com also
> stopped working: (http://finknetwork.com/learning/).
>
> What the heck?
>
> Debian Jesse server, with these packages:
>
> apache2                            2.4.25-3+deb9u9|
> libapache2-mod-php7.0    7.0.33-0+deb9u6
>
> a2enmod reports that the PHP7.0 module is already enabled.
>
> What changed in the past couple of days to cause this? Why are the
> WordPress sites unaffected? How can I fix this?
>
> Thanks for your attention.

Hi,

did you take a look at your logs (apache2 logs and php logs) ? Could you
share them with us ?

Reply | Threaded
Open this post in threaded view
|

Re: Apache suddenly downloads PHP instead of executing it ... but only on one virtual site?

Carl Fink-6
On 10/29/19 2:19 AM, Xavier wrote:
> did you take a look at your logs (apache2 logs and php logs) ? Could you
> share them with us ?
>
Good point. I plead "I was really tired when I posted."

Of course, I don't know what to look for. I just tried to view the
tt-rss page and only the access.log file updated, so here are the last
20 lines of that:

50.63.185.234 - - [29/Oct/2019:08:37:13 +0000] "GET //print.cgi
HTTP/1.1" 404 367 "-" "() { :;};echo; /bin/bash -c \" echo 2014 | md5sum\""
66.249.65.213 - - [29/Oct/2019:08:51:39 +0000] "GET /robots.txt
HTTP/1.1" 404 404 "-" "Mozilla/5.0 (compatible; Googlebot/2.1;
+http://www.google.com/bot.html)"
66.249.65.211 - - [29/Oct/2019:08:51:39 +0000] "GET
/manual/ko/mod/mod_socache_shmcb.html HTTP/1.1" 200 2631 "-"
"Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.96 Mobile
Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
109.104.240.33 - - [29/Oct/2019:09:14:37 +0000] "GET / HTTP/1.1" 200
10947 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36
(KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36"
178.93.26.5 - - [29/Oct/2019:09:33:09 +0000] "GET / HTTP/1.1" 200 10947
"-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/51.0.2704.103 Safari/537.36"
176.214.60.106 - - [29/Oct/2019:10:04:58 +0000] "GET / HTTP/1.0" 200
10966 "-" "-"
66.249.65.211 - - [29/Oct/2019:10:05:31 +0000] "GET
/manual/en/mod/mod_filter.html HTTP/1.1" 200 8336 "-" "Mozilla/5.0
(Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML,
like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible;
Googlebot/2.1; +http://www.google.com/bot.html)"
77.120.54.54 - - [29/Oct/2019:10:09:26 +0000] "GET / HTTP/1.1" 200 3315
"-" "Mozilla/5.0 (Windows NT 5.1; rv:9.0.1) Gecko/20100101 Firefox/9.0.1"
77.120.54.54 - - [29/Oct/2019:10:09:27 +0000] "GET /HNAP1/ HTTP/1.1" 404
348 "-" "Mozilla/5.0 (Windows NT 5.1; rv:9.0.1) Gecko/20100101
Firefox/9.0.1"
46.188.46.142 - - [29/Oct/2019:10:35:12 +0000] "GET / HTTP/1.1" 200
10947 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36
(KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
151.80.36.188 - - [29/Oct/2019:11:07:20 +0000] "GET / HTTP/1.0" 200
10966 "-" "masscan/1.0 (https://github.com/robertdavidgraham/masscan)"
66.249.65.213 - - [29/Oct/2019:11:18:36 +0000] "GET
/manual/en/programs/httpd.html HTTP/1.1" 200 4155 "-" "Mozilla/5.0
(Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML,
like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible;
Googlebot/2.1; +http://www.google.com/bot.html)"
221.231.126.2 - - [29/Oct/2019:12:04:26 +0000] "GET / HTTP/1.1" 200
11003 "http://65.99.217.144:80" "Mozilla/4.0 (compatible; MSIE 9.0;
Windows NT 6.1)"
66.249.65.211 - - [29/Oct/2019:12:34:45 +0000] "GET
/manual/es/mod/mod_socache_shmcb.html HTTP/1.1" 200 2631 "-"
"Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.96 Mobile
Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
213.6.199.106 - - [29/Oct/2019:13:14:16 +0000] "GET / HTTP/1.1" 200
10947 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36
(KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36"
93.170.112.67 - - [29/Oct/2019:13:25:06 +0000] "GET / HTTP/1.1" 200
10947 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36
(KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36"
109.116.119.16 - - [29/Oct/2019:13:45:28 +0000] "POST
/editBlackAndWhiteList HTTP/1.1" 404 367 "-" "ApiTool"
193.224.40.254 - - [29/Oct/2019:13:51:06 +0000] "-" 408 0 "-" "-"
66.249.65.211 - - [29/Oct/2019:14:07:45 +0000] "GET
/manual/es/mod/mod_lbmethod_bytraffic.html HTTP/1.1" 200 3206 "-"
"Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.96 Mobile
Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
66.249.65.209 - - [29/Oct/2019:15:21:55 +0000] "GET
/manual/en/mod/mod_version.html HTTP/1.1" 200 3612 "-" "Mozilla/5.0
(Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML,
like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible;
Googlebot/2.1; +http://www.google.com/bot.html)"


That last line seems to be the only relevant one, based on times. The
browser, oddly shown to be for Android 6.0.1, is really Waterfox for
Linux. (?) Just for comparison I tried the same thing from Chromium
under Debian Buster.

66.249.65.209 - - [29/Oct/2019:15:21:55 +0000] "GET
/manual/en/mod/mod_version.html HTTP/1.1" 200 3612 "-" "Mozilla/5.0
(Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML,
like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible;
Googlebot/2.1; +http://www.google.com/bot.html)"

Still no idea why it is downloading rather than interpreting the PHP.

Thank you, Xaver.

--
Carl Fink [hidden email]
Read my blog at blog.nitpicking.com. Reviews! Observations!

Reply | Threaded
Open this post in threaded view
|

Re: Apache suddenly downloads PHP instead of executing it ... but only on one virtual site?

Norbert Kiszka
W dniu wto, 29.10.2019 o godzinie 11∶27 -0400, użytkownik Carl Fink
napisał:

> On 10/29/19 2:19 AM, Xavier wrote:
> > did you take a look at your logs (apache2 logs and php logs) ?
> > Could you
> > share them with us ?
> >
> Good point. I plead "I was really tired when I posted."
>
> Of course, I don't know what to look for. I just tried to view the
> tt-rss page and only the access.log file updated, so here are the
> last
> 20 lines of that:
>
> 50.63.185.234 - - [29/Oct/2019:08:37:13 +0000] "GET //print.cgi
> HTTP/1.1" 404 367 "-" "() { :;};echo; /bin/bash -c \" echo 2014 |
> md5sum\""
> 66.249.65.213 - - [29/Oct/2019:08:51:39 +0000] "GET /robots.txt
> HTTP/1.1" 404 404 "-" "Mozilla/5.0 (compatible; Googlebot/2.1;
> +http://www.google.com/bot.html)"
> 66.249.65.211 - - [29/Oct/2019:08:51:39 +0000] "GET
> /manual/ko/mod/mod_socache_shmcb.html HTTP/1.1" 200 2631 "-"
> "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P)
> AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.96 Mobile
> Safari/537.36 (compatible; Googlebot/2.1; +
> http://www.google.com/bot.html)"
> 109.104.240.33 - - [29/Oct/2019:09:14:37 +0000] "GET / HTTP/1.1" 200
> 10947 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36
> (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36"
> 178.93.26.5 - - [29/Oct/2019:09:33:09 +0000] "GET / HTTP/1.1" 200
> 10947
> "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML,
> like
> Gecko) Chrome/51.0.2704.103 Safari/537.36"
> 176.214.60.106 - - [29/Oct/2019:10:04:58 +0000] "GET / HTTP/1.0" 200
> 10966 "-" "-"
> 66.249.65.211 - - [29/Oct/2019:10:05:31 +0000] "GET
> /manual/en/mod/mod_filter.html HTTP/1.1" 200 8336 "-" "Mozilla/5.0
> (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36
> (KHTML,
> like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible;
> Googlebot/2.1; +http://www.google.com/bot.html)"
> 77.120.54.54 - - [29/Oct/2019:10:09:26 +0000] "GET / HTTP/1.1" 200
> 3315
> "-" "Mozilla/5.0 (Windows NT 5.1; rv:9.0.1) Gecko/20100101
> Firefox/9.0.1"
> 77.120.54.54 - - [29/Oct/2019:10:09:27 +0000] "GET /HNAP1/ HTTP/1.1"
> 404
> 348 "-" "Mozilla/5.0 (Windows NT 5.1; rv:9.0.1) Gecko/20100101
> Firefox/9.0.1"
> 46.188.46.142 - - [29/Oct/2019:10:35:12 +0000] "GET / HTTP/1.1" 200
> 10947 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36
> (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
> 151.80.36.188 - - [29/Oct/2019:11:07:20 +0000] "GET / HTTP/1.0" 200
> 10966 "-" "masscan/1.0 (https://github.com/robertdavidgraham/masscan)
> "
> 66.249.65.213 - - [29/Oct/2019:11:18:36 +0000] "GET
> /manual/en/programs/httpd.html HTTP/1.1" 200 4155 "-" "Mozilla/5.0
> (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36
> (KHTML,
> like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible;
> Googlebot/2.1; +http://www.google.com/bot.html)"
> 221.231.126.2 - - [29/Oct/2019:12:04:26 +0000] "GET / HTTP/1.1" 200
> 11003 "http://65.99.217.144:80" "Mozilla/4.0 (compatible; MSIE 9.0;
> Windows NT 6.1)"
> 66.249.65.211 - - [29/Oct/2019:12:34:45 +0000] "GET
> /manual/es/mod/mod_socache_shmcb.html HTTP/1.1" 200 2631 "-"
> "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P)
> AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.96 Mobile
> Safari/537.36 (compatible; Googlebot/2.1; +
> http://www.google.com/bot.html)"
> 213.6.199.106 - - [29/Oct/2019:13:14:16 +0000] "GET / HTTP/1.1" 200
> 10947 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36
> (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36"
> 93.170.112.67 - - [29/Oct/2019:13:25:06 +0000] "GET / HTTP/1.1" 200
> 10947 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36
> (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36"
> 109.116.119.16 - - [29/Oct/2019:13:45:28 +0000] "POST
> /editBlackAndWhiteList HTTP/1.1" 404 367 "-" "ApiTool"
> 193.224.40.254 - - [29/Oct/2019:13:51:06 +0000] "-" 408 0 "-" "-"
> 66.249.65.211 - - [29/Oct/2019:14:07:45 +0000] "GET
> /manual/es/mod/mod_lbmethod_bytraffic.html HTTP/1.1" 200 3206 "-"
> "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P)
> AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.96 Mobile
> Safari/537.36 (compatible; Googlebot/2.1; +
> http://www.google.com/bot.html)"
> 66.249.65.209 - - [29/Oct/2019:15:21:55 +0000] "GET
> /manual/en/mod/mod_version.html HTTP/1.1" 200 3612 "-" "Mozilla/5.0
> (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36
> (KHTML,
> like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible;
> Googlebot/2.1; +http://www.google.com/bot.html)"
>
>
> That last line seems to be the only relevant one, based on times.
> The
> browser, oddly shown to be for Android 6.0.1, is really Waterfox for
> Linux. (?) Just for comparison I tried the same thing from Chromium
> under Debian Buster.
>
> 66.249.65.209 - - [29/Oct/2019:15:21:55 +0000] "GET
> /manual/en/mod/mod_version.html HTTP/1.1" 200 3612 "-" "Mozilla/5.0
> (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36
> (KHTML,
> like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible;
> Googlebot/2.1; +http://www.google.com/bot.html)"
>
> Still no idea why it is downloading rather than interpreting the PHP.
>
> Thank you, Xaver.
>
> --
> Carl Fink [hidden email]
> Read my blog at blog.nitpicking.com. Reviews! Observations!
>

Can You look into Apache error log(s)? Syslog?

Anybody did anything in this server when this was happen?

Reply | Threaded
Open this post in threaded view
|

Re: Apache suddenly downloads PHP instead of executing it ... but only on one virtual site?

Carl Fink-6
On 10/29/19 1:59 PM, Norbert Kiszka wrote:
> Can You look into Apache error log(s)? Syslog?
>
> Anybody did anything in this server when this was happen?

Apache's error.log hasn't been updated since I restarted Apache. Here
are the only 3 lines:

[Tue Oct 29 06:32:35.034304 2019] [mpm_prefork:notice] [pid 2460]
AH00163: Apache/2.4.25 (Debian) OpenSSL/1.0.2t mod_fcgid/2.3.9
configured -- resuming normal operations
[Tue Oct 29 06:32:35.034385 2019] [core:notice] [pid 2460] AH00094:
Command line: '/usr/sbin/apache2'
[Tue Oct 29 08:37:11.046031 2019] [cgi:error] [pid 18982] [client
50.63.185.234:35868] AH02811: script not found or unable to stat:
/usr/lib/cgi-bin/status

I tend to keep "tail -f /var/log/syslog" open whenever I'm doing
sysadmin stuff. The only thing appearing in syslog throughout my Apache
testing is Postfix reporting connections. No Apache messages at all. I'm
the only one doing anything sysadminish on this server.

Thank you, Norbert.

--
Carl Fink                           [hidden email]

Read my blog at blog.nitpicking.com.  Reviews!  Observations!

Reply | Threaded
Open this post in threaded view
|

Re: Apache suddenly downloads PHP instead of executing it ... but only on one virtual site?

Norbert Kiszka
W dniu wto, 29.10.2019 o godzinie 14∶25 -0400, użytkownik Carl Fink
napisał:

> On 10/29/19 1:59 PM, Norbert Kiszka wrote:
> > Can You look into Apache error log(s)? Syslog?
> >
> > Anybody did anything in this server when this was happen?
>
> Apache's error.log hasn't been updated since I restarted Apache.
> Here
> are the only 3 lines:
>
> [Tue Oct 29 06:32:35.034304 2019] [mpm_prefork:notice] [pid 2460]
> AH00163: Apache/2.4.25 (Debian) OpenSSL/1.0.2t mod_fcgid/2.3.9
> configured -- resuming normal operations
> [Tue Oct 29 06:32:35.034385 2019] [core:notice] [pid 2460] AH00094:
> Command line: '/usr/sbin/apache2'
> [Tue Oct 29 08:37:11.046031 2019] [cgi:error] [pid 18982] [client
> 50.63.185.234:35868] AH02811: script not found or unable to stat:
> /usr/lib/cgi-bin/status
>
> I tend to keep "tail -f /var/log/syslog" open whenever I'm doing
> sysadmin stuff. The only thing appearing in syslog throughout my
> Apache
> testing is Postfix reporting connections. No Apache messages at all.
> I'm
> the only one doing anything sysadminish on this server.
>
> Thank you, Norbert.
>


ls -l `find /etc/apache2/mods-enabled -iname "*php*"`
ls -l `find /etc/apache2/mods-available -iname "*php*"`


Try to remove "AddType application/x-httpd-php .php" from vhost conf.

Reply | Threaded
Open this post in threaded view
|

Re: Apache suddenly downloads PHP instead of executing it ... but only on one virtual site?

Carl Fink-6
On 10/29/19 2:35 PM, Norbert Kiszka wrote:
> ls -l `find /etc/apache2/mods-enabled -iname "*php*"`
> ls -l `find /etc/apache2/mods-available -iname "*php*"`
root@finknetwork:/var/log/apache2# ls -l `find /etc/apache2/mods-enabled
-iname "*php*"`
lrwxrwxrwx 1 root root 29 Oct 28 02:14
/etc/apache2/mods-enabled/php7.0.conf -> ../mods-available/php7.0.conf
lrwxrwxrwx 1 root root 29 Oct 28 02:14
/etc/apache2/mods-enabled/php7.0.load -> ../mods-available/php7.0.load
root@finknetwork:/var/log/apache2# ls -l `find
/etc/apache2/mods-available -iname "*php*"`
-rw-r--r-- 1 root root 867 May 10  2016
/etc/apache2/mods-available/php5.conf
-rw-r--r-- 1 root root 121 Oct 28 02:09
/etc/apache2/mods-available/php5.load
-rw-r--r-- 1 root root 867 Mar  8  2019
/etc/apache2/mods-available/php7.0.conf
-rw-r--r-- 1 root root 102 Mar  8  2019
/etc/apache2/mods-available/php7.0.load
> Try to remove "AddType application/x-httpd-php .php" from vhost conf.

I removed this from /etc/apache2/sites-available/finknetwork.com.conf
and restarted apache. No difference.

Thanks again.

--
Carl Fink                           [hidden email]

Read my blog at blog.nitpicking.com.  Reviews!  Observations!

Reply | Threaded
Open this post in threaded view
|

Re: Apache suddenly downloads PHP instead of executing it ... but only on one virtual site?

Carl Fink-6
On 10/29/19 3:09 PM, Carl Fink wrote:
On 10/29/19 2:35 PM, Norbert Kiszka wrote:
ls -l `find /etc/apache2/mods-enabled -iname "*php*"`
ls -l `find /etc/apache2/mods-available -iname "*php*"`
root@finknetwork:/var/log/apache2# ls -l `find /etc/apache2/mods-enabled -iname "*php*"`
lrwxrwxrwx 1 root root 29 Oct 28 02:14 /etc/apache2/mods-enabled/php7.0.conf -> ../mods-available/php7.0.conf
lrwxrwxrwx 1 root root 29 Oct 28 02:14 /etc/apache2/mods-enabled/php7.0.load -> ../mods-available/php7.0.load
root@finknetwork:/var/log/apache2# ls -l `find /etc/apache2/mods-available -iname "*php*"`
-rw-r--r-- 1 root root 867 May 10  2016 /etc/apache2/mods-available/php5.conf
-rw-r--r-- 1 root root 121 Oct 28 02:09 /etc/apache2/mods-available/php5.load
-rw-r--r-- 1 root root 867 Mar  8  2019 /etc/apache2/mods-available/php7.0.conf
-rw-r--r-- 1 root root 102 Mar  8  2019 /etc/apache2/mods-available/php7.0.load
Try to remove "AddType application/x-httpd-php .php" from vhost conf.

I removed this from /etc/apache2/sites-available/finknetwork.com.conf and restarted apache. No difference.

Thanks again.

OK, just for fun I explicitly visited
http://finknetwork.com/tt-rss/index.php

... rather than rely on the DirectoryIndex configuration parameters. And the result is *weird*:

Fatal Error: You forgot to copy config.php-dist to config.php and edit it.\n"; exit; } // we need a separate check here because functions.php might get parsed // incorrectly before 5.3 because of :: syntax. if (version_compare(PHP_VERSION, '5.6.0', '<')) { print "Fatal Error: PHP version 5.6.0 or newer required. You're using " . PHP_VERSION . ".\n"; exit; } set_include_path(dirname(__FILE__) ."/include" . PATH_SEPARATOR . get_include_path()); require_once "autoload.php"; require_once "sessions.php"; require_once "functions.php"; require_once "sanity_check.php"; require_once "version.php"; require_once "config.php"; require_once "db-prefs.php"; if (!init_plugins()) return; login_sequence(); header('Content-Type: text/html; charset=utf-8'); ?>

get_hooks(PluginHost::HOOK_MAIN_TOOLBAR_BUTTON) as $p) { echo $p->hook_main_toolbar_button(); } ?>
get_hooks(PluginHost::HOOK_TOOLBAR_BUTTON) as $p) { echo $p->hook_toolbar_button(); } ?>
menu

????

-- 
Carl Fink                           [hidden email] 

Read my blog at blog.nitpicking.com.  Reviews!  Observations!
Reply | Threaded
Open this post in threaded view
|

Re: Apache suddenly downloads PHP instead of executing it ... but only on one virtual site?

Carl Fink-6
On 10/29/19 6:37 PM, Carl Fink wrote:

OK, just for fun I explicitly visited
http://finknetwork.com/tt-rss/index.php

... rather than rely on the DirectoryIndex configuration parameters. And the result is *weird*:

Fatal Error: You forgot to copy config.php-dist to config.php and edit it.\n"; exit; } // we need a separate check here because functions.php might get parsed // incorrectly before 5.3 because of :: syntax. if (version_compare(PHP_VERSION, '5.6.0', '<')) { print "Fatal Error: PHP version 5.6.0 or newer required. You're using " . PHP_VERSION . ".\n"; exit; } set_include_path(dirname(__FILE__) ."/include" . PATH_SEPARATOR . get_include_path()); require_once "autoload.php"; require_once "sessions.php"; require_once "functions.php"; require_once "sanity_check.php"; require_once "version.php"; require_once "config.php"; require_once "db-prefs.php"; if (!init_plugins()) return; login_sequence(); header('Content-Type: text/html; charset=utf-8'); ?>

get_hooks(PluginHost::HOOK_MAIN_TOOLBAR_BUTTON) as $p) { echo $p->hook_main_toolbar_button(); } ?>
get_hooks(PluginHost::HOOK_TOOLBAR_BUTTON) as $p) { echo $p->hook_toolbar_button(); } ?>
menu

????

And solved.

In /etc/apache2/sites-available/finknetwork.com.conf was the directive:

php_admin_value engine Off

Turning that on re-activated PHP.

I have zero idea why it was off, but wow, that was a lot of effort to fix.

Thanks to everyone who read and especially everyone who tried to help.

-- 
Carl Fink                           [hidden email] 

Read my blog at blog.nitpicking.com.  Reviews!  Observations!