#84 Hard Coded File Extensions


This is (yet) another problem about the navbar.class but it
involves a few other .php3 .class and .tpl files as well.

Since I had to spend a few hours converting filenames and references
from .php3 to .php (the server wouldn't allow .php3 to be parsed
by the php4 engine and I am *not* root), I had a look at how to
manage different extensions so phpslash would'nt be a hassle to
install even if application/x-httpd-php is set to only .html or .php
on the local apache configuration.
I have no access to the server config (as usual) nor have I any
control on the .htaccess.

I found two good examples that deal with this extension issue :
phpMyAdmin and Phorum .

PhpMyAdmin is downloadable in two formats, .php3 and .php
directly from their website, it helps a lot even if it does not cover
the (very rare) situations where .html files only are parsed by the
php engine.
Note : extension is still .php3 on their cvs repository

The Phorum (phorum.org) has a variable in its config file that contains
the extension of all the files to be used :
This extension is reused for every inclusion or navigational reference.
You still have to change manually the file extensions if the .php doesnt
work on your server but there is no hacking to do afterwards, just one
variable to change in the config file and it's ready to run.
Note : extensions are set to .php only

hope this helps


  • Ajay Sharma

    Ajay Sharma - 2001-05-22

    Logged In: YES

    I brought this up on the mailing list and the general
    feeling is that this is a big change and should be in 0.7.

  • Ajay Sharma

    Ajay Sharma - 2001-08-15
    • summary: The Road to 0.65 : File Extension, php3, php or... ? --> Hard Coded File Extensions
  • Joe Stewart

    Joe Stewart - 2002-01-25

    Logged In: YES

    The shell script extchg.sh is in the contrib directory now.
    Running this command can change all php3 files and
    references to php3 files to php.

  • Joe Stewart

    Joe Stewart - 2002-01-25
    • assigned_to: nobody --> joestewart
    • status: open --> closed-fixed

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks