Results 1 to 3 of 3
  1. #1
    Apache Not Reading PHP....
    Ok, So I go to my local IP, and I get my directory listing, all good so far....

    But when I click a PHP file, it just displays the code, or better still, asks me to download the php file.

    I installed Zend Studio Server yesterday, with php5, but still no luck.

    Web sharing is enabled. Using a Mac Mini 1.42 with 512MB of RAM

    Any help is much appreciated as always


  2. #2
    What is the extension of the file that you wrote the php on? If it is anything other than .php, you are probably going to have to set it up to parse PHP in that type of file. For example, if it is a .htm or .html file.

  3. #3

    petenet's Avatar
    Member Since
    Jan 13, 2006
    Chicago, IL
    MacBook Pro 2.8Ghz, 4GB RAM, 500GB HDD
    try adding these statements to the httpd.conf file -

    AddType application/x-httpd-php .php .phtml
    AddType application/x-httpd-php-source .phps

    Do a search of it, drop them in right after AddHandler server-parsed .shtml

    Then restart the webserver.

    Also, create a file called something like test.php and put this in it: <?phpinfo()?>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Apache and PHP
    By giszzmo in forum OS X - Operating System
    Replies: 3
    Last Post: 09-24-2011, 05:16 PM
  2. Apache works, but PHP will not
    By Mac4Work in forum Web Design and Hosting
    Replies: 5
    Last Post: 12-23-2008, 12:07 PM
  3. All in 1; php/apache/mysql ?
    By gab1982 in forum Running Windows (or anything else) on your Mac
    Replies: 5
    Last Post: 08-31-2004, 04:41 PM
  4. Apache/PHP
    By psychotoe in forum OS X - Development and Darwin
    Replies: 2
    Last Post: 08-12-2004, 07:10 PM
  5. Apache + PHP + MySQL
    By Emrys in forum OS X - Development and Darwin
    Replies: 2
    Last Post: 11-14-2003, 02:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts