Unknown format file is downloaded when url is accessed

0

I have migrated my website to a linux server. Before it was working fine but now when ever I try to access my website an unknown format file is downloaded every time. I tried to change permissions from Cpanel but nothing happened.

You can also look at falaktextile.com.

Thank you.

Rafay Zia Mir

Posted 2015-05-06T14:15:46.330

Reputation: 143

2The server serves the php file instead of executing it. You should tell apache to execute php. One way to do this is to install and enable mod_php. How to do this depends on your linux distribution. – user49740 – 2015-05-06T14:21:24.880

Answers

1

On Debian style distros (Debian, Ubuntu, etc.), you need to:

apt-get update
apt-get install php5
/etc/init.d/apache2 restart

After that, your php code gets executed on the server side and html will be returned to browser.

On RedHat style distros (Fedora, CentOS, etc.), you need to:

yum install php5
service apache2 restart

Hope this helps.

Tomas Tudja

Posted 2015-05-06T14:15:46.330

Reputation: 137

0

You need to either reinstall PHP or ensure your Apache configuration is setup correctly. It's outputting your actual PHP code rather than executing it. Depending on distro, you can run dpkg-reconfigure php5

rotten777

Posted 2015-05-06T14:15:46.330

Reputation: 11