php question

Discussion in 'Mac Help/Tips' started by purduematt, May 5, 2003.

  1. purduematt macrumors newbie

    Joined:
    Jul 17, 2002
    #1
    is there a way to get apache to recognize index.php so that it displays index.php instead of displaying a list of files for a given directory?

    Thanks,

    Matt
     
  2. mnkeybsness macrumors 68030

    mnkeybsness

    Joined:
    Jun 25, 2001
    Location:
    Moneyapolis, Minnesota
    #2
    i assume you are using mac os x client...

    you will need to modify the httpd.conf file...

    read the instructions on this site
     
  3. purduematt thread starter macrumors newbie

    Joined:
    Jul 17, 2002
    #3
    i entered those commands in when i installed php, and then entered them again just to be sure...still not working though

    thanks, matt
     
  4. mnkeybsness macrumors 68030

    mnkeybsness

    Joined:
    Jun 25, 2001
    Location:
    Moneyapolis, Minnesota
    #4
    i know that i've needed a lot of help with getting php to work on my machines...

    this thread

    and this thread

    were really helpful...mostly rower_cpu

    it really helps if you copy and paste in here any error messages you may be getting.
     
  5. Rower_CPU Moderator emeritus

    Rower_CPU

    Joined:
    Oct 5, 2001
    Location:
    San Diego, CA
    #5
  6. purduematt thread starter macrumors newbie

    Joined:
    Jul 17, 2002
    #6
    thanks to everybody for trying to help me get this solved. i think that i am almost there.

    I added index.php to the DirectoryIndex line in my httpd.conf file, now it opens index.php, but doesn't go through the php processing engine, it shows all my php code when you go to view source in the browser. any suggestions to fix this?

    Thanks again,

    matt
     
  7. Rower_CPU Moderator emeritus

    Rower_CPU

    Joined:
    Oct 5, 2001
    Location:
    San Diego, CA
    #7
    That typically means that PHP isn't running. Did you already uncomment the lines in httpd.conf to enable it?
     
  8. purduematt thread starter macrumors newbie

    Joined:
    Jul 17, 2002
    #8
    i did not personally uncomment the lines, but i think that one of the commands i entered when i installed php did this.


    interestingly enough, when i type in index.php it shows the page how it should be.

    all this has made me realize how much i do now know about this. is there a good book on apache administration that you might suggest.

    thanks, matt
     
  9. Rower_CPU Moderator emeritus

    Rower_CPU

    Joined:
    Oct 5, 2001
    Location:
    San Diego, CA
    #9
  10. purduematt thread starter macrumors newbie

    Joined:
    Jul 17, 2002
    #10
    Rower_cpu:

    thanks again for all your help... i went back and edited the httpd.conf again after reading both of the articles, and i finally got it to work. i really do appreciate the help.

    i deffinately feel like i have muddled through this one too

    Matt
     

Share This Page