Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Sep 2007 14:06:19 +1000 (EST)
From:      Ian Smith <smithi@nimnet.asn.au>
To:        Zbigniew Szalbot <zszalbot@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: php5-5.2.3_1 / website behaves as if not enabled in httpd.conf [SOLVED]
Message-ID:  <Pine.BSF.3.96.1070913132048.1842A-100000@gaia.nimnet.asn.au>
In-Reply-To: <20070912211348.8DFE616A4C5@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 12 Sep 2007 22:45:29 +0200 Zbigniew Szalbot wrote:

 > > > > Actually, maybe my description should be corrected - that is when I
 > > > > want to access a directory where index.php resides, apache will just
 > > > > display this directory content. But when I click (not reload) the php
 > > > > file, page is loaded correctly.

Ah right, that makes more sense, now matching my similar experience :)

 > > > maybe this was already mentioned, but what do you have DirectoryIndex
 > > > set to?
 > > >
 > > > it should look something like:
 > > >
 > > > DirectoryIndex index.html index.php
 > >
 > > All is fine here. I do have index.php listed. The file httpd.conf came
 > > almost without any modification (apart from usual php4 replaced php5
 > > references during update).
 > 
 > I was given advice on php list to comment out everything in mod_dir.c
 > starting from
 > <IfModule mod_dir.c>
 >     <IfModule mod_php3.c>
 >         <IfModule mod_php4.c>
 > 
 > and then enter just this:
 > 
 > <IfModule mod_dir.c>
 >    DirectoryIndex index.php index.php3 index.html index.htm
 > </IfModule>
 > 
 > Everything now works very well! Thank you all for your patience with me!

Cool.  That is why I'd asked earlier to see your <IfModule mod_dir.c>
section; I'd had exactly that same problem last December, which I solved
the long way around, adding what I thought was one way the php5 install
could/should have done it (which comes to the same thing, in the end):

<IfModule mod_dir.c>
    <IfModule mod_php3.c>
        <IfModule mod_php4.c>
            DirectoryIndex index.php index.php3 index.html
        </IfModule>
        <IfModule !mod_php4.c>
            DirectoryIndex index.php3 index.html
        </IfModule>
    </IfModule>
    <IfModule !mod_php3.c>
        <IfModule mod_php4.c>
            DirectoryIndex index.php index.html
        </IfModule>
        <IfModule !mod_php4.c>
            DirectoryIndex index.html
        </IfModule>
        #% 17/12/6 for php5 ..
        <IfModule mod_php5.c>
            DirectoryIndex index.php index.html
        </IfModule>
    </IfModule>
</IfModule>

Cheers, Ian




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.1070913132048.1842A-100000>