Index page gets downloaded instead of display
When I upgraded the version of php from 5.6 to 7.2, my sites are not working and they gets downloaded instead of display.
Anyone please help.
-
Hi @revathy A lot of times this is caused by an incorrect add type handler in the .htaccess, can you show us what's present there for one of the sites? 0 -
We are having the same problem after a PHP-upgrade to 7.3. Most of the sites are working properly but on a few index.php gets downloaded instead of executed. One site is running PHP 7.3 (ea-php73) (inherited) and index.php gets downloaded on that site. This is the .htaccess for the site: RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] Options -MultiViews RewriteEngine On # Redirect Trailing Slashes If Not A Folder... RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)/$ /$1 [L,R=301] # Handle Front Controller... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] # BEGIN WordPress # END WordPress RewriteCond %{HTTP_HOST} ^vonotec\.com\.ph$ [OR] RewriteCond %{HTTP_HOST} ^www\.vonotec\.com\.ph$ RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$ RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$ RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$ RewriteRule ^/?$ "http\:\/\/vonotec\.net\/" [R=301,L] # php -- BEGIN cPanel-generated handler, do not edit # This domain inherits the "PHP" package. # php -- END cPanel-generated handler, do not edit
Thanks for any help resolving this issue.0 -
This is completely commented out: # php -- BEGIN cPanel-generated handler, do not edit # This domain inherits the "PHP" package. # php -- END cPanel-generated handler, do not edit
So that code wouldn't be having any effect. If you uncomment# This domain inherits the "PHP" package.
does the issue persist? Two other things: 1. What specific version of cPanel/WHM are you on? 2. If you run the following on the server does the behavior for this site (and the others with issues) change?mv /etc/apache2/conf/httpd.conf{,.bk} /scripts/rebuildhttpdconf /scripts/restartsrv_httpd0 -
Thanks for the help! I tried uncommenting... # This domain inherits the "PHP" package.
... but I had no luck with that. We have cpanel v80.0.18. I haven't tried rebuilding the httpd.conf yet. It feels a bit risky and I have to wait for my colleague (who is a lot more experienced with cpanel) to help me out with that.0 -
I finally figured this problem out: there was a redirect to another domain which had a PHP Version in the MultiPHP Manager selected which isn't even installed (PHP 5.6 (ea-php56)). When I changed to PHP 7.3 it started working. 0
Please sign in to leave a comment.
Comments
5 comments