0

Possible Duplicate:
What causes PHP pages to consistently download instead of running normally

All php files on my website are prompting direct download instead of viewing the page.

So for example: going to mydomain.com/index.php in browser will direct download the index.php file.

All my files are completely naked to the public.

I'm not sure how this happened, how can i trouble shoot this?

I am using linux, centos, with cPanel. My htaccess file is empty.

Greatestswordsman
  • 397
  • 1
  • 7
  • 19

1 Answers1

2

You probably don't have the php module loaded for Apache :

Try the following command

apachectl -M

In the output you should see

 php5_module (shared)

If you don't: 1. make sure php is installed 2. It is enabled in the Apache configuration files:

more /etc/httpd/conf.d/php.conf

<IfModule prefork.c>
  LoadModule php5_module modules/libphp5.so
</IfModule>

AddHandler php5-script .php
AddType text/html .php
DirectoryIndex index.php

Since you are using CPanel you should be able to enable for your server through the CPanel configuration options.

thanosk
  • 940
  • 7
  • 16