From: <jak...@se...> - 2003-02-18 14:17:45
|
Mitra, You are very right. My patch was not pretty, I even did not post it to CVS. Your approach seems OK. > -----Original Message----- > From: Mitra [mailto:mit...@ea...] > Sent: Tuesday, February 18, 2003 12:28 AM > To: Jakub Adamek; apc...@li... > Subject: RE: [Apc-aa-general] 'cannot redeclare' error > > > Thanks Jakub > > Lets try and tackle this one, rather than patching it - otherwise I > think it will come back and get us at a later time. > > I'm looking at what calls what using the following unix ... > > cd apc-aa > egrep -r 'require_once.*auth.php3|require_once.*sess' * | egrep -v > '~:|^pts|/.#' > > I suggest that we adopt the following conventions > > 1: extsessi or extsess are only called from locsessi or locsess > Violators .... > include/locauth - I don't know what this file is used for, maybe it > should be able to call extsess or extsessi > > 2: locsess and locsessi should not called from inside another > include/* file, this is because only the higher level files know > whether its encapsulated or not > Violators .... > include/viewobj.php3 (mitra) > include/auth.php3 (jakub) (aut.php3 is also called by Fixed (removed the link). > include/event_handler) > include/constedit_list.php3 (I don't know whose this is, it > doesn't even have a CVS header, and outputs HTML from an Include > file! Its also not called from anywhere else so I suggest removing it) Removed from CVS. I created it for some project but it is called from outside and thus should not be in include and better to be removed. Jakub > > > The only problem I see is that viewobj.php3 needs DB_AA which is in > extsess & extsessi. > > one thought is to move them from there to either util.php3 or > their own file. > > I've compared DB_AA in extsess and extsessi, and the onyl difference > is that extsess sets $AutoFree = 'yes', can anyone see why this > should be different between extsess and extsessi, surely we want to > free up spare database connections inboth cases (if that is what > AutoFree does). > > Jakub - do you agree with these conventions? I think it > should fix it ? > > - Mitra > > > > At 8:56 PM +0100 17/2/03, Jakub Adamek wrote: > >I have added "if (class_exists (DB_AA)) return;" to extsess and > >extsessi, it helps in some cases. > > > >Jakub > > > >> -----Original Message----- > >> From: apc...@li... > >> [mailto:apc...@li...] On > Behalf Of Mitra > >> Sent: Sunday, February 16, 2003 10:49 PM > >> To: William Wong; ja...@ra...; > apc...@li... > >> Subject: Re: [Apc-aa-general] 'cannot redeclare' error > >> > >> > >> No - unfortunately that isn't the problem - the problem > is to do with > >> two different files locsessi which includes extsessi > which includes > >> session.inc and locsess which includes extsess which includes > >> session.inc, > >> > >> - Mitra > >> > >> > >> At 3:27 PM -0500 16/2/03, William Wong wrote: > >> >I'm not too sure bout the extent of the problem, but couldn't a > >> >require_once solve that? > >> > > >> >- Will > >> > > >> >----- Original Message ----- > >> >From: "Mitra" <mit...@ea...> > >> >To: <ja...@ra...>; <apc...@li...> > >> >Sent: Saturday, February 15, 2003 8:05 PM > >> >Subject: RE: [Apc-aa-general] 'cannot redeclare' error > >> > > >> > > >> >> The problem is that this code is being included twice - > >> there are > >> >> problems with require, which are being discussed on the > >> apc-aa-coders > >> >> list. > >> >> > >> >> - Mitra > >> >> > >> >> > >> >> At 11:36 AM -0500 15/2/03, Jane Will wrote: > >> >> >I have commented out the following lines in the > >> >> >/apc-aa/include/phplib/session.inc file: >The pages work > >> now, but > >> >> will not cleaning up the old session >data have some > bad effect ? > >> >> > > >> >> >Thanks, > >> >> >Jane > >> >> > > >> >> > ## > >> >> > ## Garbage collection > >> >> > ## > >> >> > ## Destroy all session data older than this > > > >> > ## > > > >> > ## function gc() { > > > >> > ## srand(time()); > > > >> > ## if ((rand()%100) < $this->gc_probability) { > > > >> > ## $this->that->ac_gc($this->gc_time, $this->name); > >> >> > ## } > > > >> > ## } > > > >> > > > > >> > > > > >> > > > > >> >------------------------------------------------------- > > > >> >This sf.net email is sponsored by:ThinkGeek > > > >> >Welcome to geek heaven. > >> >> >http://thinkgeek.com/sf > >> >> >_______________________________________________ > >> >> >apc-aa-general mailing list > >> >> >apc...@li... > >> >> >https://lists.sourceforge.net/lists/listinfo/apc-aa-general > > > >> > >> >> > >> >> -- > >> >> Mitra Technology Consulting - www.mitra.biz - > mi...@mi... > >> >> 02-6684-8096 or 0414-648-0722 > >> >> > >> >> Life is a Mystery to be Lived, not a Problem to be Solved > >> >> > >> >> > >> >> > >> >> ------------------------------------------------------- > >> >> This sf.net email is sponsored by:ThinkGeek > >> >> Welcome to geek heaven. > >> >> http://thinkgeek.com/sf > >> >> _______________________________________________ > >> >> apc-aa-general mailing list > apc...@li... > >> >> https://lists.sourceforge.net/lists/listinfo/apc-aa-general > >> >> > >> > > >> > > >> > > >> >------------------------------------------------------- > >> >This sf.net email is sponsored by:ThinkGeek > >> >Welcome to geek heaven. > >> >http://thinkgeek.com/sf > >> >_______________________________________________ > >> >apc-aa-general mailing list > >> >apc...@li... > >> >https://lists.sourceforge.net/lists/listinfo/apc-aa-general > >> > >> > >> -- > >> Mitra Technology Consulting - www.mitra.biz - mi...@mi... > >> 02-6684-8096 or 0414-648-0722 > >> > >> Life is a Mystery to be Lived, not a Problem to be Solved > >> > >> > >> > >> ------------------------------------------------------- > >> This sf.net email is sponsored by:ThinkGeek > >> Welcome to geek heaven. > >> http://thinkgeek.com/sf > >> _______________________________________________ > >> apc-aa-general mailing list > >> apc...@li... > >> https://lists.sourceforge.net/lists/listinfo/apc-aa-general > >> > > > > > > > >------------------------------------------------------- > >This sf.net email is sponsored by:ThinkGeek > >Welcome to geek heaven. > >http://thinkgeek.com/sf > >_______________________________________________ > >apc-aa-general mailing list > >apc...@li... > >https://lists.sourceforge.net/lists/listinfo/apc-aa-general > > > -- > Mitra Technology Consulting - www.mitra.biz - mi...@mi... > 02-6684-8096 or 0414-648-0722 > > Life is a Mystery to be Lived, not a Problem to be Solved > |