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.


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.

  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy