Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

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
add comment

1 Answer 1

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
add comment

Your Answer

 
discard

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.