0

Seems easy, right? Done it a million times, right? Me too. For some reason this isn't working on an A2 hosting configuration. Anyone have any ideas?

In .htaccess in "/" directory

AddType application/x-httpd-php .html

test.php which is "Hello World" executes just fine. test.html downloads instead of parsing.

I have read lots of Q&As and no luck. What is missing? What other configs can I examine? Thanks.

csi
  • 1,555
  • 7
  • 23
  • 42

3 Answers3

3

I don't know if this is legal or not but I am responding to my own question so the answer is there for others to use in the future.

For some reason the default file permissions were all set to 777 or 666 which caused issues with them being served correctly. By adjusting the file permissions to 644, these issues were solved. Of course the .htaccess AddType was also required.

csi
  • 1,555
  • 7
  • 23
  • 42
0

Is the module loaded? E.g. LoadModule php5_module modules/libphp5.so

Mark Wagner
  • 18,019
  • 2
  • 32
  • 47
  • I added ` # If the PHP5 module has NOT already been loaded, load it LoadModule php5_module modules/libphp5.so ` but that creates a server error. How else can I check if the module loaded? .php files work so I assume that it works? – csi Apr 18 '11 at 20:15
  • I misread your post. My answer is wrong. – Mark Wagner Apr 18 '11 at 20:52
0

look if .htaccess is allowed to be read into the directory you have it. into httpd.conf you will need to have AllowOverride for that location see http://httpd.apache.org/docs/2.0/howto/htaccess.html

silviud
  • 2,687
  • 2
  • 18
  • 19