View Full Version : php question
purduematt
May 5, 2003, 08:57 AM
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
mnkeybsness
May 5, 2003, 11:16 AM
i assume you are using mac os x client...
you will need to modify the httpd.conf file...
read the instructions on this site (http://www.entropy.ch/software/macosx/php/#install)
purduematt
May 5, 2003, 01:32 PM
i entered those commands in when i installed php, and then entered them again just to be sure...still not working though
thanks, matt
mnkeybsness
May 5, 2003, 07:05 PM
i know that i've needed a lot of help with getting php to work on my machines...
this thread (http://forums.macrumors.com/showthread.php?s=&threadid=23732&highlight=php)
and this thread (http://forums.macrumors.com/showthread.php?s=&threadid=25312&highlight=php)
were really helpful...mostly rower_cpu
it really helps if you copy and paste in here any error messages you may be getting.
Rower_CPU
May 5, 2003, 08:29 PM
Check out O'reilly for lots of good info on Apache on Mac OS X.
Here's an article that details editing httpd.conf to add other default indexes:
http://www.macdevcenter.com/pub/a/mac/2002/01/29/apache_macosx_four.html
purduematt
May 6, 2003, 10:43 AM
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
Rower_CPU
May 6, 2003, 10:52 AM
That typically means that PHP isn't running. Did you already uncomment the lines in httpd.conf to enable it?
purduematt
May 6, 2003, 11:02 AM
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
Rower_CPU
May 6, 2003, 11:29 AM
Honestly, I've just sort of muddled until I got things figured out. Any number of books would be good. Again, O'reilly's website is great.
Here's an article on enabling PHP in Jaguar, so you can double-check your settings.
http://www.macdevcenter.com/pub/a/mac/2003/04/22/apache_jaguar_pt3.html
purduematt
May 6, 2003, 12:57 PM
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
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.