phplib-users Mailing List for PHPLIB (Page 38)
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: Gaetano G. <giu...@se...> - 2002-10-14 13:53:51
|
IMHO you might supply different (or the same) addresses to the href and = onclick tags, in order to satisfy browsers both with and without = javascript enabled...=20 Or am I completely wrong in doing this? Gaetano >=20 > I had not thought of that. Do you know if that is=20 > "officially" supported as > part of the HTML spec? Time to do some homework... > > > > > > IMHO, the correct way to do JavaScript links is > > > > <a href=3D"javascript:myFunction();">Blah</a> > > > > rather than using onClick. Creating a link to an undefined=20 > anchor is a > > kludge. I can't say that this will fix your problem, but=20 > the extra karma > > from cleaner code can't hurt. > > |
From: Andres B. Z. <aba...@ei...> - 2002-10-14 13:50:15
|
Thanks Andrew... You are right. It works now... But I still have a couple of questions. why do the original regexs ( example: "^[a-Z]*$" ) work as I expected in the intranet server but fail in the internet host? it seems like regex has a different behavior in the intranet server setup and in the internet host setup... is it any special recommendation or paper on regex use in OOHforms? Thanks again Andres -----Original Message----- From: Andrew Hull [mailto:ah...@ni...] Sent: Viernes, 11 de Octubre de 2002 10:45 a.m. To: Andres Barreto Zicare Subject: Re: [Phplib-users] OOHForms and RegEx Andres Barreto Zicare wrote: - snip - >But if I change > "valid_regex"=>"^[a-z]*$" >for > "valid_regex"=>"^[a-Z]*$" > > this _is_ invalid since lowercase comes after uppercase. in any event, i think u mean [a-zA-Z] - snip - a.g.h |
From: Rob H. <rob...@ws...> - 2002-10-14 13:41:49
|
I had not thought of that. Do you know if that is "officially" supported as part of the HTML spec? Time to do some homework... Rob Hutton Web Safe www.wsafe.com > -----Original Message----- > From: Layne Weathers [mailto:la...@if...] > Sent: Monday, October 14, 2002 9:30 AM > To: 'phplib-users' > Cc: rob...@ws... > Subject: javascript links (was: Auth working with a twist) > > > > <a href="#" onClick="document.all.innerFrameName.src = > > 'pagename.php?again=yes'; return true"> > > > > now it does not do the immediate refresh. I would expect this on one > > browser, but I was seeing it cross platform, cross browser. > > > > Now, the problem is if I change it to a # and click on it a > > second time, it > > does not do anything, but if I leave off the #, then it > > doesn't work at all > > on Mozilla or Netscape. AHHH! > > > IMHO, the correct way to do JavaScript links is > > <a href="javascript:myFunction();">Blah</a> > > rather than using onClick. Creating a link to an undefined anchor is a > kludge. I can't say that this will fix your problem, but the extra karma > from cleaner code can't hurt. > > > Layne Weathers > Ifworld Inc. > > > |
From: Rob H. <rob...@ws...> - 2002-10-14 13:32:04
|
I will work from here and see if I can figure something out. Rob Hutton Web Safe www.wsafe.com > -----Original Message----- > From: php...@li... > [mailto:php...@li...]On Behalf Of Giancarlo > Sent: Monday, October 14, 2002 4:34 AM > To: php...@li... > Subject: Re: [Phplib-users] Next auth issue, php variable scope issue > > > Il 19:48, domenica 13 ottobre 2002, Rob Hutton ha scritto: > > This does not seem to be an auth issue per say, but maybe Gian > or someone > > can help. Here is my app structure > > > > index.php (wrapper page) -> instantiates sitePage (Object that does the > > work) > > > > sitePage has several functions that are called to process a > template. If I > > put the page_open inside one of those functions, then the sess, > auth, etc > > variables never show up in $GLOBALS. If I move the page_open > to index.php, > > then I get them in $GLOBALS correctly. > > > > That's a new usage. Interesting. The idea of a page class is > coming to my mind. > I've tried it and it seems to work to me, with reg_glob off. > This is a modified defauth.php3 > > Gian > > > > > > |
From: Rob H. <rob...@ws...> - 2002-10-14 13:32:00
|
If you read page.inc you will see that there is a global variable definition for all of the features that should result in them going into the $GLOBALS array as that is what the key work global does. So it looks to me as if this should be working. Rob Hutton Web Safe www.wsafe.com > -----Original Message----- > From: php...@li... > [mailto:php...@li...]On Behalf Of Michael > Chaney > Sent: Monday, October 14, 2002 12:06 AM > To: Phplib-Users > Subject: Re: [Phplib-users] Next auth issue, php variable scope issue > > > On Sun, Oct 13, 2002 at 01:48:23PM -0400, Rob Hutton wrote: > > This does not seem to be an auth issue per say, but maybe Gian > or someone > > can help. Here is my app structure > > > > index.php (wrapper page) -> instantiates sitePage (Object that does the > > work) > > > > sitePage has several functions that are called to process a > template. If I > > put the page_open inside one of those functions, then the sess, > auth, etc > > variables never show up in $GLOBALS. If I move the page_open > to index.php, > > then I get them in $GLOBALS correctly. > > This is one of the reasons that I removed the "includes" when I wrote > phpauth and simply made the header and footer into functions. No > question about scope, it's not global so you're forced to specify if > that's what you need. |
From: Layne W. <la...@if...> - 2002-10-14 13:14:52
|
> <a href="#" onClick="document.all.innerFrameName.src = > 'pagename.php?again=yes'; return true"> > > now it does not do the immediate refresh. I would expect this on one > browser, but I was seeing it cross platform, cross browser. > > Now, the problem is if I change it to a # and click on it a > second time, it > does not do anything, but if I leave off the #, then it > doesn't work at all > on Mozilla or Netscape. AHHH! IMHO, the correct way to do JavaScript links is <a href="javascript:myFunction();">Blah</a> rather than using onClick. Creating a link to an undefined anchor is a kludge. I can't say that this will fix your problem, but the extra karma from cleaner code can't hurt. Layne Weathers Ifworld Inc. |
From: Giancarlo <gia...@na...> - 2002-10-14 08:38:27
|
Il 19:48, domenica 13 ottobre 2002, Rob Hutton ha scritto: > This does not seem to be an auth issue per say, but maybe Gian or someone > can help. Here is my app structure > > index.php (wrapper page) -> instantiates sitePage (Object that does the > work) > > sitePage has several functions that are called to process a template. If I > put the page_open inside one of those functions, then the sess, auth, etc > variables never show up in $GLOBALS. If I move the page_open to index.php, > then I get them in $GLOBALS correctly. > That's a new usage. Interesting. The idea of a page class is coming to my mind. I've tried it and it seems to work to me, with reg_glob off. This is a modified defauth.php3 Gian |
From: Michael C. <mdc...@mi...> - 2002-10-14 03:55:37
|
On Sun, Oct 13, 2002 at 01:48:23PM -0400, Rob Hutton wrote: > This does not seem to be an auth issue per say, but maybe Gian or someone > can help. Here is my app structure > > index.php (wrapper page) -> instantiates sitePage (Object that does the > work) > > sitePage has several functions that are called to process a template. If I > put the page_open inside one of those functions, then the sess, auth, etc > variables never show up in $GLOBALS. If I move the page_open to index.php, > then I get them in $GLOBALS correctly. This is one of the reasons that I removed the "includes" when I wrote phpauth and simply made the header and footer into functions. No question about scope, it's not global so you're forced to specify if that's what you need. It's as easy when using phplib, particularly with php4, simply make sure that everything is explicitly $GLOBALS['varname']. Michael -- Michael Darrin Chaney mdc...@mi... http://www.michaelchaney.com/ |
From: Rob H. <rob...@ws...> - 2002-10-13 17:45:08
|
This does not seem to be an auth issue per say, but maybe Gian or someone can help. Here is my app structure index.php (wrapper page) -> instantiates sitePage (Object that does the work) sitePage has several functions that are called to process a template. If I put the page_open inside one of those functions, then the sess, auth, etc variables never show up in $GLOBALS. If I move the page_open to index.php, then I get them in $GLOBALS correctly. BTW. THANKS MUCH TO GIAN AND SEVERAL OTHERS THAT HAVE HELPED TREMENDOUSLY IN FIGURING THIS OUT!!!!!!! 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: Rob H. <rob...@ws...> - 2002-10-13 17:15:32
|
OK, I figured out what it was. You guys are gonna love this. I have JavaScript doing the redirect (as I mentioned earlier). But in the href of the anchor I had "", but not target or anything, so the anchor looks something like this (it does other things, this is just an example). <a href="" onClick="document.all.innerFrameName.src = 'pagename.php?again=yes'; return true"> This way, it displayed the page in innerFrameName, then immediately refreshed it. But adding a # to the href so the anchor became <a href="#" onClick="document.all.innerFrameName.src = 'pagename.php?again=yes'; return true"> now it does not do the immediate refresh. I would expect this on one browser, but I was seeing it cross platform, cross browser. Now, the problem is if I change it to a # and click on it a second time, it does not do anything, but if I leave off the #, then it doesn't work at all on Mozilla or Netscape. AHHH! Rob Hutton Web Safe www.wsafe.com > -----Original Message----- > From: Giancarlo [mailto:gia...@na...] > Sent: Sunday, October 13, 2002 4:02 AM > To: rob...@ws... > Cc: phplib-users > Subject: Re: [Phplib-users] Auth working with a twist > > > Il 02:44, domenica 13 ottobre 2002, hai scritto: > > > Just to run down again, I have a page with an IFRAME imbedded > in it. The > > problem that I am seeing is that the content in the IFRAME is actually > > being loaded, and then immediately reloaded by the browser. So > since I am > > using default auth, I see the login page flash, then the protected page > > appears, because the first time through the again is stripped > off, then the > > page is reloaded, and it falls through the login_if. > > But if you saw the loginform somehow, that means your auth there does not > exist anymore. > Once $auth->unauth() or auth->logout has bee called (and it is > called before > splashing the form), how can then you see again a protected page? > From that > moment, the $auth in your session says you're not authed... > So, on any reload, it would be not login_if that decides, but the > auth->start > in page.inc, that happens before login_if. > So the problem I think is that the session is not freezed for > some reason. > > Inside login_if, basically you are unauthed, the session is > freezed, and the > script exits. So if you could place some echoes just after each of these > necessary calls, and see what the $auth->auth[uid] is like, we > could have a > clue. Or you could try the test defauth.php3 and showoff.php3 > pages with your > 'features' in page_open, and see what happens (if the counters increase > mainly).. > > That login_if can easily become a mini app, that logins/registers users > etc... It is already a bit out_of_place there, inside the auth class. > > Gian > > > So, first of all, has anyone seen a browser refresh a frame > immediately > > when it is loaded before. Is this common behavior? I've never seen it. > > Secondly, the regex that removes the "again" looks like it removes > > > everything after the ?. > > Till the next '&' or end_of_string I think it is... > > > This isn't a good idea IMHO because you can't pass > > variables to the page. Am I reading it wrong? and if not, should it be > > made more specific to just remove the "again". I'm not a regex person. > > > > > > 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 > > > > > > > > > > ------------------------------------------------------- > > 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-13 09:06:02
|
> > Inside login_if, basically you are unauthed, the session is freezed, and > the script exits. So if you could place some echoes just after each of > these necessary calls, and see what the $auth->auth[uid] is like, we could > have a clue. Or you could try the test defauth.php3 and showoff.php3 pages > with your 'features' in page_open, and see what happens (if the counters > increase mainly).. Or try this in login_if (snapshot) $this->unauth(); $sess->freeze(); ##### moved here ###### you could even try $this->logout() instead of the two previos if (! $this->start()) { # See what form if ( ($trig == "reg") || ($trig == "log") ) $m=$trig; else $m=$this->mode; ## or default if ($m == "log") $this->auth_loginform(); else $this->auth_registerform(); ## moved $sess->freeze(); ####moved from here exit; There a subtle difference between unauth() and logout(), I think it mimics yahoo's mail 'logout' or 'exit completely' (dunno relly, I am forced to see the italian version of yahoo...). In the first case something is kept from your previous login, eg the name you typed in the form (uname), some $auth->auth[log_*] info etc. There is also a kind of bug I found in phplib, that when you are done logout() your evetual $user object was still there global and set. That can cause some unadverted programmin erroers, so I modified the logout() to unset and unregister all eventual $user obj. I still didn't place this in the lighter unauth() function, but I think it should be there too. So you can try logout() instead of unauth, in login_if. You'll loose the uname to place ready in tle 'name' field of the loginform but... Please, as I cannot reproduce, some feedback. Gian |
From: Giancarlo <gia...@na...> - 2002-10-13 08:06:07
|
Il 02:44, domenica 13 ottobre 2002, hai scritto: > Just to run down again, I have a page with an IFRAME imbedded in it. The > problem that I am seeing is that the content in the IFRAME is actually > being loaded, and then immediately reloaded by the browser. So since I am > using default auth, I see the login page flash, then the protected page > appears, because the first time through the again is stripped off, then the > page is reloaded, and it falls through the login_if. But if you saw the loginform somehow, that means your auth there does not exist anymore. Once $auth->unauth() or auth->logout has bee called (and it is called before splashing the form), how can then you see again a protected page? From that moment, the $auth in your session says you're not authed... So, on any reload, it would be not login_if that decides, but the auth->start in page.inc, that happens before login_if. So the problem I think is that the session is not freezed for some reason. Inside login_if, basically you are unauthed, the session is freezed, and the script exits. So if you could place some echoes just after each of these necessary calls, and see what the $auth->auth[uid] is like, we could have a clue. Or you could try the test defauth.php3 and showoff.php3 pages with your 'features' in page_open, and see what happens (if the counters increase mainly).. That login_if can easily become a mini app, that logins/registers users etc... It is already a bit out_of_place there, inside the auth class. Gian > So, first of all, has anyone seen a browser refresh a frame immediately > when it is loaded before. Is this common behavior? I've never seen it. > Secondly, the regex that removes the "again" looks like it removes > everything after the ?. Till the next '&' or end_of_string I think it is... This isn't a good idea IMHO because you can't pass > variables to the page. Am I reading it wrong? and if not, should it be > made more specific to just remove the "again". I'm not a regex person. > > > 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 > > > > > ------------------------------------------------------- > 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: Rob H. <rob...@ws...> - 2002-10-13 01:20:15
|
So it is Gian's fault ;-). Seriously, I wonder if it is a php thing. It only seems to happen inside a frame though... 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 Mike Green > Sent: Saturday, October 12, 2002 9:05 PM > To: rob...@ws... > Cc: Phplib-Users > Subject: Re: [Phplib-users] Auth working with a twist > > > Rob Hutton wrote: > > > So, first of all, has anyone seen a browser refresh a frame > immediately > > when it is loaded before. > > Yes. > > I had this happen to me for the first time yesterday when I put a > statement on a > page which had the following form: > session_start(); > $reset = false; > if ($reset) { > unset($_SESSION); > } > If I made $reset = true I observed the same phenomenon that you > report: the > browser immediately refreshed the page. This was/is not a problem > for what I am > doing, since I only set $reset = true at certain points during > the development > when I have made changes to a class which cause the objects to be > no longer > valid if they are being saved by the session. And I suspect that > what I am doing > is a bad way to do even what I want to do. But for the sake of > just getting on > with the job and since I don't expect to keep the above statements in the > production code, I haven't pursued the issue further. > > I'm reporting this here because there is a possibility that it > could give a clue > to what is happening in your case. > > I am not using PHPLib at this point in this project. So the > browser immediately > refreshing the page is not specially a PHPLib problem. It looks, > however, as if > it can be caused by starting a session and then un-setting the $_SESSION > variable. Thus it might be that PHPLib has something embedded in > it which has > the same effect as that bit of kludgy code of mine above. > > For what it is worth... > > Cheers! > > Mike Green > > > > ------------------------------------------------------- > 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: Mike G. <Mik...@sa...> - 2002-10-13 01:05:52
|
Rob Hutton wrote: > So, first of all, has anyone seen a browser refresh a frame immediately > when it is loaded before. Yes. I had this happen to me for the first time yesterday when I put a statement on a page which had the following form: session_start(); $reset = false; if ($reset) { unset($_SESSION); } If I made $reset = true I observed the same phenomenon that you report: the browser immediately refreshed the page. This was/is not a problem for what I am doing, since I only set $reset = true at certain points during the development when I have made changes to a class which cause the objects to be no longer valid if they are being saved by the session. And I suspect that what I am doing is a bad way to do even what I want to do. But for the sake of just getting on with the job and since I don't expect to keep the above statements in the production code, I haven't pursued the issue further. I'm reporting this here because there is a possibility that it could give a clue to what is happening in your case. I am not using PHPLib at this point in this project. So the browser immediately refreshing the page is not specially a PHPLib problem. It looks, however, as if it can be caused by starting a session and then un-setting the $_SESSION variable. Thus it might be that PHPLib has something embedded in it which has the same effect as that bit of kludgy code of mine above. For what it is worth... Cheers! Mike Green |
From: Rob H. <rob...@ws...> - 2002-10-13 00:41:44
|
Thanks to Gian and others working on auth with the snapshot. It works almost. What I am seeing is weird, but I am seeing it cross browser. Just to run down again, I have a page with an IFRAME imbedded in it. The problem that I am seeing is that the content in the IFRAME is actually being loaded, and then immediately reloaded by the browser. So since I am using default auth, I see the login page flash, then the protected page appears, because the first time through the again is stripped off, then the page is reloaded, and it falls through the login_if. So, first of all, has anyone seen a browser refresh a frame immediately when it is loaded before. Is this common behavior? I've never seen it. Secondly, the regex that removes the "again" looks like it removes everything after the ?. This isn't a good idea IMHO because you can't pass variables to the page. Am I reading it wrong? and if not, should it be made more specific to just remove the "again". I'm not a regex person. 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: Dr T. S. <ta...@sa...> - 2002-10-12 03:28:57
|
On Fri, 11 Oct 2002, Andres Barreto Zicare wrote: > But if I change > "valid_regex"=>"^[a-z]*$" > for > "valid_regex"=>"^[a-Z]*$" try using "valid_regex"=>"^[a-zA-Z]*$" HTH Tarique -- ============================================================= PHP Applications for E-Biz: http://www.sanisoft.com Indian PHP User Group: http://groups.yahoo.com/group/in-phpug ============================================================= |
From: Andres B. Z. <aba...@ei...> - 2002-10-11 15:41:54
|
Hello all! I have been using the PHPLib's OOHForm class with success in a linux redhat 7.2 (apache, mysql & php4) intranet web server. But the same scripts fail when hosted in the internet. The problem is with the regex support... Most of the "valid_regex" values do not work. For example: If I try the following piece of code it works. $f->add_element(array("type"=>"text", "name"=>"username", "minlength"=>4, "maxlength"=>12, "length_e"=>"Invalid Username. [ 4 to 12 chars long ]", "valid_regex"=>"^[a-z]*$", "valid_e"=>"Invalid Username.", "value"=>"$username")); But if I change "valid_regex"=>"^[a-z]*$" for "valid_regex"=>"^[a-Z]*$" I have the answer: Warning: REG_ERANGE in ..../class/oohforms.inc on line 476 Invalid Username. Next is the piece of code at line 476 in oohforms.inc function self_validate($val) { if (!is_array($val)) $val = array($val); reset($val); while (list($k,$v) = each($val)) { if ($this->length_e && (strlen($v) < $this->minlength)) return $this->length_e; if ($this->valid_e && (($this->icase && !eregi($this->valid_regex,$v)) || (!$this->icase && !ereg($this->valid_regex,$v)))) // line 476 return $this->valid_e; } return false; } Any help will be very welcome I am not a native english speaker so excuse my poor english language proficiency. Thanks Andres |
From: Marko K. <M.K...@os...> - 2002-10-11 12:57:11
|
sorry, forgot that! |
From: Marko K. <M.K...@os...> - 2002-10-11 12:30:50
|
The solution is so easy: you need to copy the function self_validate($val) from of_text.inc into of_textarea.inc, as well as some var definitions in the textarea class. I appended my updated version of the latter originating from Joe's snapshot which is able to test minlength and maxlength at the same time as well as enables you to use regex validation, like $f->add_element(array('type'=>'textarea', 'name'=>'comment', 'rows'=>6, 'cols'=>40, 'wrap'=>20, 'minlength'=>1, 'maxlength'=>3, 'length_e'=>'at least 1 up to 3 chars', 'valid_regex'=>'^[a-z]*$', 'valid_e'=>'only characters allowed!', 'value'=>'This is a test text area!')); Marko |
From: Dr T. S. <ta...@sa...> - 2002-10-11 07:54:08
|
On Fri, 11 Oct 2002, Marko Kaening wrote: Isn't there a patch which Vinay had submitted on the site? We had fixed this one, mail me offlist if you cant find it Tarique > I could reproduce your problem! > Syntax is okay, analogous to the text input... > Looks like this is a phplib quirck! > But, sorry, no solution, just wanted to underline that there is a problem > indeed. > > 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 > -- ============================================================= PHP Applications for E-Biz: http://www.sanisoft.com Indian PHP User Group: http://groups.yahoo.com/group/in-phpug ============================================================= |
From: Marko K. <M.K...@os...> - 2002-10-11 07:27:43
|
I could reproduce your problem! Syntax is okay, analogous to the text input... Looks like this is a phplib quirck! But, sorry, no solution, just wanted to underline that there is a problem indeed. Marko |
From: Uli L. <U....@Li...> - 2002-10-11 06:29:03
|
Hello List! I want to require an input in an textarea-field. I tried a minlength, as I do with "normal" text-fields. But there is no error-message, if the field is left blank: $f->add_element(array( "type"=>"textarea", "name"=>"gast_text", "cols"=>"69", "rows"=>"10", "minlength"=>"10", "length_e"=>"Irgendeinen Kommentar müssen Sie schon abgeben...")); Is there any other syntax, to require an input? I can't find the soloution in the manual... Thank you for your help... Uli Linn ------------------------------------------------------ Uli Linn LINN Internet Marketing Fon: +49-6831-976789 Waldstraße 19 Fax: +49-6831-976788 D-66763 Dillingen Mail: U....@Li... URL: http://www.LinnWeb.de |
From: Rob H. <rob...@ws...> - 2002-10-10 17:38:01
|
Not a dead horse, maybe hairless soon, but not dead. I agree on one hand, on the other hand I will tell you the same thing I told Gian, and that is that this is somewhat of a square peg in a round whole. What I am looking for it permx + 1 layer of abstraction. I have to have it, so I will write permxx when I get there and post it. Rob Hutton Web Safe www.wsafe.com > -----Original Message----- > From: php...@li... > [mailto:php...@li...]On Behalf Of Joe > Stewart > Sent: Thursday, October 10, 2002 1:13 PM > To: phplib-users > Subject: Re: [Phplib-users] handle perm in auth > > > Hope I'm not beating a dead horse... > > On Wed, Oct 09, 2002 at 08:44:21PM -0400, Rob Hutton wrote: > > It's tied to the user, not the page. So I can't be an author > of one page > > and a reviewer of another page. > > > > The argument of have_perm can be seen as the page's required permisssion. > > Permissions per page or parts of a page can be accomplished easily. The > perm->have_perm checks whether the authenticated user has the permission. > > Posessing author privileges doesn't stop them from having reviewer > privileges also. > > Joe > > > > Rob Hutton > > Web Safe > > www.wsafe.com > > > > > ------------------------------------------------------- > 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-10 17:16:15
|
To keep the conversation going... On Wed, Oct 09, 2002 at 09:57:15PM -0400, Rob Hutton wrote: > I think you are trying to fit a square peg in a round hole. That kind of > bitwise math is too complex to reasonably maintain for the average db admin. > IMHO it would be better to have a user_perms table like: > > uid > permname > permlevel > You should be able to generate the permissions array from a db if needed. The example in local.inc is just that, and example. > Then it would be easy to see in the db what perms are set and still fits in > with the current scheme. > I don't want to be tied to a db for each perm check. I agree that using binary arithmetic to generate individual permissions causes problems. Give the permx.class a try. Applied to the atomic permissions example in local.inc the permissions array would look like: var $permissions = array( "user" => true, "author" => true, "editor" => true, "supervisor" => true, "admin" => true ); The permx.class is in the patches snapshot and here: http://sourceforge.net/tracker/index.php?func=detail&aid=617072&group_id=31885&atid=403613 It's been posted for everyone's feedback and ridicule. Joe > Rob Hutton > Web Safe > www.wsafe.com > |
From: Joe S. <jo...@be...> - 2002-10-10 17:15:31
|
Hope I'm not beating a dead horse... On Wed, Oct 09, 2002 at 08:44:21PM -0400, Rob Hutton wrote: > It's tied to the user, not the page. So I can't be an author of one page > and a reviewer of another page. > The argument of have_perm can be seen as the page's required permisssion. Permissions per page or parts of a page can be accomplished easily. The perm->have_perm checks whether the authenticated user has the permission. Posessing author privileges doesn't stop them from having reviewer privileges also. Joe > Rob Hutton > Web Safe > www.wsafe.com > |