phplib-users Mailing List for PHPLIB (Page 40)
Brought to you by:
nhruby,
richardarcher
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(106) |
Sep
(99) |
Oct
(44) |
Nov
(97) |
Dec
(60) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(56) |
Feb
(81) |
Mar
(134) |
Apr
(69) |
May
(106) |
Jun
(122) |
Jul
(98) |
Aug
(52) |
Sep
(184) |
Oct
(219) |
Nov
(102) |
Dec
(106) |
2003 |
Jan
(88) |
Feb
(37) |
Mar
(46) |
Apr
(51) |
May
(30) |
Jun
(17) |
Jul
(45) |
Aug
(19) |
Sep
(5) |
Oct
(4) |
Nov
(12) |
Dec
(7) |
2004 |
Jan
(11) |
Feb
(7) |
Mar
|
Apr
(15) |
May
(17) |
Jun
(13) |
Jul
(5) |
Aug
|
Sep
(8) |
Oct
(6) |
Nov
(21) |
Dec
(13) |
2005 |
Jan
(4) |
Feb
(3) |
Mar
(7) |
Apr
(7) |
May
|
Jun
(11) |
Jul
(7) |
Aug
|
Sep
|
Oct
|
Nov
(7) |
Dec
|
2006 |
Jan
(3) |
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
(2) |
Jul
(1) |
Aug
|
Sep
|
Oct
(9) |
Nov
|
Dec
(5) |
2007 |
Jan
(15) |
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(9) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
(12) |
May
|
Jun
(3) |
Jul
(1) |
Aug
(19) |
Sep
(2) |
Oct
|
Nov
|
Dec
(6) |
2009 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(6) |
From: Richard A. <rh...@ju...> - 2002-10-09 13:30:19
|
At 15:24 -0400 8/10/02, Rob Hutton wrote: > Agreed, but his statement was that he did not want to append 60K of >unneeded code, insinuating that there was a way of making it findable as >needed. I was referring to the way prepend.php3 includes db_mysql.inc, ct_sql.inc, session.inc, auth.inc, perm.inc and user.inc when it's called. Even if you only need the db class. I personally find this a little inelegant and prefer to have a different prepend file for each site. I often merge these "require" statements into local.inc along with a swag of other common code for the app. Or for small sites I just do without the prepend and explicitly include the class files I need. Of course I know exactly where phplib is installed on my system, and there's no nasty admin going to move it behind my back. ...R. |
From: Rob H. <rob...@ws...> - 2002-10-09 13:23:21
|
So you have a variable in another template called {contenttext} that you are parsing later? If you want to print this now, use pparse instead (or $t->p('contenttext')). Rob Hutton Web Safe www.wsafe.com > -----Original Message----- > From: php...@li... > [mailto:php...@li...]On Behalf Of Benjamin > Hoft > Sent: Wednesday, October 09, 2002 9:02 AM > To: 'la...@if...'; 'php...@li...' > Subject: RE: [Phplib-users] 2 Problems (Reset Button + Template Problem) > > > > > printallNEWS($t); > > > > function printallNEWS($t) > > { > $t->set_file(array( > "news" => "news.ihtml", > "text" => "text.ihtml", > "links" => "links.ihtml")); > > $news= new news(); > $db=$news->getallNEWS ("news_extern",0,0,0,0); // get > news from the dbase > while($db->next_record()) > { > $t->set_var("author",$db->f("author")); > $t->set_var("newstext",$db->f("newstext")); > $t->set_var("title",$db->f("headline")); > $t->set_var("changed",date("d. M. Y, > H:i:s",$db->f("changed"))); > > $t->parse("contenttext","news",true); > } > > } > > > k here´s my example ;) > |
From: Layne W. <la...@if...> - 2002-10-09 13:22:55
|
> > printallNEWS($t); > > > > function printallNEWS($t) Change your function declaration to: function printallNEWS(&$t) { .... } Note the ampersand - that will tell the function to reference your template object rather than copy it to a new object that is lost after the function runs. Alternatively, if you only ever use one template object you could: function printallNEWS() { global $t; .... } Layne Weathers Ifworld Inc. |
From: Benjamin H. <ho...@eu...> - 2002-10-09 13:00:23
|
> printallNEWS($t); >=20 > function printallNEWS($t) > { $t->set_file(array( "news" =3D> "news.ihtml",=20 "text" =3D> "text.ihtml", "links" =3D> "links.ihtml")); $news=3D new news(); $db=3D$news->getallNEWS ("news_extern",0,0,0,0); // get news from = the dbase while($db->next_record()) { $t->set_var("author",$db->f("author")); $t->set_var("newstext",$db->f("newstext")); $t->set_var("title",$db->f("headline"));=20 $t->set_var("changed",date("d. M. Y, H:i:s",$db->f("changed"))); =09 $t->parse("contenttext","news",true);=09 } > } >=20 k here=B4s my example ;) $t comes from a other file where i include this file named "news.inc" = so i append the news to the content template . but when i but the stuff into a function nothing appears but i dont = know why. If i copy and paste this code without a function everything = is working fine :( Thanks=20 Benjamin=20 |
From: Rob H. <rob...@ws...> - 2002-10-09 12:53:24
|
I have auth occurring inside a iframe on my page. That works correctly and that iframe has access to the $sess and $auth variables. The outer frame however does not. Once I refresh it, the $GLOBALS['Site_Custom_Session'] variable gives me the same session ID, but $auth and $sess are not defined in the outer frame. Yes, the outer frame does a page_open (in fact, I copied and pasted it from the inner frame just to make sure. Any Ideas? Thanks, Rob Hutton Web Safe www.wsafe.com ********************************************************************** Introducing Symantec Client Security - Integrated Anti-Virus, Firewall, and Intrusion Detection for the Client. Learn more: http://enterprisesecurity.symantec.com/symes238.cfm?JID=2&PID=11624271 View our Symantec Client Security Demo: http://enterprisesecurity.symantec.com/symes238.cfm?JID=3&PID=11624271 Download the Symantec Client Security Fact Sheet: http://enterprisesecurity.symantec.com/symes238.cfm?JID=4&PID=11624271 Download the Symantec Client Security Brochure: http://enterprisesecurity.symantec.com/symes238.cfm?JID=5&PID=11624271 |
From: Layne W. <la...@if...> - 2002-10-09 12:45:43
|
> my 2. Problem is: > > isn´t it possible to write functions or classfunctions which > can parse Templates ? <snip> > But why ??? issn´t it possible ??? > or am i doing somthing wrong ? It's possible - I do it all the time. Post some examples and we can help you work out the problems. Layne Weathers Ifworld Inc. |
From: Marko K. <M.K...@os...> - 2002-10-09 12:11:21
|
> the Reset button=B4s caption will turn to "" so nothing is written on it= and the size turns to only a few pixel Tarique pointed out some time ago, that this is a peculiarity of oohforms, or rather PHP itself. The value of reset buttons is not transferred back, so the only chance you have is to hardcode the button in html which is okay, since you don't need to transfer it's value anyway! marko |
From: Benjamin H. <ho...@eu...> - 2002-10-09 11:38:08
|
Hi=20 I have two Problems with PHPLIB the first:=20 i have a OOForm with a submit button and a Reset button (to reset = the form) and of course serveral other entry fields ;) My Problem is when i Submit the form and some field was not = validated and i return to the default values with $f->load_defaults(); the Reset button=B4s caption will turn to "" so nothing is written on = it and the size turns to only a few pixel i use this code: if ($SUBMIT) { // Is there data to process? if ($err =3D $f->validate()) { // Is the data valid? //echo $err; // No; Display error $f->load_defaults(); // Load form with submitted data print " there were errors"; }=20 else { /* Process data */ // Data ok; Do something with it } } if i dont use load_defaults everything works fine. my 2. Problem is: isn=B4t it possible to write functions or classfunctions which can = parse Templates ? I have a page with serveral templates on it which will be parsed into = each other. My problem is that i cannot have a function e.g. print_all_news($t) and = gave this funtktion the object of the template which i will use to = append the parsed text of all news to the other content of the page.. If i copy and paste the code (which i want to use for a function) = everything works fine. But if a make a function and include the php or inc where i must use = this function it wont work. But why ??? issn=B4t it possible ??? or am i doing somthing wrong ? Thanks for help=20 Benjamin=20 |
From: Rob H. <rob...@ws...> - 2002-10-08 19:20:58
|
Agreed, but his statement was that he did not want to append 60K of unneeded code, insinuating that there was a way of making it findable as needed. I didn't know if I was COMPLETELY missing something. Also, this does not take the place of use of the search path because in a hosted environment one often does not know where they are installed. The system admin sets the search path to the root of your app, then it is up to you to take it from there. Agreed that it makes you not have to search the paths that you may need in your app... Rob Hutton Web Safe www.wsafe.com ********************************************************************** Introducing Symantec Client Security - Integrated Anti-Virus, Firewall, and Intrusion Detection for the Client. Learn more: http://enterprisesecurity.symantec.com/symes238.cfm?JID=2&PID=11624271 View our Symantec Client Security Demo: http://enterprisesecurity.symantec.com/symes238.cfm?JID=3&PID=11624271 Download the Symantec Client Security Fact Sheet: http://enterprisesecurity.symantec.com/symes238.cfm?JID=4&PID=11624271 Download the Symantec Client Security Brochure: http://enterprisesecurity.symantec.com/symes238.cfm?JID=5&PID=11624271 > -----Original Message----- > From: Layne Weathers [mailto:la...@if...] > Sent: Tuesday, October 08, 2002 2:54 PM > To: rob...@ws...; 'phplib-users' > Subject: RE: [Phplib-users] Installation in hosted environment > > > > I see reference in the docs and archives about several different > > installation methods. I understand the includes in the php.ini and > > .htaccess, but Richard refers to the $_PHPLIB method as being more > > efficient. I cannot find a description of what that is. Can > > anyone expound on that? > > In your prepend file, the first bit is setting $_PHPLIB["libdir"] to the > path to installed PHPLib (e.g. /usr/local/phplib-7.x/php/) which is then > appended to all PHPLib include statements. > > <soapbox> > This should define a constant rather than a variable - nobody's going to > switch between PHPLib versions midway through a script. > </soapbox> > > <soapbox> > I've never really liked relying on the include path - why waste runtime > cycles on a production server looking for files in half a dozen > directories > when you should know exactly were they are? I have embraced this > concept to > set a few constants holding root-relative paths to my document root, > personal library and PHPLib. > </soapbox> > > Layne Weathers > Ifworld Inc. > > |
From: Layne W. <la...@if...> - 2002-10-08 18:39:34
|
> I see reference in the docs and archives about several different > installation methods. I understand the includes in the php.ini and > .htaccess, but Richard refers to the $_PHPLIB method as being more > efficient. I cannot find a description of what that is. Can > anyone expound on that? In your prepend file, the first bit is setting $_PHPLIB["libdir"] to the path to installed PHPLib (e.g. /usr/local/phplib-7.x/php/) which is then appended to all PHPLib include statements. <soapbox> This should define a constant rather than a variable - nobody's going to switch between PHPLib versions midway through a script. </soapbox> <soapbox> I've never really liked relying on the include path - why waste runtime cycles on a production server looking for files in half a dozen directories when you should know exactly were they are? I have embraced this concept to set a few constants holding root-relative paths to my document root, personal library and PHPLib. </soapbox> Layne Weathers Ifworld Inc. |
From: Rob H. <rob...@ws...> - 2002-10-08 18:21:45
|
Guys, I see reference in the docs and archives about several different installation methods. I understand the includes in the php.ini and .htaccess, but Richard refers to the $_PHPLIB method as being more efficient. I cannot find a description of what that is. Can anyone expound on that? Thanks, Rob Hutton Web Safe www.wsafe.com |
From: Rob H. <rob...@ws...> - 2002-10-08 15:54:17
|
I've been using WinCVS successfully for about 2 weeks. I just followed the directions on the sourceforge CVS access page and it worked. WinCVS 1.3.8.1 BETA Authentication: pserver path: /cvsroot/phplib host address: cvs.phplib.sourceforge.net user name: anonymous and that builds a CVSROOT of: ano...@cv...:/cvsroot/phplib then click "Admin->Login..." click OK in the password box and you should get a return code of 0. Rob Hutton Web Safe www.wsafe.com ********************************************************************** Introducing Symantec Client Security - Integrated Anti-Virus, Firewall, and Intrusion Detection for the Client. Learn more: http://enterprisesecurity.symantec.com/symes238.cfm?JID=2&PID=11624271 View our Symantec Client Security Demo: http://enterprisesecurity.symantec.com/symes238.cfm?JID=3&PID=11624271 Download the Symantec Client Security Fact Sheet: http://enterprisesecurity.symantec.com/symes238.cfm?JID=4&PID=11624271 Download the Symantec Client Security Brochure: http://enterprisesecurity.symantec.com/symes238.cfm?JID=5&PID=11624271 > -----Original Message----- > From: php...@li... > [mailto:php...@li...]On Behalf Of Joe > Stewart > Sent: Tuesday, October 08, 2002 11:19 AM > To: php...@li... > Subject: Re: [Phplib-users] CVS pb > > > On Tue, Oct 08, 2002 at 03:23:07PM +0200, Serghej Petrov wrote: > > Hello, > > Sorry for non phplib dev question. > > I can't get into CVS on sourceforge. > > I've recive : > > > > Fatal error, aborting. > > d:pserver:anonymous: no such user > > cvs login: authorization failed: server > cvs.phplib.sourceforge.net rejected access to /cvsroot/phplib for > user d:pserver:anonymous > > *****CVS exited normally with code 1***** > > > > A shot in the dark - > > The '-d' sets the CVS_root_directory. I haven't tried WinCVS in a long > time so don't have much advice here except try putting > ":pserver:ano...@cv...:/cvsroot/phplib" in > "General", "Enter the CVSROOT". > > > if i try to login with blank password as anonymous user - the > result is the same. > > > > > > I use WINCVS 1.2 and config parameters as specified in https://sourceforge.net/cvs/?group_id=31885 > Works from the commandline, so looks to be your WinCVS setup. > Any sugestions? Is there other way to get letest updates on line for phplib (session4 auth4 ecc)? > Thank all. > See this post: http://sourceforge.net/mailarchive/forum.php?thread_id=1156755&forum_id=808 later, Joe > Serghej > > ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Phplib-users mailing list Php...@li... https://lists.sourceforge.net/lists/listinfo/phplib-users |
From: Joe S. <jo...@be...> - 2002-10-08 15:21:34
|
On Tue, Oct 08, 2002 at 03:23:07PM +0200, Serghej Petrov wrote: > Hello, > Sorry for non phplib dev question. > I can't get into CVS on sourceforge. > I've recive : > > Fatal error, aborting. > d:pserver:anonymous: no such user > cvs login: authorization failed: server cvs.phplib.sourceforge.net rejected access to /cvsroot/phplib for user d:pserver:anonymous > *****CVS exited normally with code 1***** > A shot in the dark - The '-d' sets the CVS_root_directory. I haven't tried WinCVS in a long time so don't have much advice here except try putting ":pserver:ano...@cv...:/cvsroot/phplib" in "General", "Enter the CVSROOT". > if i try to login with blank password as anonymous user - the result is the same. > > > I use WINCVS 1.2 and config parameters as specified in https://sourceforge.net/cvs/?group_id=31885 > Works from the commandline, so looks to be your WinCVS setup. > Any sugestions? Is there other way to get letest updates on line for phplib (session4 auth4 ecc)? > Thank all. > See this post: http://sourceforge.net/mailarchive/forum.php?thread_id=1156755&forum_id=808 later, Joe > Serghej > > |
From: Maxim D. <max...@bo...> - 2002-10-08 13:54:01
|
Hello Serghej, Tuesday, October 08, 2002, 5:23:07 PM, you wrote: SP> Fatal error, aborting. SP> d:pserver:anonymous: no such user SP> cvs login: authorization failed: server cvs.phplib.sourceforge.net rejected access to /cvsroot/phplib for user d:pserver:anonymous SP> *****CVS exited normally with code 1***** As I know, SF does not permit pserver logins - only ssh access is supported. The most comfortable way I found under Windows is to use PuTTY's plink utility to make a ssh connection for WinCVS. -- Best regards, Maxim Derkachev mailto:max...@bo... IT manager, Symbol-Plus Publishing Ltd. phone: +7 (812) 324-53-53 www.books.ru, www.symbol.ru |
From: Serghej P. <sp...@ti...> - 2002-10-08 13:23:35
|
Hello, Sorry for non phplib dev question. I can't get into CVS on sourceforge. I've recive : Fatal error, aborting. d:pserver:anonymous: no such user cvs login: authorization failed: server cvs.phplib.sourceforge.net = rejected access to /cvsroot/phplib for user d:pserver:anonymous *****CVS exited normally with code 1***** if i try to login with blank password as anonymous user - the result is = the same. I use WINCVS 1.2 and config parameters as specified in = https://sourceforge.net/cvs/?group_id=3D31885 Any sugestions? Is there other way to get letest updates on line for = phplib (session4 auth4 ecc)? Thank all. Serghej |
From: Giancarlo <gia...@na...> - 2002-10-08 12:39:41
|
Il 12:16, marted=EC 8 ottobre 2002, Giancarlo ha scritto: Finally I got to the conclusion that if lifetime has to be a prerogative = of=20 the user, not of the page's requested auth. Se o if we would like to have different lifetime for diferent users (lomg= for=20 common users, short for admins) we should redesign that to provide someth= ing=20 in auth check_feature() or whatever that overwrites the lifetime taken f= rom=20 the page Boh! This is for the future. Ciao for now Gian > I was now trying the snapshot with the aim of providing a different exp= ire > for eg user kris (admin), than anoter user (not admin). > > So I defined the Example_Auth (eg the one used in admin_only showoff) w= ith > a lifetime=3D1, and a example_default_auth (the one used in the pages = for > 'nobodies' too) with a lifetime of 3 minutes. > > But when I am visiting, as admin, a page that is for default_auth, my > lifetime gets extended to that of the defauth class, because it's in th= e > persistent $auth->auth array. While I would be able to keep my 'admin' > one. So maybe the check feature should also check, if different auth > feature, also recalclate the $auth->auth[exp] inherited. > > > Gian > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Phplib-users mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phplib-users |
From: Giancarlo <gia...@na...> - 2002-10-08 10:35:03
|
The real question should be: wouldn't it be better, as a design, to store= the=20 session's expiration update time (the start time from which to calculate = the=20 expiration), instead of the time when it's due to expire? And each auth c= lass=20 instead of relying on a sum already made, resums that and decides? Because we inherit the exp time, but cannot know when that was extended, = and=20 if, for our actual lifetime, that would be too late. Gian Il 12:16, marted=EC 8 ottobre 2002, Giancarlo ha scritto: > I was now trying the snapshot with the aim of providing a different exp= ire > for eg user kris (admin), than anoter user (not admin). > > So I defined the Example_Auth (eg the one used in admin_only showoff) w= ith > a lifetime=3D1, and a example_default_auth (the one used in the pages = for > 'nobodies' too) with a lifetime of 3 minutes. > > But when I am visiting, as admin, a page that is for default_auth, my > lifetime gets extended to that of the defauth class, because it's in th= e > persistent $auth->auth array. While I would be able to keep my 'admin' > one. So maybe the check feature should also check, if different auth > feature, also recalclate the $auth->auth[exp] inherited. > > > Gian |
From: Giancarlo <gia...@na...> - 2002-10-08 10:20:17
|
I was now trying the snapshot with the aim of providing a different expire for eg user kris (admin), than anoter user (not admin). So I defined the Example_Auth (eg the one used in admin_only showoff) with a lifetime=1, and a example_default_auth (the one used in the pages for 'nobodies' too) with a lifetime of 3 minutes. But when I am visiting, as admin, a page that is for default_auth, my lifetime gets extended to that of the defauth class, because it's in the persistent $auth->auth array. While I would be able to keep my 'admin' one. So maybe the check feature should also check, if different auth feature, also recalclate the $auth->auth[exp] inherited. Gian |
From: Giancarlo <gia...@na...> - 2002-10-08 09:21:54
|
Il 10:49, marted=EC 8 ottobre 2002, Marko Kaening ha scritto: > [Tue Oct 8 09:53:42 2002] [error] PHP Notice: Undefined index: > username in /usr/local/lib/phplib-0.74.20021007.patches/php/local.inc = on > line 175 > > I use the Challenge_Crypt_Auth class, which nobody seems to have looked= at > with latest changes. > Here username is used in the sql-select in auth_validatelogin() eventho= ugh > it's undefined, instead the select should be circumvented if the userna= me > wasn't defined yet. Yes, we've only looked at to make the Example_auth work. Extendingg that = to=20 other 'validatelogins' has to be done. Validatelogin should be the ultimate class where to test the presence of,= =20 sanitize ecc, the input fields, try validate them. It should return the=20 valid id, or false. If expired is checked also. Anyone not 'someone' has = his=20 uid set to 'nobody' > I wonder whether the formids functionality could be transferred also to > this class? > Yes, it will have to, if it proves OK. > > [Tue Oct 8 09:53:42 2002] [error] PHP Notice: Undefined variable: s= ess > in /usr/local/lib/phplib-0.74.20021007.patches/php/auth.inc on line 10= 9 > > $sess should be global in start_actions()! > Picked up! Thanks. The auth_doregister is the other, optional, start_acti= on=20 that has to do practically the same as validatelogin: sanitize&check prov= ided=20 input, then register&return a valid uid or false > > [Tue Oct 8 10:32:25 2002] [error] PHP Notice: Undefined property: > newid in /usr/local/lib/phplib-0.74.20021007.patches/php/auth.inc on > line 110 > > Var newid is obviously not created and cannot be used in the same > function. I use PHP4 sessions in files mode. > I have yet to find a way to block alien_sids with php4. I cannot know whe= n=20 the session I start, is being created as new or is a resumpted one. I can= not=20 find a way to restart a session, in case... =20 That if ($sess->newid) { can be taken off, with its closing bracket > > [Tue Oct 8 09:53:42 2002] [error] PHP Notice: Undefined index: mode > in /usr/local/lib/phplib-0.74.20021007.patches/php/page.inc on line 95 > > It should read I guess: > > $mode=3D(isset($HTTP_GET_VARS['mode']) ? ..... > > > > Otherwise everything seems to work as expected. No further problems up = to > now. > > > Good luck, > Marko > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Phplib-users mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phplib-users |
From: Marko K. <M.K...@os...> - 2002-10-08 08:50:17
|
Hi Joe, > A request to please test the snapshots on sf.net: > http://phplib.sourceforge.net/snapshots/ I installed this snapshot and it seems to work with my app without problems. The only strange behaviour I noticed is that during loading of the loginform I get the following PHP notices: [Tue Oct 8 09:53:42 2002] [error] PHP Notice: Undefined index: username in /usr/local/lib/phplib-0.74.20021007.patches/php/local.inc on line 175 I use the Challenge_Crypt_Auth class, which nobody seems to have looked at with latest changes. Here username is used in the sql-select in auth_validatelogin() eventhough it's undefined, instead the select should be circumvented if the username wasn't defined yet. I wonder whether the formids functionality could be transferred also to this class? [Tue Oct 8 09:53:42 2002] [error] PHP Notice: Undefined variable: sess in /usr/local/lib/phplib-0.74.20021007.patches/php/auth.inc on line 109 $sess should be global in start_actions()! [Tue Oct 8 10:32:25 2002] [error] PHP Notice: Undefined property: newid in /usr/local/lib/phplib-0.74.20021007.patches/php/auth.inc on line 110 Var newid is obviously not created and cannot be used in the same function. I use PHP4 sessions in files mode. [Tue Oct 8 09:53:42 2002] [error] PHP Notice: Undefined index: mode in /usr/local/lib/phplib-0.74.20021007.patches/php/page.inc on line 95 It should read I guess: $mode=(isset($HTTP_GET_VARS['mode']) ? ..... Otherwise everything seems to work as expected. No further problems up to now. Good luck, Marko |
From: Gaetano G. <giu...@se...> - 2002-10-08 07:15:44
|
Oracle Stored ProcedureYou can try out with ADODB, an alternative = multi-db access library.[Gaetano Giunta] On the site (php.weblogs.com) = you might also find out a patch to integrate it into phplib (it's not = too hard: I've done it from scratch too, in half a day). Bye, Gaetano Dows anybody knows how to use phplib with oracle stored procedures = that returns a cursor?=20 I have an example, a simple Oracle package and you can compile in = any user, then tray to call it from phplib whith Oci8. |
From: Giancarlo <gia...@na...> - 2002-10-08 00:43:53
|
I wanted that, uon authentication as a valid user, the session4 be restarted but witha few mutations: new id and new cookie, same persistent vars and objs pass to a cookie_only propagation policy pass to custom_savehadler for session data I understand that I have to define a new extended_session class, with these settings, but how to practically do the trick and pass back another $this or whatever? Gian |
From: Giancarlo <gia...@na...> - 2002-10-08 00:38:11
|
The manual gives an example: function destroy ($id) { global $sess_save_path, $sess_session_name; $sess_file = "$sess_save_path/sess_$id"; return(@unlink($sess_file)); } /********************************************* * WARNING - You will need to implement some * * sort of garbage collection routine here. * *********************************************/ function gc ($maxlifetime) { return true; } But the function_destry is passed a var, $sess_session_name, that does affect noting. Suppose some baldous guy installs a multiuser game that he wants to reset all the sessions, will he block everything for everyone, forcing logoffs etc, unadvetedly? Or, put on anoter way: a savy designer that would like to neatly gc only his session_name()'s recs, how could he? Or is he aware that without an own save path that will cause damage? Or how else not? Gian |
From: Giancarlo <gia...@na...> - 2002-10-07 22:38:46
|
Il 19:49, luned=EC 7 ottobre 2002, Giancarlo ha scritto: > try this script, > > <?php > echo gettype($a)." <- gettype a<br>"; > echo gettype($_SESSION["b"])." <-gettype b<br>"; > $_SESSION['b']=3D$_SESSION['b']+1; > session_register("a"); > $a=3D$a+1; > echo "session ID ".session_id()."<br>"; > echo "A is $a <br>"; > echo "B is". $_SESSION["b"]." <br>"; > # comment these and reload > session_unregister ("a"); > unset ($_SESSION["b"]); > ?> The problem is that if you comment the unregister and reload, the very=20 first time (clean Example_User recs), these get registered, and on the re= load=20 they increase. If I'd wrote the extension to that session4.inc register() for reg_glob_o= ff=20 (when the php instruction session_register is said not to be used) in you= r=20 way, $sess->register with session4 would work differently that php4=20 session_register. And the counter would never pass from 1 to 2. Once it's= =20 regsiterer it's ok, so you have to have clean active_sessions I stumped into this error already, cause I wrote it too on sess4->registe= r. Gian |
From: Joe S. <jo...@be...> - 2002-10-07 20:12:06
|
A request to please test the snapshots on sf.net: http://phplib.sourceforge.net/snapshots/ One contains "patches" in the filename. This differs in that some of the patches submitted to sf.net have been applied. A brief on the contents of the files: phplib-0.74.20021007.tar.gz - Contains a release generated from the current php-lib-stable cvs tree. Some of the changes since 7.4-pre1 was released - * template.inc - many bugfixes and changes. * session4.inc, session4_custom.inc, user4.inc - moved to stable tree and changes for use with register_globals off. * auth4.inc, page4.inc - only change is for auth's persistent slots w/php4 sessions. * page.inc - Fixed page.inc's use of isset($sess|$user) to is_object() phplib-0.74.20021007.patches.tar.gz - Same as above plus: * [ 606011 ] db abstracted db_xsl.inc - db_xsl.inc has been postgres dependent. This patch should allow extension from other dbms db_sql classes. However it has only been tested with mysql. * [ 606946 ] template::set_file unexpected behaviour - With this patch you can call set_file twice with the same handle name but different filenames. * [ 617072 ] Perm Extensions - Atomic permissions work basically as before. Inclusive permissions are simply an array of permissions. Instead of integer values, the permission check only looks to see if the permission exists for the authenticated user. This removes the 32 level limit of the previous permission class. Groups of permissions ( arrays of permissions ) can function as User Groups/Roles. * [ 618873 ] prevent resubmit already posted loginform - Prevent the resubmission of a form already submitted, thus prevents going back with the browser back button and repost auth credentials when authentication is expired. * [ 561500 ] simplified auth->start, no uid=form stat - This auth.inc corrects such known issues as the ability to abandon login forms when using default auth and allows login forms on public pages. * doc/manual directory contains a snapshot of the phplib manual on sanisoft.com * examples in pages/ - defauth.php3 changed to show login form. You can now move back and forth between defauth and showoff. I *think* that's all. Please give these some thorough testing and feedback. thanks, Joe |