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
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
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
Old 07-26-2008, 08:10 PM   #2 (permalink)
The Contributor
 
Join Date: Apr 2008
Location: Nevada, USA
Posts: 52
Thanks: 10
h0ly lag is on a distinguished road
Default

You can try make everything idiot proof, but there comes a point when you just need to give the user the push to figure it out themselves. In this case, the documentation. So, as you said, update the documentation and guide them there.
__________________
Send a message via AIM to h0ly lag Send a message via MSN to h0ly lag
h0ly lag is offline  
Reply With Quote
Old 07-26-2008, 11:34 PM   #3 (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

See I don't mind making things idiot proof if they help somebody who needs the help, my problem is what level of idiot proof do I take it to. Which is why, as you say, I'm working on the documentation all day today.

The funny thing about all this, I really had intended this to be used by other developers as a base for their own system - basically, here's I just saved you a week of programming, now build on to it as you see fit. Which is in direct contradiction to my own style of build it all yourself, but eh.
-m
delayedinsanity is offline  
Reply With Quote
Old 07-27-2008, 08:44 AM   #4 (permalink)
The Contributor
 
Join Date: Apr 2008
Location: Nevada, USA
Posts: 52
Thanks: 10
h0ly lag is on a distinguished road
Default

I'm sitting here chuckling to myself, that you have to genuinely think, "How can I make this any more simple for people." In my mind, if you've reached that point, that's where you need to draw the line for idiot proofing.
__________________
Send a message via AIM to h0ly lag Send a message via MSN to h0ly lag
h0ly lag is offline  
Reply With Quote
Old 07-27-2008, 09:24 AM   #5 (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

True that, but I also have to keep in mind differing levels of comprehension, I figure. I run into problems all the time in life where I understand something so I assume that others should too, and then I'm surprised when they don't follow along with a line of thought I have. I'm trying not to do that at least this once.
-m
delayedinsanity is offline  
Reply With Quote
Old 07-27-2008, 09:46 AM   #6 (permalink)
The Contributor
 
Join Date: Apr 2008
Location: Nevada, USA
Posts: 52
Thanks: 10
h0ly lag is on a distinguished road
Default

All to true man. The workplace is a prime example of assumed intelligence. The only advice I can still give you is to just go as far as your willing.

And on another note, why is it that we are both on TalkPHP at 2 in the morning?
__________________
Send a message via AIM to h0ly lag Send a message via MSN to h0ly lag
h0ly lag is offline  
Reply With Quote
Old 07-27-2008, 10:01 AM   #7 (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

We're not, I'm on at THREE in the morning. Just on my way to the fridge though...
-m
delayedinsanity is offline  
Reply With Quote
Old 07-27-2008, 10:06 AM   #8 (permalink)
The Contributor
 
Join Date: Apr 2008
Location: Nevada, USA
Posts: 52
Thanks: 10
h0ly lag is on a distinguished road
Default

Meh, it was two when I wrote the post. Were both in Nevada. Carson to be exact. Well, I'm in Carson, your in Vegas. That is beside the point. *Runs for another Dr. Pepper.*
__________________
Send a message via AIM to h0ly lag Send a message via MSN to h0ly lag
h0ly lag is offline  
Reply With Quote
Reply



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 02:53 AM.

 
     

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