[vox-tech] i've lost my php groove!

Peter Jay Salzman vox-tech@lists.lugod.org
Fri, 7 Jun 2002 06:18:50 -0700


when i started to learn php, i was worked on the file:

   http://www.dirac.org/p/crypto/index.php3

and life was good.  then i noticed that php4 has a foreach construct, so
i apt-get installed php4.   this apt-get removed php3.  fine.  the php
FAQ says the two can live side by side, but ok.  i don't mind.

at this point, apache seems to know what to do with .php files, but not
.php3 (not surprised) nor .php4 (surprised) files.

i made 3 copies of the same file:

   http://www.dirac.org/p/crypto/index.php
   http://www.dirac.org/p/crypto/index.php3
   http://www.dirac.org/p/crypto/index.php4

my server knows what to do with the 1st file, but not the last 2 files.
it's my understanding that /etc/apache/mime.types tells apache what
modules handle which file types:

application/x-httpd-php                phtml   pht   php
application/x-httpd-php-source         phps
application/x-httpd-php3               php3
application/x-httpd-php3-preprocessed  php3p
application/x-httpd-php4               php4

i don't mind renaming all my .php3 files to .php.  it's better than
having to rename them all to .php4.

but i'd like to understand why i had to use .php3 for php3 but .php for
php4.  what exactly is the difference between

   application/x-httpd-php

and

   application/x-httpd-php4

any idea why application/x-httpd-php4 seems to be an unknown type for my
server?  the module that gets loaded in httpd.conf is:

   LoadModule php4_module /usr/lib/apache/1.3/libphp4.so

pete