tags:

views:

157

answers:

2

I have been having some problems trying to get my PHP running. When I try and run any scripts they appear in the source and do not run properly. This is the htaccess file:

# Use PHP5 as default
AddHandler application/x-httpd-php5 .php
AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php

Could this be the error?

A: 

is libphp5.so loaded?

That AddHandler directive, I believe, should be:

AddType application/x-httpd-php .php

I'm not sure what the x-mapp-php5 directives are for though...

Gabriel Ross
I'm pretty sure it is. How would i tell?
Drew
alas that doesn't help
Drew
+3  A: 

Change AddHandler application/x-httpd-php5 .php to AddHandler application/x-httpd-php .php and ensure the file you're hitting has the .php extension. Also comment out those other two AddType/AddHandler lines (the x-mapp-* ones). What someone else said about making sure the module is loaded or compiled in is worth checking too.

To check if the module is installed, you should have somewhere in your Apache configuration a line something like this (path may differ in your environment):

LoadModule php5_module /usr/lib/apache2/modules/libphp5.so

noob source