[SOLVED] php files downloading rather than displaying

Hi all

I have recently installed VirtualBox and phpVirtualBox on my system and now no sites will display. Instead it tries to download the pages. Could someone please tell me which file I need to look at to get them to display again correctly. I have checked a lot of other sites and followed their guides but most are aimed at php5 and not php7.

Any help greatly appreciated.

Chris: Adelphia Interactive

Desktop: Windows 10 Pro x64
Server: Ubuntu
Webmin/Virtualmin: Latest (daily updates)

OK, I’ve resolved the issue. The issue was caused by the installation of VirtualBox and / or phpVirtualBox changing a setting in the mods-enabled/php7.0.conf file.


<FilesMatch “.+.ph(p[3457]?|t|tml)$”>
SetHandler application/x-httpd-php

After (the fix):

<FilesMatch “.+.ph(p[3457]?|t|tml)$”>
#SetHandler application/x-httpd-php

Any file extension that downloads instead of executing needs a mime type - in days of old you had to set up many mime types just so you could play a mp3 or avi

1 Like

Worked! But after the change dont forget to: 1) restart apache 2) clean browser cash

1 Like

OK. Where’s the “unsubscribe” button? I’m trying to not receive any further comments as the topic is marked as SOLVED.

Worked! Thanks a lot!

I have the same problem but since Centos 7.7 if I try to enter my website I download the php