+ Post New Thread
Results 1 to 2 of 2
Web Development Thread, PHP file lists contents in Coding and Web Development; When I try to open localhost/index.php, I just get a list of what's in the index.php. It doesn't execute. The ...
  1. #1

    Join Date
    May 2007
    Posts
    84
    Thank Post
    0
    Thanked 3 Times in 2 Posts
    Rep Power
    14

    PHP file lists contents

    When I try to open localhost/index.php, I just get a list of what's in the index.php. It doesn't execute. The apache server seems to be running OK and I think PHP is installed OK. Any ideas what's wrong ?

  2. #2

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,372
    Thank Post
    624
    Thanked 949 Times in 651 Posts
    Blog Entries
    2
    Rep Power
    317
    Apache doesn't know to use PHP to handle .php files.

    If the PHP modules for PHP is installed, IIRC you will need something like this in your Apache conf file:

    Code:
    AddType application/x-httpd-php .php
    Is this on Linux or Windows? If Windows then you could use an all-in-one Apache/PHP/MySQL package such as WAMP.

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 5
    Last Post: 29th January 2013, 10:16 AM
  2. Replies: 10
    Last Post: 5th February 2009, 05:46 PM
  3. Backup Tapes Contents
    By Grommit in forum Windows
    Replies: 7
    Last Post: 17th April 2007, 09:28 PM
  4. Replies: 1
    Last Post: 21st January 2007, 02:51 PM
  5. Deploy the contents of a CAB file through GPO?
    By tosca925 in forum Windows
    Replies: 0
    Last Post: 16th October 2005, 12:46 PM

Thread Information

Users Browsing this Thread

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

Posting Permissions

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