Error 404, Installing PHP on Apache, Mac

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mike Goh

    Error 404, Installing PHP on Apache, Mac

    I am trying to install PHP 5.3.2 and Apache2.2 on my Mac.

    After adding in
    1. LoadModule php5_module modules/libphp5.so
    2. <IfModule dir_module>
    DirectoryIndex index.php index.html
    </IfModule>
    3. AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps
    in <IfModule mime_module> </IfModule>

    I am able to display the index.html but when I try to display index.php which contains my phpinfo(), I received a 404 Error below.

    Not Found

    The requested URL /index.php was not found on this server.

    Can anyone help me please? Thanks a lot!
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    Are you sure you have the index.php file in the right place?

    Incorrectly configured PHP setup shouldn't produce a 404 error. It should either give you a 50x error or just prompt you to download the file.

    Comment

    • Dormilich
      Recognized Expert Expert
      • Aug 2008
      • 8694

      #3
      have you disabled the Apache default installation*? where did you place your file?


      * - every Mac comes with Apache2 (from 10.5, I think) and PHP installed.
      Last edited by Dormilich; Oct 12 '10, 07:04 AM.

      Comment

      Working...