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'me trying to use the in built web server on my iMac for testing my websites. PHP is not running for some reason. I've checked my httpd.conf file and the following line:

LoadModule php5_module libexec/apache2/

is uncommented. The following version is installed:

PHP 5.3.15 with Suhosin-Patch (cli) (built: Aug 24 2012 17:45:44) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

When I tried to access a PHP page in the browser it just outputs the actual PHP code.

Any help appreciated, I've been Googling this for a few hours and I'm not getting anywhere.

Regards, Stephen

share|improve this question
up vote 1 down vote accepted

Check your web server confg file for this line:

AddType application/x-httpd-php .php
share|improve this answer
Thanks @Krzysztof, that did the trick. All working now. – Stephen Dec 3 '12 at 12:19

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.