[SOLVED] php files downloading rather than displaying

6 posts / 0 new
Last post
#1 Wed, 12/06/2017 - 05:04
adelphia
adelphia's picture

[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 16.0.4.2LTS
Webmin/Virtualmin: Latest (daily updates)

Wed, 12/06/2017 - 06:52
adelphia
adelphia's picture

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.

Before:

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


After (the fix):

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

Chris: Adelphia Interactive
Desktop: Windows 10 Pro x64
Server: Ubuntu 16.0.4.2LTS
Webmin/Virtualmin: Latest (daily updates)

Wed, 07/17/2019 - 05:01 (Reply to #2)
netplayer

Worked! Thanks a lot!

Tue, 07/24/2018 - 04:03
Roborough
Roborough's picture

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

Mon, 06/10/2019 - 09:17
navehay

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

Mon, 06/10/2019 - 10:42
adelphia
adelphia's picture

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

Chris: Adelphia Interactive
Desktop: Windows 10 Pro x64
Server: Ubuntu 16.0.4.2LTS
Webmin/Virtualmin: Latest (daily updates)

Topic locked