Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#84 Hard Coded File Extensions

enhancement
closed-fixed
Joe Stewart
5
2002-01-25
2001-02-24
tobozo
No

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.
http://www.phpwizard.net/projects/phpMyAdmin/
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 :
$PHORUM_CFG["FILE_EXT"]="php";
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.
http://www.phorum.org/download.php
Note : extensions are set to .php only

hope this helps

Discussion

  • Ajay Sharma
    Ajay Sharma
    2001-05-22

    Logged In: YES
    user_id=70334

    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
    user_id=77269

    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