• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 657
  • Last Modified:

Apache does not grab index.php

Hi,
I configured apache to use files with extension *.php. For some reason when i point to folder, Apache does not take and display index.php automaticly. I have to scroll dawn list of files in folder to find index.php.
How to make apache server to grab index.php automaticly whenever i point to that folder.
Here are steps i did take when configuring php with apache.
By the way i am runing apache 2.0.5.2 and php 4-3-8 win32 on 2000 Server
1. Renamed php.ini-dist to php.ini and copy in C:\WINNT folder
2. Copy php4ts.dll into C:\program files\....\Apache2\bin(just did it, it wasn't, but still not working after restart of apache server)
3.Add three lines of AddType:
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
added -> AddType application/x-httpd-php .php
added -> AddType application/x-httpd-php .php3
added-> AddType application/x-httpd-php-source .phps
4. add one line of:
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
#LoadModule ssl_module modules/mod_ssl.so
LoadModule php4_module c:/php/sapi/php4apache2.dll
(php4apache2.dll is in path c:/php/sapi path)

And it is still not working.
Any Ideas?
Thank's
m
0
margotsk
Asked:
margotsk
  • 2
2 Solutions
 
hernst42Commented:
Hi margotsk,
add also

DirectoryIndex index.php

to you config (after teh AddType)

Cheers!
0
 
yuzhCommented:
check you http.conf file to make sure:

<IfModule mod_dir.c>
#    DirectoryIndex index.html
    DirectoryIndex index.html index.php index.php3 index.php4 index.htm index.shtml index.cgi
</IfModule>

    #
    # And for PHP 4.x, use:
    #
    AddType application/x-httpd-php .php

see http:Q_20849983.html

for more details
0
 
margotskAuthor Commented:
Thank's it works now.
Both of your answers work. I will give hernst42 150, since it solves the major problem and 100 pt to yuzh for adding additional info in better understaning.
I hope that's Ok, if not, please let me know
Cheers
0
 
yuzhCommented:
No problem with me, fair enough.

Cheers!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now