phplib-users Mailing List for PHPLIB (Page 18)
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: Dennis G. <ge...@cv...> - 2003-04-09 15:30:38
|
Thank you, Marko. session4_custom extends the class Session which is in session4.inc, as far as I know. What do you actually use sessions for? This is is the first time I have had sessions going. Marko Kaening wrote: > Hi Dennis, > > >>anyone using session4_custom.inc? > > yep. > > >>I see a line in the file session4.inc where it says to make sure to call the >>constructor from extending classes, but session4_custom DOES NOT call it with >>its constructor. > > as far as I know the latter doesn't rely on session4! It's self-standing, > so to say. > > I use custom since 2 years successfully! > > Marko > |
From: Ernest B. <Er...@Be...> - 2003-04-09 09:46:50
|
Hi there, I am using templates and oohforms together, which causes a problem if a validation regexp is beiing used. "valid_regex"=>"^[a-z]{5,}$". The "{5,} string gets parsed as a TEMPLATE variable. Is there a solution to this if i do NOT want do set the templates to "keep"? PS: is that my ilusion or had the oohforms->validate() returned an associative array in form array("elementname"=>"errormsg") ? Now i use the newest 7.4pre2 and only a string is being returned. PS2: the files from CVS looks VERY different, is anywhere a upgrade info ? -- Ernest Beinrohr, OERNii eAdmin @ AxonPro.sk, http://www.AxonPro.sk +421-2-62410360, +421-903-482603 <== NOVE TELEFONNE CISLO HomePage: http://www.oernii.sk |
From: Marko K. <M.K...@os...> - 2003-04-09 08:48:40
|
> session4[_custom] was refactored about 2 years ago :) custom depends ohhh, sorry maxim, thanks for the hint, I forget myself sometimes. I should better check what I post here... :( Of course, what I remembered was the status before you changed over to extending the session4 class. Now, of course, session_custom is a child class of session4... SORRY for my misleading comment! Marko |
From: Maxim D. <max...@bo...> - 2003-04-09 07:56:13
|
Hello Marko, Wednesday, April 09, 2003, 11:43:21 AM, you wrote: MK> as far as I know the latter doesn't rely on session4! It's self-standing, MK> so to say. MK> I use custom since 2 years successfully! session4[_custom] was refactored about 2 years ago :) custom depends on session4 since then. -- Best regards, Maxim Derkachev |
From: Marko K. <M.K...@os...> - 2003-04-09 07:43:51
|
Hi Dennis, > anyone using session4_custom.inc? yep. > I see a line in the file session4.inc where it says to make sure to call the > constructor from extending classes, but session4_custom DOES NOT call it with > its constructor. as far as I know the latter doesn't rely on session4! It's self-standing, so to say. I use custom since 2 years successfully! Marko |
From: Dennis G. <ge...@cv...> - 2003-04-08 20:21:34
|
Well, I said that I'd report. Using PHP4 Native Session framework, PHPLIB, and PHPLIB database container functionality works great! I only have one concern, and I don't know where the issue lies. If a sesson is not listed in the database, i.e., i've deleted it, a revisiting browser's cookie session gets installed in the DB, i.e. accepted. There's new code in the PHPLIB library to prevent this using GET, but mabye nothing for cookie session 'freelance' creation. It might be the way PHP4 Native Sessions are doing it? PHPLIB is getting long in the tooth, (old), but works pretty well. I think it should be written to be more object oriented and easily configured, https://sourceforge.net/mailarchive/forum.php?thread_id=1942848&forum_id=808 but for now, it's fine. |
From: Dennis G. <ge...@cv...> - 2003-04-08 20:14:32
|
There's new code that prevents users from using the GET functionality to create sessions on the site using PHPLIB. Well, Using: session4.inc custom_session4.inc I created a session on my browser. Then I went to the database and deleted all the sessions. I then reloaded the browser and the session reappeared in the database. So, does this mean someone using a terminal program or other program who is capable of handwriting an HTML exchange, could craft a cookie session and have it be accepted? If this is true, that means: Creating a GET session can't be done, Createing a COOKIE session CAN be done? Also, I don't know if this is the fault of PHPLIB, or the PHP4 Native sessions. |
From: Dennis G. <ge...@cv...> - 2003-04-08 18:57:01
|
right now, as I see it, the following things have to be done to configure PHPLIB: ----------------------------------------------------------- 1/ Extend any classes. 2/ Put them in the prepend file 3/ Alternatively, put the extensions in local 4/ In the session class hand write in the container class. 5/ In the open page statment, give the extended class names. If it were being redone from scratch, I'd do it like this: ---------------------------------------------------------- 1/ Make page an object, call it phplib_page, in phplib_page.class.php. 2/ Do away with local, prepend, page files, (phplib_page.php would take their place) 3/ Create a global array called $PHPLIBCFG at the top of phplib_page.class.php with slots, 's' => array( 'file'=>'session.inc' , 'class'=>'Session' ), 'u' => array( 'file'=>'user.inc', 'class'=>'User' ), 'a' => array( 'file'=>'auth.inc', 'class'=>'Auth' ), 'p' => array( 'file'=>'perm.inc', 'class'=>'Permission' ), and possibley I would also make the user/auth/perm be a form of phpgacl, (look it up on web) 4/ Use separate files for extending each of the class types, sess/user/auth/perm. 6/ to use the library, however it was configured, would be simple, just include 'phplib_page.class.php' or the file for whatever class you had for extending phplib_page. Pass a string for whatever functinality you wanted in the application, i.e. 's', 'u', 'a', 'p'. So if I wanted sessions only, I'd create an instance: $my_page = new phplib_page( 's' ); for session and user variables, $my_page = new phplib_page( 'su' ); etc. 7/ The constructor would assign references to instantiations of sess/user/auth/perm objects to class/object variables. Then it would assign class functions to the PHP native session handlers. 8/ All public functions would return either TRUE, or an error string. NO output would go to the screen. |
From: Dennis G. <ge...@cv...> - 2003-04-08 18:42:18
|
anyone using session4_custom.inc? I see a line in the file session4.inc where it says to make sure to call the constructor from extending classes, but session4_custom DOES NOT call it with its constructor. Also, I'd like hear experiences people have had with this. |
From: Dennis G. <ge...@cv...> - 2003-04-07 18:27:21
|
Does PHPLIB7.4.pre2 or later with <session4.inc> use the databases to store things, or the local filesystem method that comes with PHP4.xx.xx ? Does selecting which storage container, i.e. ct_sql.inc, affect where sessions get stored in PHPLIB7.4.pre2 or later? I have read: <using php4 native session handlers> http://www.php.net/manual/en/ref.session.php <using php4 sessions with custome session handlers> http://www.php.net/manual/en/function.session-set-save-handler.php There are LOTS of quirks compared to PHPLIB sessions. I'd like to use PHPLIB's datbase storage of sessions with the PHP4.xx.xx session system, and NOT put the sessions in the file system, this is why I ask the questions above. |
From: Richard A. <rh...@ju...> - 2003-04-07 00:19:05
|
At 12:51 -0700 6/4/03, Andrew Crawford wrote: >I guess that will teach me to code into the wee hours without >taking a break. Nah, that's when you get the most code written. No phones ringing. Nobody interrupting you. No floods of email coming in. You just need to have an espresso machine next to your computer :) ...R. |
From: Andrew C. <An...@Ev...> - 2003-04-06 19:53:13
|
Ah! Okay, I see now. The code snippet I posted before is not what was generating the error. I was checking for an empty result set before doing anything with the data but, that generally stops working when you comment it out ... I guess that will teach me to code into the wee hours without taking a break. Thank you for your patience. Andrew Crawford An...@Ev... At 03:45 PM 4/6/2003 +1000, you wrote: >At 22:08 -0700 5/4/03, Andrew Crawford wrote: > > >I am already checking to make sure the result set is non-empty before I do > >anything with the results. That is not a problem. > >Then why is $db->seek() throwing an error? > >There is nothing in the DB class which calls that method. >So I assume your code is calling it. > > > > However, the default > >behavior for phplib is to display an error message for the query that is > >"performed without error." > >No, that is incorrect. If there is no error the class won't report one. > > ...R. |
From: Richard A. <rh...@ju...> - 2003-04-06 05:45:54
|
At 22:08 -0700 5/4/03, Andrew Crawford wrote: >I am already checking to make sure the result set is non-empty before I do >anything with the results. That is not a problem. Then why is $db->seek() throwing an error? There is nothing in the DB class which calls that method. So I assume your code is calling it. > However, the default >behavior for phplib is to display an error message for the query that is >"performed without error." No, that is incorrect. If there is no error the class won't report one. ...R. |
From: Andrew C. <An...@Ev...> - 2003-04-06 05:10:41
|
At 02:22 PM 4/6/2003 +1000, you wrote: >At 20:52 -0700 5/4/03, Andrew Crawford wrote: > > >>$query = "SELECT * FROM emptytable"; > >>$db->query($query); > >That query is performed without error. It just returns no results. > >Check $db->num_rows() to make sure you have some results before >you start working with them. > > ...R. Okay. Thank you for the suggestion. I am already checking to make sure the result set is non-empty before I do anything with the results. That is not a problem. However, the default behavior for phplib is to display an error message for the query that is "performed without error." Unless I turn that off, the user will see an error message where there is no real error. If I do turn it off to avoid that, there will be no error message displayed if something else goes wrong ... So, out of the box, phplib will either display an error for a non-error condition or the programmer must write an error handling routine and turn off phplib's built-in error reporting. Admittedly, this is probably an uncommon scenario but, best I can tell, there is either a bug in phplib (for displaying an error message when there is no error) or a documentation oversight (for not specifying that the programmer must write an error handling routine.) Again, not a huge problem. I just wanted to be sure I wasn't missing something more subtle. Andrew Crawford An...@Ev... |
From: Richard A. <rh...@ju...> - 2003-04-06 04:23:06
|
At 20:52 -0700 5/4/03, Andrew Crawford wrote: >>$query = "SELECT * FROM emptytable"; >>$db->query($query); That query is performed without error. It just returns no results. Check $db->num_rows() to make sure you have some results before you start working with them. ...R. |
From: Andrew C. <An...@Ev...> - 2003-04-06 03:55:10
|
Greetings, Do the SQL error reporting functions not work or am I misunderstanding something? If I run this snippet of code: >$db = new DB_Example; >$db->Halt_On_Error = "report"; >$query = "SELECT * FROM emptytable"; >$db->query($query); >echo "Error = " . $db->Error . "<p />\n"; //debugging >echo "Errno = " . $db->Errno . "<p />\n"; //debugging ... when emptytable contains no data, I get this output: >Error = > >Errno = 0 > >Database error: seek(0) failed: result has 0 rows. >MySQL Error: 0 () Based on the docs, it seems like $db->error should contain "Database error: seek(0) failed: result has 0 rows" or some subset of that. The output for the scripts I am writing is all templated. I would really like to be able to turn off the default error messages (the "Database error: seek(0) failed ...," etc.,) which display unattractively at the top of the page, and output them as an error message within the page. I know I can turn off Halt_On_Error completely but, since $db->Error is empty and $db->Errno is 0, regardless of what happens, that eliminates any indication of an error state. It's not a big deal with this particular error but, I worry that turning off error reporting completely will cause me to miss more important errors. Andrew Crawford An...@Ev... |
From: Taylor, S. <Ste...@uk...> - 2003-04-02 15:50:53
|
You need to remove the quotes in the call to MyFunction_validiator. At present your are passing in a string, it is expecting an object. Regards, -Stewart. -----Original Message----- From: Andres Barreto Zicare [mailto:aba...@ei...] Sent: 02 April 2003 16:19 To: php...@li... Subject: [Phplib-users] submit oohform Hello: I've been trying to submit an oohform using this code: . . $f->start("MyFunction", "", "", "", "MyForm" ); . . ?> <A href="javascript:MyFunction_validator('document.MyForm')"><IMG src=path/to/image.gif></A> <? . . $f-finish("document.MyForm.submit();", ""); . . The problem is that 'MyFunction_validator(f)' function does not accept 'document.MyForm' as the object expected... Your help to solve this is highly appreciated. Thanks Andres ------------------------------------------------------- This SF.net email is sponsored by: ValueWeb: Dedicated Hosting for just $79/mo with 500 GB of bandwidth! No other company gives more support or power for your dedicated server http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ _______________________________________________ Phplib-users mailing list Php...@li... https://lists.sourceforge.net/lists/listinfo/phplib-users |
From: Andres B. Z. <aba...@ei...> - 2003-04-02 14:20:21
|
Hello: I've been trying to submit an oohform using this code: . . $f->start("MyFunction", "", "", "", "MyForm" ); . . ?> <A href="javascript:MyFunction_validator('document.MyForm')"><IMG src=path/to/image.gif></A> <? . . $f-finish("document.MyForm.submit();", ""); . . The problem is that 'MyFunction_validator(f)' function does not accept 'document.MyForm' as the object expected... Your help to solve this is highly appreciated. Thanks Andres |
From: Marko K. <M.K...@os...> - 2003-03-31 07:15:57
|
Hi Bertrand, did you get any further with the QF behaviour I mention on the list a week ago? I wonder why that Date array doesn't get transferred as expected... Don't want to bother you, just would like to know the status! Marko |
From: Marko K. <M.K...@os...> - 2003-03-27 13:24:36
|
Hi, look here: $o = array(array('label'=>'Please Select a Fruit','value'=>0), array('label'=>'Apple','value'=>1), array('label'=>'Orange','value'=>2), array('label'=>'Pear','value'=>3), array('label'=>'Grape','value'=>4)); $f->add_element(array('type'=>'select', 'name'=>'menu', 'options'=>$o, 'size'=>3, 'valid_e'=>'Please select a fruit', 'value'=>1)); This will select the 'Apple'!!! Marko |
From: Alexander M. <am...@si...> - 2003-03-27 11:48:40
|
Hi... can someone tell me how to get da value of an select field selected ? i create the Options like this: while ($db->next_record()){ array_push($options, array("label"=>"".$db->f('name')."","".$db->f('id')."")); } The Select is created like this: $f->ae(array("type" => "select", "name" => "land", "options"=>$o)); How can i get one of the options selected (which comes out of the database)? Thanks Alex |
From: Andrzej O. <an...@qi...> - 2003-03-25 20:21:28
|
Hello, I found your adrress at phplib official site. I would like to ask you one question about parsing templates in phplib (I can't find any reasonable solution in the Internet). I would like to parse a frameset, and I have n= o idea how to do it. I don't know hot force phplib to view variables in fil= es which are included in frameset tags. Please help :). Thank you very much. Greetings from Poland, Andrzej |
From: Marko K. <M.K...@os...> - 2003-03-25 09:16:34
|
Hi, some while ago I came across the problem of saving an array var together with it's actual position pointer. When the session vars get saved in the end unfortunately the position gets lost. Does somebody have an idea how to save and restore that setting easyly (probably by using __sleep and __wakeup methods)? Marko |
From: Richard A. <rh...@ju...> - 2003-03-24 23:34:07
|
At 17:15 +0100 24/3/03, Serghej Petrov wrote: >If I don't declare $country_selected as global inside Start_Body >function this code don't work. So declare $country_selected as global. Problem solved. ...R. |
From: Serghej P. <sp...@ti...> - 2003-03-24 16:15:24
|
Hello=20 I have some problem to access variable saved into sesion from template custom class. If I don't declare $country_selected as global inside Start_Body function this code don't work. By the way $_SESSION["country_selected"] is ok and $sess->is_registered(country_selected) is setted But $this->setVar("country_key",$country_selected) - don't work; Please help=20 Serghej <? page_open(array("sess" =3D> "Example_session", "auth" =3D> = "Example_Auth", "perm" =3D> "Example_Perm", "user" =3D> "Example_User")); class HTMLBody extends Template_PHPLIB { =20 function Start_Body($key) { global $sess; =20 =20 $this->Template_PHPLIB(); $this->Tintra_Body(TEMPLATE_DIR); $this->setFile( array( "MainbodyT_key" =3D> "HomeBody.tpl")); =20 if ( isset($_GET[country_id]) && ($_SESSION["country_selected"] !=3D $_GET[country_id]) ) { =20 $country_selected =3D $_GET[country_id]; # $_SESSION["country_selected"] =3D $country_selected; $sess->register("country_selected"); $this->setVar("country_key",$country_selected); } } } $t =3D new HTMLBody(); $page_setting =3D array( "title_key" =3D> "Home Page", "page_code" =3D> "0001", "check_user" =3D> "true", ); $theApp=3D$t->Start_Body($page_setting); $t->pParse("output","MainbodyT_key"); ?> |