Search Advanced search…. New posts. Search forums. Log in. Install the app. For a better experience, please enable JavaScript in your browser before proceeding. You are using an out of date browser. It may not display this or other websites correctly. You should upgrade or use an alternative browser. Thread starter Aileron79 Start date May 14, Tags apache 2. Aileron79 New Pleskian. Hi everybody, I have running many PHP sites on my Plesk server, however, a single one just keeps on offering PHP-files for download instead of executing them.
The landing page Example Domain loads perfectly and prints something like "Forwarding to login page". After a few seconds, the index. I created a simple phpinfo.
After updating PHP to 7. I previously has a similar issue, after upgrading from 5. I spent two days tracking this and found out that I was putting my PHP scripts in the wrong directory. I just started PHP work, so I don't know if my solution relates to the version change you went through. I had this problem. It turned out that I had both nginx and apache installed and automatically starting on boot. The problem was that nginx was binding to the http port first which prevented apache from starting.
It's also possible that you have nginx running but your php is set up to run with apache. To verify, run service nginx status and service apache2 status to see which is running. In the case that nginx is running and apache is not, just run sudo service nginx stop; sudo service apache2 start and your server will now serve php files as expected. I know that there are 1. So I figured that I would add the solution to my problem here. If I commented these two lines out in my.
I have no idea what they do or how they got there, - but it is in every one of my. I have VirtualMin installed on an Ubuntu I upgraded to PHP version 7. I got the error that his post talks about: For every site on my VPS, it simply downloaded the index. I had a similar problem to the OP when upgrading php5 from an older version, to 5.
I'm running a LAMP setup on a machine on my local network, which I use to preview changes to websites before I upload those changes to the actual live server. So I maintain a perfect local mirror of the actual site.
After the upgrade, files which run and display perfectly on the actual site would not display, or would only display html on the local machine. PHP was not parsed. The phpinfo command worked, so I knew php was otherwise working.
The log generated no errors. Viewing the page source showed me the actual php code. This worked. I got this kind of problem. This is how I solve it. Different type of PHP versions installed to my computer. Then I remove some PHP packages from my previous list, using apt-get purge.
For people who have found this post from Google almost 6 years in the future and beyond! Another possible cause of this problem could be that you are trying to run the script in a "user directory" from the the UserDir module. Running PHP scripts in user directories is disabled by default. You must comment or delete the tag block at the bottom that reads. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams?
Collectives on Stack Overflow. Learn more. Apache is downloading php files instead of displaying them Ask Question. Asked 8 years, 3 months ago.
In this article, I will share various steps of website management that will help your site operate smoothly. Having a strong online presence, particularly a website, can greatly become a good avenue for generating more revenue.
In this article, I will share with you how a good website will trigger your sales to a great level. Welcome Guest!
Apache downloading PHP files instead of executing and serving web pages. Rogers Mukalele June 23, Share This Post. Share on facebook. Share on linkedin. But If you are still getting the error : Config file php5. So here is another possible cause: If you have something like AddHandler x-mapp-php6.
Please take a look at your addtype directives. Clearing your browser cache is always a good idea. AddHandler php5-script. DirectoryIndex index. You can begin installation of modules like, sudo apt-get install libapache2-mod-php7. Thanks to all!!!
Do NOT set it to On as it prevents. I had constructed a test. If none of the above works, try commenting out the line SetHandler Then I check PHP is enabled.
I check installed PHP packages. I think this will help anyone.
0コメント