0

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?

1
  • What system are you running this on? Apr 25, 2010 at 18:21

1 Answer 1

3

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/libphp5.so

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .