I have uncommented the following line to have php beeing taken into account by apache:

LoadModule php5_module        libexec/apache2/libphp5.so

I then created a test.php file with

<?php phpinfo(); ?>

and restarted apache

sudo apachectl graceful

But the php file is not taken into account, I just get the plain html.

Any idea ?

link|improve this question

44% accept rate
feedback

2 Answers

see this http://www.phpied.com/installing-php-and-apache-on-mac-osx-that-was-pretty-easy/

link|improve this answer
I followed this one also but did not get any more chance. I went with MAMB instead. – Luc Apr 8 '11 at 13:43
feedback

From the Terminal:

sudo cp /private/etc/php.ini.default /private/etc/php.ini

And then restart Apache again. You need a php.ini file to use PHP, and by default there is not one in place.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.