Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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'm just trying to setup some simple things. I put an index.php file in my documentroot. index.html works just fine (sends a webpage). If I try index.php, it assumes I'm trying to download it. How do I know if php is working on apache? Where should I look?

share|improve this question
What system are you running this on? – Karol Piczak Apr 25 '10 at 18:21
up vote 3 down vote accepted

That will usually happen if you haven't added a handler to tell apache what to do with .php files. In your apache configuration file, you should have a line like:

LoadModule php5_module modules/

which actually loads the module, Then you'll need something like

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

To actually associate php files. Additionally, you can add:

DirectoryIndex index.php

which will treat index.php the same as index.html.

share|improve this answer

Your Answer


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.