View Single Post
Old 07-26-2008, 07:57 PM   #1 (permalink)
delayedinsanity
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default Relative vs absolute paths

It's been so dead around here lately! I just had to say that.

Okay, so when I programmed this script for the oss community, I figured, you know, build an installation package for it. That'll make it hella easy for people to set up, because that'll take care of writing the config file, building the database, the whole nine yards. The only thing left for the end user is to go through a few pages (okay, 14 total) and edit one constant.

define('LIB_PATH', $_SERVER['DOCUMENT_ROOT'].'/bin/lib');

I figured set up like that, it would even cut down on the number of people that had to edit it.

However one of the biggest reports I get back about this system is that it can't find the necessary include files because they never edited that value, or they don't know what to edit it to (which ironically the failed to open stream error usually tells them where it needs to go, albeit indirectly).

So my first idea was fine, we'll take out LIB_PATH and we'll have the installation write an .htaccess which includes an addition to the php include path, so that none of the includes require a path. Then I instantly thought, well no, anybody not using apache would be left out.

So now I'm considering adding lib_path to the database config for those library files that still need it, and just making all the per page includes relative '../bin/lib/tuatara.config.php' paths.

What kind of problems this is going to raise, I don't know. Do you think making the paths relative is the best solution? Or should I just leave it how it is, and point people to the documentation? (which needs severe updating... going to go do that now.)
-m
delayedinsanity is offline  
Reply With Quote