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 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 192.168.11.135] (13)Permission denied: exec of '/Users/abhic/Sites/index.php' failed [Thu Mar 18 00:17:18 2010] [error] [client 192.168.11.135] Premature end of script headers: index.php

<html>
<head>
    <title> Hello </title>
</head>

<body>
    <?php echo "Hello"; ?>
</body>

</html>

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

1 Answer 1

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

 
discard

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