From: Paul J. T. <cap...@sq...> - 2002-08-28 18:02:33
|
What was I thinking? I must have been on drugs or something when I wrote my first email and Magnus helped me realize that. It would be absolutely REDICULOUS to dynamically compute the path for all SquirrelMail users. Let me explain. I would guess that around 0.1% (or less) of SquirrelMail page loads occur after a SquirrelMail installation has been recently moved. Therefore, that makes about 99.9% of page loads happening elsewhere. So, why the heck would we do this dynamic computation thing? We are going to put a feature in there (dynamic absolute path computation) that is going to have almost no real use? Sure, those few times you do want to move things around, it would be nice. But it isn't that big of a deal to just enter the path. We do this dynamic thing and we should be slapped around for wasting billions (or more) CPU cycles around the world. Bah. So, this leaves us with just adding it as a configuration thing in conf.pl. Someone, stick it in. And then let's get to converting things over from relative to absolute path references. Of course, the loading of config.php will have to remain relative, but that should pretty much be it. Anyone who has any great reason that they think this is a bad decision, speak now. The ONLY thing I could possibly think that might make dynamic path computation make sense would be if you had multiple machines serving up the same SquirrelMail installation from NFS or some other file sharing method. And then you DIDN'T have the common sense to actually put the SquirrelMail installation in the same place on each webserver. And I don't think that is significant enough of a reason. Speaking of such things, we should have a discussion here sometime about ways of creating SquirrelMail clusters... Some variety of distributed SquirrelMail webserver environment. After all, don't we want to be able to tell the world how scalable SquirrelMail is? :) Paul > I agree, the ../../.. stuff is ugly as sin. > > Since we already define a couple of absolute path variables > in config.php (data_dir, attachment_dir) I don't see that having to > define sm_path in there too is such a big deal. > > If people want to move stuff around a lot, one could create > a function (maybe called in validate.php) that examines sm_path; if > empty string, run dynamicallyComputePath and be done with it. > > RPM installers, or people which do not wish to move squirrelmail dir > on a daily basis (probably the bulk of users) will save a few cpu cycles > > > /magnus > > Paul Joseph Thompson wrote: >> >> What an interesting discussion. >> >> I think that the relative path include stuff that SquirrelMail does right >> now is confusing and sloppy. >> >> However, I also agree that forcing the administrator to set the path is a >> little annoying. Though, honestly, this really wouldn't be THAT big of a >> deal. >> >> My suggestion is that we need to dream up some way to generate the >> absolute path of the SquirrelMail installation dynamically. Maybe I am >> wrong, but I doubt it. >> >> This would be defined as a constant... >> >> define(SMPATH, $dynamicallyComputedPath); >> >> Or something like that. Then we replace all the relative crap and get rid >> of the chdir stuff. >> >> Then one catch here is that all files would need to include the file that >> contained the dynamic find my dir code. I don't know exactly how that >> would work. >> >> So, anyone have a bright idea how to pull this off? I think that it would >> be good for SquirrelMail. I could probably come up with something myself, >> but should probably rather do some work work... >> >> -- >> Paul Joseph Thompson >> cap...@sq... >> AIM/Yahoo/MSN IM: Captain Bunzo >> ICQ Number: 38801719 >> >> ------------------------------------------------------- >> This sf.net email is sponsored by: Jabber - The world's fastest growing >> real-time communications platform! Don't just IM. Build it in! >> http://www.jabber.com/osdn/xim >> -- >> squirrelmail-devel mailing list >> List Address: squ...@li... >> List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-devel >> http://squirrelmail.org/cvs > -- Paul Joseph Thompson cap...@sq... AIM/Yahoo/MSN IM: Captain Bunzo ICQ Number: 38801719 |