After PHP upgrade - Apache not serving *.PHP sites

2 posts / 0 new
Last post
#1 Sat, 05/21/2016 - 22:29
flameproof

After PHP upgrade - Apache not serving *.PHP sites

I updated CentOS 6 i686 to PHP7. I didn't see errors

*.html pages work, but *.php pages won't display and the browser wants to download the php file.

Apache was restarted, it seems I have all the right lines in httpd.conf

I deleted and re-installed one domain via webmin with just a phpinfo.php in the directory. Still, the page doesn't get displayed.

domain.com:20000 and domain.com:10000 work fine. Mail works fine too (well, didn't reload those servers yet).

Where can that error most likely be?

httpd.conf for the new domain:

<VirtualHost ***.**.***.**:80[****:**:1:b6::7896]:80>
SuexecUserGroup "#522" "#504"
ServerName newdomain.de
ServerAlias www.newdomain.de
ServerAlias webmail.newdomain.de
ServerAlias admin.newdomain.de
DocumentRoot /home/newdomain/public_html
ErrorLog /var/log/virtualmin/newdomain.de_error_log
CustomLog /var/log/virtualmin/newdomain.de_access_log combined
ScriptAlias /cgi-bin/ /home/newdomain/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/newdomain/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
AddType application/x-httpd-php .php
AddHandler fcgid-script .php
AddHandler fcgid-script .php7.0
FCGIWrapper /home/newdomain/fcgi-bin/php7.0.fcgi .php
FCGIWrapper /home/newdomain/fcgi-bin/php7.0.fcgi .php7.0
</Directory>
<Directory /home/newdomain/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.newdomain.de
RewriteRule ^(.*) https://newdomain.de:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.newdomain.de
RewriteRule ^(.*) https://newdomain.de:10000/ [R]
RemoveHandler .php
RemoveHandler .php7.0
FcgidMaxRequestLen 1073741824
php_admin_value engine Off
</VirtualHost>
<VirtualHost ***.**.***.**:443[****:**:1:b6::7896]:443>
SuexecUserGroup "#522" "#504"
ServerName newdomain.de
ServerAlias www.newdomain.de
ServerAlias webmail.newdomain.de
ServerAlias admin.newdomain.de
DocumentRoot /home/newdomain/public_html
ErrorLog /var/log/virtualmin/newdomain.de_error_log
CustomLog /var/log/virtualmin/newdomain.de_access_log combined
ScriptAlias /cgi-bin/ /home/newdomain/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/newdomain/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
AddType application/x-httpd-php .php
AddHandler fcgid-script .php
AddHandler fcgid-script .php7.0
FCGIWrapper /home/newdomain/fcgi-bin/php7.0.fcgi .php
FCGIWrapper /home/newdomain/fcgi-bin/php7.0.fcgi .php7.0
</Directory>
<Directory /home/newdomain/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.newdomain.de
RewriteRule ^(.*) https://newdomain.de:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.newdomain.de
RewriteRule ^(.*) https://newdomain.de:10000/ [R]
RemoveHandler .php
RemoveHandler .php7.0
FcgidMaxRequestLen 1073741824
php_admin_value engine Off
SSLEngine on
SSLCertificateFile /home/newdomain/ssl.cert
SSLCertificateKeyFile /home/newdomain/ssl.key
</VirtualHost>
Sun, 05/22/2016 - 01:13
flameproof

Update:

It seems some settings got change during the PHP upgrade. This change did bring most pages back most pages (seems some code is disliked by PHP 7)

Webmin > Server > Apache > Existing Virtual Host > virtual server > PHP > PHP Admin Configuration Values > Engine > On

Topic locked