Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 just set up Web Sharing in Mac OS X 10.6.2 Snow Leopard. My httpd.conf allows for ExecCGI and all the folders and files are readable by everybody and even writable by me.

I put a simple Hello World in index.php in my base site and yet my apache error log shows this:

[Thu Mar 18 00:17:18 2010] [error] [client] (13)Permission denied: exec of '/Users/abhic/Sites/index.php' failed [Thu Mar 18 00:17:18 2010] [error] [client] Premature end of script headers: index.php

    <title> Hello </title>

    <?php echo "Hello"; ?>


is what my index.php looks like placed in /Users/abhic/Sites

My browser shows a 500 Internal Server Error

Any help would do me good in the middle of the night. I have been trying to solve this for way too long.

Thank you.

share|improve this question
up vote 1 down vote accepted

It looks like you may have attempted to configure php to be executed as CGI. This would not be the ideal implementation for PHP.

Do you have handlers specified? Is the module loaded?

If you provide your full configuration file, we should be able to help you.

share|improve this answer
Do I copy paste the entire httpd.conf file here? – user38027 Mar 18 '10 at 3:18
Thank you, it worked! I just took out .php from this line in my httpd.conf AddHandler cgi-script .cgi .php .pl – user38027 Mar 18 '10 at 3:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.