Apache not executing PHP

I put my blog in the user/sites/blog folder which has an index.php file to start the blog but when call the URL in Firefox I get a blank page and in Safari I get the following message:
Safari can’t open the page.
Safari can’t open the page “ http://192.168.0.5/~user/blog/” because the server unexpectedly dropped the connection. This sometimes occurs when the server is busy. Wait for a few minutes, and then try again.

The httpd.conf file has the

LoadModule php5_module modules/php5.3/libphp5.so

uncommented.

Any idea why the php script does not execute

MacBookpro 17", Mac OS X (10.6.2)

Posted on May 27, 2010 8:46 PM

Reply
24 replies

May 30, 2010 9:50 AM in response to alkhater

when I go to a site that has an index.php I get a directory listing.


Are you specifically requesting a .php page in the request? or just the directory?

If you just ask for a directory then Apache will search for a filename listed in the DirectoryIndex directly - typically index.html. If that file doesn't exist then it may serve a directory listing (depending on the config).

If you want it to serve index.php as a default page you need to add 'index.php' to the DirectoryIndex directive in your configuration.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Apache not executing PHP

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.