TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 07-26-2008, 07:57 PM   #1 (permalink)
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
 



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 01:01 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design