Sean Middleditch wrote:
> 
> Jean-Michel Dault wrote:
> 
> > On Mon, 10 Jul 2000, Sean Middleditch wrote:
> >
> > > Hi.  Make sure you have PHP configured in /etc/httpd/conf/httpd.conf.
> > > For example, when I installed MDK 7.1, PHP was enables, but not for
> > > index pages with a .phtml extension, so I had to change that.  Just make
> > > sure it is all set up.  Also, check the php3.ini file.
> >
> > Beware, as .phtml is for PHP/FI (php2), and is not supported anymore. All
> > new scripts should have ".php" as their extension.
> 
> Really?  I had always thought it the other way around...  My mistake.  ^,^

Actually, the extension doesn't matter at all as long as you're willing
to tweak Apache's configuration a little. At the moment PHP/FI 2.x is
still in use in some places, so RedHat/Mandrake Apache packagers include
the following MIME type bindings with it:

AddType application/x-httpd-php3 .php3
AddType application/x-httpd-php3-source .phps
# The following is for PHP/FI (PHP2):
#AddType application/x-httpd-php .phtml

However, there's nothing that would prevent the admin from modyfing the
above to his taste - you can assign any other extension with PHP, and
you can also not use any special extension at all. Myself, I use the
following to enable PHP scripting on a per-directory/per-file basis (in
a .htaccess file in a directory):

<Files "myscript.html">
AddType application/x-httpd-php3 .html
</Files>

...and the file gets parsed even though the extension is still ".html".

> Sean Middleditch

-- 
Grzegorz Staniak <[EMAIL PROTECTED]>

Reply via email to