P
P
png23782015-06-12 23:20:05
PHP
png2378, 2015-06-12 23:20:05

Why do PHP pages want to open as files?

After migrating a site from http to https, sometimes (randomly) PHP pages try to open as files.

Screenshot:
1b9e5b56efe44997b127b9406f3bc224.png

When I try to open it in a text editor, nothing special happens, it opens an empty file. The site has been spinning on a regular hosting for a long time and there has never been such a problem. What is it at all and how can it be fixed?

Browser - Firefox, if that matters.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
PO6OT, 2015-06-13
@woonem

I used to have such problems.
Add the following lines to .htaccess at the site root (or to apache.conf or httpd.conf in the /etc/apache/ folder):
AddHandler application/x-httpd-php .php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question