Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have php 5.3.5 installed however when I try to execute a file with a .php extension I'm prompted to download a file . Now I tried a few solutions but it was redundant since most were just problems with apache config and making sure the module was loaded or adding the type to the apache config. those didnt work so I added the type of .html to the php application type and I can execute html files with php in them but not .php files.. any ideas?

share|improve this question

You have to set the correct handler for *.php files:

<FilesMatch \.php$>
    SetHandler application/x-httpd-php
</FilesMatch>

See the documentation for details: http://www.php.net/manual/en/install.unix.apache2.php

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.