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?

2 Answers 2

3

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

Sign up to request clarification or add additional context in comments.

Comments

0

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...

1 Comment

I'm pretty sure it is. How would i tell?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.