phplib-users Mailing List for PHPLIB (Page 89)
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: Michael C. <mdc...@mi...> - 2001-09-10 23:47:44
|
On Mon, Sep 10, 2001 at 10:39:48AM +1000, Richard Archer wrote: > At 11:19 PM +0200 9/9/01, Giancarlo Pinerolo wrote: > > >I don't agree with Richard when he says that Phplib is a tool for > >programmers, and though it shouldn't be a problem for them to twickle > >with classnames and extensions. > > Since there has been no discussion of my philosophy of PHPLIB on the > phplib-users list, here is some background to Giancarlo's statement. > > > I believe it is the power and flexibility of PHPLIB which separates > it from the crowd of sess/auth management tools. I have investigated > several packages that have been presented as "simple" alternatives > to PHPLIB and found them to be lacking in areas such as: > > * support for non-cookie mode > * strength of the underlying security model > * management of user data > * support for multiple access levels > * and one had a non-commercial use license!! > > While these packages may offer a simple "just add one line" alternative > to PHPLIB, they certainly don't have the power or extensibility of this > library. I've used phplib for 3 commercial web sites, and in all cases it has saved me time and my client money. But all I ever used it for was sessioning and authentication. With sessioning (including non-cookie sessioning) now built in to PHP4, and much faster than phplib, I am left with not wanting to use phplib anymore. So I went off and completely rewrote the authentication part, and made something that I actually like better than phplib's authentication. Essentially, it addresses all of your concerns above. I have been working on "fixing it up" in my spare time for mass consumption, I'll post an announcement here when it's ready. It will be the base for all my future sites. It's similar to phplib in that you have to fix up some subclasses in local.inc for your particular setup. And it comes with a simple set of admin scripts to change usernames, passwords, etc., and a set of utilities for your site's visitors to do the same for their own information. They simply need to be changed to collect the registration information that you're interested in. Michael -- Michael Darrin Chaney mdc...@mi... http://www.michaelchaney.com/ |
From: Mike G. <mi...@op...> - 2001-09-10 18:57:58
|
Hello, Has anyone developed another class for uploading images to a MySQL database? I downlaoded upload_db.zip from: http://circle.ch/scripts/ as it was a phplib based upload 2 db script that looked like I could get it to do what I needed. I'm now having some problems getting it started and wondered if there is another class which has already been developed and brought into the library. I think that I can view the file (that was uploaded to the database), but I can't get it up there to verify it... The most I can get to upload is: Content-Type: image/jpeg ÿØÿà Close, but no cigar.. Thanks. Mike -- Mike Gifford, OpenConcept Consulting, http://openconcept.ca Offering everything your organization needs for an effective web site. Abolish Nuclear Weapons Now!: http://pgs.ca/petition/ It is a miracle that curiosity survives formal education. - A Einstein |
From: Layne W. <la...@if...> - 2001-09-10 16:16:37
|
> I don't think this is a problem. I always create a separate, > customized > 'local.inc' for each one of my applications. You just need to > rename it and > then manually include it at the top of every page. I usually create a > globals.php file for every application where I define project > variables. > Then I include my custom 'local.inc' file from there. Then I > just include > the globals.php file at the top of every page. > > You also have to make sure you rename all the classes (Example_Auth, > Example_Perm, Example_Sess, etc.) so they don't conflict with the > 'local.inc' file that gets included in your prepend.inc file. It is absurd to have server-wide prepend.inc and local.inc files in a multiple site/app environment. You are including files that you may not use and defining classes that you know you won't use - I cannot justify that performance hit on each page call. Layne Weathers Ifworld Inc |
From: Stephen W. <wo...@me...> - 2001-09-10 15:59:20
|
You need to change one line in db_mysql.inc from: $this->Link_ID=mysql_pconnect($Host, $User, $Password); to: $this->Link_ID=mysql_connect($Host, $User, $Password); I had this same problem. -Steve Guenther Theilen wrote: > > Hi, > > I'm using the DB-Class to connect to a MySQL-database. Is it correct > that this class handles the connections for me. In other words: Do I > have to think of closing connections at the end of the script? > > Sorry if this seems to be a stupid question, but I didn't find > anyhting in the manual and today my database didn't work and my > provider told me that this was because of 200 open connections which > caused MySQL to stop... > > tia. > Guenther Theilen > > -- > eqi Web-Design + Infanterieweg 30 + 26129 Oldenburg > Tel: 0441 / 77 81 333 + Fax: 0441 / 99 89 02 20 > mailto:th...@eq... + http://www.eqi.de > > _______________________________________________ > Phplib-users mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phplib-users |
From: Guenther T. <th...@eq...> - 2001-09-10 15:51:25
|
Hi, I'm using the DB-Class to connect to a MySQL-database. Is it correct that this class handles the connections for me. In other words: Do I have to think of closing connections at the end of the script? Sorry if this seems to be a stupid question, but I didn't find anyhting in the manual and today my database didn't work and my provider told me that this was because of 200 open connections which caused MySQL to stop... tia. Guenther Theilen -- eqi Web-Design + Infanterieweg 30 + 26129 Oldenburg Tel: 0441 / 77 81 333 + Fax: 0441 / 99 89 02 20 mailto:th...@eq... + http://www.eqi.de |
From: Brian P. <bp...@ct...> - 2001-09-10 15:47:07
|
I don't think this is a problem. I always create a separate, customized 'local.inc' for each one of my applications. You just need to rename it and then manually include it at the top of every page. I usually create a globals.php file for every application where I define project variables. Then I include my custom 'local.inc' file from there. Then I just include the globals.php file at the top of every page. You also have to make sure you rename all the classes (Example_Auth, Example_Perm, Example_Sess, etc.) so they don't conflict with the 'local.inc' file that gets included in your prepend.inc file. Let me know if you have any questions. BPopp - bpopp.net -----Original Message----- From: Jesse Swensen [mailto:ph...@sw...] Sent: Monday, September 10, 2001 10:27 AM To: php...@li... Subject: Re: [Phplib-users] What is the 'standard phplib install'? I agree. Local.inc becomes a problem when you have multiple applications you want to segregate the parts. The auto prepend and the local.inc should be application specific or at least have the ability to be application specific. -- Jesse > From: "nathan r. hruby" <na...@ds...> > Date: Mon, 10 Sep 2001 11:16:41 -0400 (EDT) > To: Richard Archer <rh...@ju...> > Cc: <php...@li...> > Subject: Re: [Phplib-users] What is the 'standard phplib install'? > > The current local.inc is a bit loaded, but as all app writers know, we > don't care about local.inc becasue we can use our own custom subclasses :) > I think that, if anything, local.inc should be killed in favor of site and > app specfic config files defining what's needed. _______________________________________________ Phplib-users mailing list Php...@li... https://lists.sourceforge.net/lists/listinfo/phplib-users |
From: Brian P. <bp...@ct...> - 2001-09-10 15:28:32
|
Thanks much Gian. The article you referenced in your response fixed the problem. For those with CVS access, this fix apparently hasn't been added to the latest revision (and probably should in my opinion). http://marc.theaimsgroup.com/?l=phplib&m=94269299705992&w=2 -----Original Message----- From: Giancarlo Pinerolo [mailto:gia...@na...] Sent: Friday, September 07, 2001 7:30 PM To: php...@li... Subject: Re: [Phplib-users] Default Auth Help Brian Popp wrote: > > I need a little help with a problem I'm having. It's probably really simple, > but I can't seem to hack my way through it. > > I am using default authentication on a site. I have a link at the top of the > page that can be used to login. When you click the link, it takes you to a > page that does a: > > page_open(...); > $auth->login_if ( $auth->auth[uid] == "nobody" ); > page_close(); > > This pulls up auth's corresponding login dialog. The problem is, I have a > cancel button on this dialog. But there a specific name for that cancel button, default I think 'cancel_button', specified in the Auth var $cl. Did you use that name for the input field/link_querystr? Then method start of Auth (that is any phplib Auth'd page) should take care of that. No need for a special ACTION also see: http://marc.theaimsgroup.com/?l=phplib&m=94269299705992&w=2 dunno if it's already in the code. -Gian No matter what I put behind the cancel, I > can't get rid of the login dialog (unless I enter a valid username and > password). I'm currently trying to make the cancel button link to a logout > page that does: > > my_page_open(); > $auth->logout (true); > my_page_close(); > > But this doesn't work. The logout page apparently generates another login > page before it gets to the logout() function. > > Thanks in advance for ANY help! > > -bpopp > > _______________________________________________ > Phplib-users mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phplib-users _______________________________________________ Phplib-users mailing list Php...@li... https://lists.sourceforge.net/lists/listinfo/phplib-users |
From: Jesse S. <ph...@sw...> - 2001-09-10 15:27:01
|
I agree. Local.inc becomes a problem when you have multiple applications you want to segregate the parts. The auto prepend and the local.inc should be application specific or at least have the ability to be application specific. -- Jesse > From: "nathan r. hruby" <na...@ds...> > Date: Mon, 10 Sep 2001 11:16:41 -0400 (EDT) > To: Richard Archer <rh...@ju...> > Cc: <php...@li...> > Subject: Re: [Phplib-users] What is the 'standard phplib install'? > > The current local.inc is a bit loaded, but as all app writers know, we > don't care about local.inc becasue we can use our own custom subclasses :) > I think that, if anything, local.inc should be killed in favor of site and > app specfic config files defining what's needed. |
From: nathan r. h. <na...@ds...> - 2001-09-10 15:05:06
|
On Mon, 10 Sep 2001, Richard Archer wrote: > > While these packages may offer a simple "just add one line" alternative > to PHPLIB, they certainly don't have the power or extensibility of this > library. > Agreed. Dumbing down phplib isn't what's called for. Power and flexibility mean a bit more complexity in the system (I think we all know that) it's a small price to pay and modifity a few config files and maybe learning a little php syntax is really not that hard, espically if you'll be trying to make money off your phplib based site -- I assume youd want to know how it works!. OTOH, making phplib easier to integrate with multiple apps is something we should strive for; however a lage part of that relies on the application authors to address those issues. It's not something that phlib can easily or elegently deal with. A spec is needed and app writers should be given several methods for publicizing their phplib specfic info or simply not sharing with anyone. The current local.inc is a bit loaded, but as all app writers know, we don't care about local.inc becasue we can use our own custom subclasses :) I think that, if anything, local.inc should be killed in favor of site and app specfic config files defining what's needed. -n -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- nathan hruby / digital statement na...@ds... http://www.dstatement.com/ Public GPG key can be found at: http://www.dstatement.com/nathan-gpg-key.txt ED54 9A5E 132D BD01 9103 EEF3 E1B9 4738 EC90 801B -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- |
From: Layne W. <la...@if...> - 2001-09-10 14:50:47
|
> i need to use this kind of block in a template > > <!-- BEGIN MENU --> > <tr> > <td><a href="{NAME_MENU}"><img src="{IMG_MENU}"></a> > </tr> > <!-- BEGIN SUB_MENU --> > <tr> > <td><a href="{NAME_SUB_MENU}"><img src="{IMG_SUB_MENU}"></a> > </tr> > <!-- END SUB_MENU --> > <!--END MENU --> $tpl = new Template("../templates/"); $tpl->set_file("example", "example.tpl"); $tpl->set_block("example", "MENU"); $tpl->set_block("MENU", "SUB_MENU", "SUB_MENUS"); while( some loop that sets your variables ) { $tpl->set_var(array("NAME_SUB_MENU" => $name_sub_menu, "IMG_SUB_MENU" => $img_sub_menu)); $tpl->parse("SUB_MENUS", "SUB_MENU", true); } $tpl->pparse("example", array("MENU")); Layne Weathers Ifworld Inc |
From: Olivier D. <od...@ph...> - 2001-09-10 14:25:59
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi i need to use this kind of block in a template <!-- BEGIN MENU --> <tr> <td><a href="{NAME_MENU}"><img src="{IMG_MENU}"></a> </tr> <!-- BEGIN SUB_MENU --> <tr> <td><a href="{NAME_SUB_MENU}"><img src="{IMG_SUB_MENU}"></a> </tr> <!-- END SUB_MENU --> <!--END MENU --> if anyone can tell me how to make it work.... and if it's possible, and if not how to make a work arround to use, for example two templates , one for the MENU block the second for the SUB_MENU block regards olivier. - -- Founder of PhpFr.Org http://www.phpfr.org Member of Gcu-Squad association : http://www.gcu-squad.org Member of the Unixlibres network : http://www.unixlibres.net -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE7nM9bWpx2MFZnQzoRAttUAKCdWSMUrPd36ft31sbAkn6Thm2UOQCeIMvJ gIFwS0cRMQH50sVZ8IoBCos= =/vVO -----END PGP SIGNATURE----- |
From: Richard A. <rh...@ju...> - 2001-09-10 00:41:24
|
At 11:19 PM +0200 9/9/01, Giancarlo Pinerolo wrote: >I don't agree with Richard when he says that Phplib is a tool for >programmers, and though it shouldn't be a problem for them to twickle >with classnames and extensions. Since there has been no discussion of my philosophy of PHPLIB on the phplib-users list, here is some background to Giancarlo's statement. I believe it is the power and flexibility of PHPLIB which separates it from the crowd of sess/auth management tools. I have investigated several packages that have been presented as "simple" alternatives to PHPLIB and found them to be lacking in areas such as: * support for non-cookie mode * strength of the underlying security model * management of user data * support for multiple access levels * and one had a non-commercial use license!! While these packages may offer a simple "just add one line" alternative to PHPLIB, they certainly don't have the power or extensibility of this library. I also believe that it is essential for the users of PHPLIB to have a thorough understanding of how it works. PHPLIB by its very nature is being used to manage secure access to web sites and to protect users' personal data. The developers of such sites must understand how the auth/perm scheme works and how users are authenticated. Failure to have a reasonable understanding of how it all fits together opens up a risk of breaking the underlying security model. To this end, I see the current (manual) process of configuring local.inc as a gentle introduction to the world of PHPLIB. And let's face it, once local.inc is configured, using PHPLIB really is as simple as adding an include line and a pair of page_open and page_close calls. I understand that there are many users who want a very simple-to-use library with just the basic features. The standard install of PHPLIB includes a very complex local.inc designed to show off all the features of PHPLIB. I know this is *much* more complex than the local.inc I usually finish up with in a live site. Perhaps the problem here is that the standard local.inc isn't appropriate any more. Rather than showing off everything PHPLIB can do, perhaps the standard install should be simpler. It needs to include at least functionality required to get the phplib/pages demo up and running along with examples of all the techniques that users should know in order to use PHPLIB safely and effectively. Examples of the "optional" components such as template, tree, table, menu etc should be moved to a separate area. I don't think the solution is to create an install script that asks a series of questions and then installs PHPLIB the way *it* thinks you want to use it. ...Richard. |
From: Stephen W. <wo...@me...> - 2001-09-09 23:24:48
|
I have to strongly agree with Gian's points below. There ARE the major reason I picked phplib when building my applications. It has saved me a lot of effort and allowed me to focus on making multiple applications that seemlessly work together. I would really help me if there was a standard configurator and install mechanism. -Steve Giancarlo Pinerolo wrote: > > Phplib and programmers > > I don't agree with Richard when he says that Phplib is a tool for > programmers, and though it shouldn't be a problem for them to twickle > with classnames and extensions. > My opinion is that programmers prefer to concentrate on their > specific application, be it a bugtracking system or a POP3 client. > Phplib core features seldom are programmers' main focus, they are tools. > > Yes, Phplib is for programmers, but the problem they have to solve is > usually another, and most of them need a standard solution they can > engineer with > a minimum of effort, and that can be integrate maybe by someone else > into sites they don't control. > Most want to have a readily usable Auth/User/Perm framework that lets > them handle the prompting of a login form as they like, and that > postpones the problem of site integration into the hands of the site > admimistrator whom we can not suppose being an expert in > Phblib neither, nor interested in becoming one. > > The admin eventually, by just following some coherent instructions and > without need to hack into the programmer's code, should be able to > adjust the site authentication tables with the insertion of the > necessary groups/perms to work with that app. > > For this I think that a 'configurator' script and a declared 'standard > install' can be the first choice for really a lot of people. > My indagations say that it would interest far more than 50% of people > that implement Phplib user/auth features. > > BTW what can be defined the 'standard Phplib install' with regards to > the core Auth/perm/USer features? What do most people implement? Auth > without Persistent User? Custom auth_preauth method? > Nobody/Default_User? MD5 passwds, crc login? > > _______________________________________________ > Phplib-users mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phplib-users |
From: Giancarlo P. <gia...@na...> - 2001-09-09 22:40:09
|
Phplib and programmers I don't agree with Richard when he says that Phplib is a tool for programmers, and though it shouldn't be a problem for them to twickle with classnames and extensions. My opinion is that programmers prefer to concentrate on their specific application, be it a bugtracking system or a POP3 client. Phplib core features seldom are programmers' main focus, they are tools. Yes, Phplib is for programmers, but the problem they have to solve is usually another, and most of them need a standard solution they can engineer with a minimum of effort, and that can be integrate maybe by someone else into sites they don't control. Most want to have a readily usable Auth/User/Perm framework that lets them handle the prompting of a login form as they like, and that postpones the problem of site integration into the hands of the site admimistrator whom we can not suppose being an expert in Phblib neither, nor interested in becoming one. The admin eventually, by just following some coherent instructions and without need to hack into the programmer's code, should be able to adjust the site authentication tables with the insertion of the necessary groups/perms to work with that app. For this I think that a 'configurator' script and a declared 'standard install' can be the first choice for really a lot of people. My indagations say that it would interest far more than 50% of people that implement Phplib user/auth features. BTW what can be defined the 'standard Phplib install' with regards to the core Auth/perm/USer features? What do most people implement? Auth without Persistent User? Custom auth_preauth method? Nobody/Default_User? MD5 passwds, crc login? |
From: nathan r. h. <na...@ds...> - 2001-09-08 16:41:05
|
On Sat, 8 Sep 2001, Dima Nemchenko wrote: > > (But I can't seem to find the docs for PHPLib anymore?) > -- We're working on it. Sorry, use the docs that came with your phplib tarball for now. New docs should be up (in some form or another) soonishly. Keep you eye out on http://phplib.sf.net -n -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- nathan hruby / digital statement na...@ds... http://www.dstatement.com/ Public GPG key can be found at: http://www.dstatement.com/nathan-gpg-key.txt ED54 9A5E 132D BD01 9103 EEF3 E1B9 4738 EC90 801B -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- |
From: Dima N. <Dim...@lu...> - 2001-09-08 16:12:52
|
> I need a little help with a problem I'm having. It's probably really simple, > but I can't seem to hack my way through it. > > I am using default authentication on a site. I have a link at the top of the > page that can be used to login. When you click the link, it takes you to a > page that does a: > > page_open(...); > $auth->login_if ( $auth->auth[uid] == "nobody" ); > page_close(); > > This pulls up auth's corresponding login dialog. The problem is, I have a > cancel button on this dialog. No matter what I put behind the cancel, I > can't get rid of the login dialog (unless I enter a valid username and > password). I'm currently trying to make the cancel button link to a logout > page that does: > > my_page_open(); > $auth->logout (true); > my_page_close(); > > But this doesn't work. The logout page apparently generates another login > page before it gets to the logout() function. > > Thanks in advance for ANY help! > > -bpopp I think "cancel_login" may be of help. (But I can't seem to find the docs for PHPLib anymore?) -- :D_ima Mr. Dima Nemchenko <Dim...@lu...> "Open source code is like lobster--most people who haven't tried it don't like the way it looks. But those who try it, love it." |
From: Giancarlo P. <gia...@na...> - 2001-09-08 00:36:55
|
Brian Popp wrote: > > I need a little help with a problem I'm having. It's probably really simple, > but I can't seem to hack my way through it. > > I am using default authentication on a site. I have a link at the top of the > page that can be used to login. When you click the link, it takes you to a > page that does a: > > page_open(...); > $auth->login_if ( $auth->auth[uid] == "nobody" ); > page_close(); > > This pulls up auth's corresponding login dialog. The problem is, I have a > cancel button on this dialog. But there a specific name for that cancel button, default I think 'cancel_button', specified in the Auth var $cl. Did you use that name for the input field/link_querystr? Then method start of Auth (that is any phplib Auth'd page) should take care of that. No need for a special ACTION also see: http://marc.theaimsgroup.com/?l=phplib&m=94269299705992&w=2 dunno if it's already in the code. -Gian No matter what I put behind the cancel, I > can't get rid of the login dialog (unless I enter a valid username and > password). I'm currently trying to make the cancel button link to a logout > page that does: > > my_page_open(); > $auth->logout (true); > my_page_close(); > > But this doesn't work. The logout page apparently generates another login > page before it gets to the logout() function. > > Thanks in advance for ANY help! > > -bpopp > > _______________________________________________ > Phplib-users mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phplib-users |
From: Brian P. <bp...@ct...> - 2001-09-07 15:30:17
|
I need a little help with a problem I'm having. It's probably really simple, but I can't seem to hack my way through it. I am using default authentication on a site. I have a link at the top of the page that can be used to login. When you click the link, it takes you to a page that does a: page_open(...); $auth->login_if ( $auth->auth[uid] == "nobody" ); page_close(); This pulls up auth's corresponding login dialog. The problem is, I have a cancel button on this dialog. No matter what I put behind the cancel, I can't get rid of the login dialog (unless I enter a valid username and password). I'm currently trying to make the cancel button link to a logout page that does: my_page_open(); $auth->logout (true); my_page_close(); But this doesn't work. The logout page apparently generates another login page before it gets to the logout() function. Thanks in advance for ANY help! -bpopp |
From: nathan r. h. <na...@ds...> - 2001-09-07 13:22:43
|
On Wed, 5 Sep 2001, Bob Bowker wrote: > > PEAR 0.0058 seconds each over a set of 100 > phpLib 0.0062 seconds each over a set of 100 > Hmm.. interesting. What PEAR::DB version, what's the php setup (php optimizer, cache, etc..) and what's the hardware involved? The PEAR DB module has seen a lot of attention in the last several months, so I would assume that some speed tweaks have gone in as well. What was said 6 months ago may no longer be true. -n -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- nathan hruby / digital statement na...@ds... http://www.dstatement.com/ Public GPG key can be found at: http://www.dstatement.com/nathan-gpg-key.txt ED54 9A5E 132D BD01 9103 EEF3 E1B9 4738 EC90 801B -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- |
From: Layne W. <la...@if...> - 2001-09-06 14:13:23
|
> I'm having a bit of trouble using the f($field) method > provided by the > DB_Sql class and have only you to turn to. > > Within setup.inc, I'm attempting to load an array with user > data pulled > from a database and make that array globally accessible for further > manipulation. Previous tests prove that $userdata["user_id"] is both > set and global. Also, I have determined that the > query($query) method > is functioning as I would expect. > > Several websites suggested calling next_record() before > attempting f(), The next_record() is necessary, there must be another problem. By the way, which database are you using? MySQL? Oracle? Other? When I am having trouble with my queries I echo them out and paste them into the mysql client to make sure the database is as I expected. You could also do something like: $db->query($db_query); $db->next_record(); echo "<p>$db_query<br>\n"; foreach($db->Record as $column => $data) { echo "$column : $data<br>\n"; } > so I have added it, but without luck. Also, I have attempted > to access > the data as $db->Record["FIELDNAME"], > $db->Record["TABLENAME.FIELDNAME"], and > $db->f("TABLENAME.FIELDNAME"). The column names will be whatever is specified within your SQL query - tablename.fieldname would only work if you did something like: select username as users.username, firstname as users.firstname ... from users where ... Layne Weathers Ifworld Inc |
From: Kalle S. <ka...@ca...> - 2001-09-06 08:54:50
|
not really. 8-) |
From: Maxim D. <max...@bo...> - 2001-09-06 08:11:16
|
Just a test -- Best regards, Maxim Derkachev mailto:max...@bo... System administrator & programmer, Symbol-Plus Publishing Ltd. phone: +7 (812) 324-53-53 www.books.ru, www.symbol.ru |
From: Richard A. <rh...@ju...> - 2001-09-06 08:06:38
|
At 3:45 PM +0800 6/9/01, dennis wrote: >I'm using phplib7.2c There are *lots* of problems with template.inc and PHP 4.0.6. You will need the latest version from the CVS: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/phplib/php-lib-stable/php/template.inc ...Richard. |
From: dennis <de...@i-...> - 2001-09-06 07:45:36
|
Hi,=20 I'm using phplib7.2c, and upgrade php from 4.0.2pl to 4.0.6. A problem = was found, please see the example. The example is ok which run in = php4.0.2, but run in php4.0.6 would output error. <shell.html> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D {IC}<br> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D <test.php> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D <? include("template.inc"); $tmp =3D "$100"; echo $tmp."<br>"; <=3D=3D There will be output "$100" $t =3D new Template; $t->set_file("page", "shell.html"); $t->set_var("IC", $tmp); $t->parse("out", "page"); $t->p("out"); <=3D=3D There will be output "0", run = in php4.0.6 ?> There will be output "$100", = run in php4.0.2 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D |
From: w.d. k. <fe...@fe...> - 2001-09-06 04:05:35
|
Greetings and Salutations All, I'm having a bit of trouble using the f($field) method provided by the DB_Sql class and have only you to turn to. Within setup.inc, I'm attempting to load an array with user data pulled from a database and make that array globally accessible for further manipulation. Previous tests prove that $userdata["user_id"] is both set and global. Also, I have determined that the query($query) method is functioning as I would expect. Several websites suggested calling next_record() before attempting f(), so I have added it, but without luck. Also, I have attempted to access the data as $db->Record["FIELDNAME"], $db->Record["TABLENAME.FIELDNAME"], and $db->f("TABLENAME.FIELDNAME"). Sadly, even these exercises prove futile. I'm a complete virgin to the worlds of PHPLIB, PHP, and general programming, so I expect my mistake to be a simple one, and I trust your collective expertise will uncover the error without much exertion. Double kudos to the clever individual pointing me toward a more elegant methodology in loading both this and future arrays. My humble thanks, wesley /* * It's all (elementary) code from here, baby... */ // set up variables global $userdata; $userdata = array(); $userdata["user_id"] = $auth->auth["uid"]; // execute query $db = new Sthlurp_Db_Sql; $db_query = sprintf("select * from users where user_id='%s'", $userdata["user_id"]); $db->query($db_query); // added as suggested $db->next_record(); // load data into userdata $userdata["username"] = $db->f("username"); $userdata["firstname"] = $db->f("firstname"); $userdata["lastname"] = $db->f("lastname"); $userdata["email"] = $db->f("email"); $userdata["password"] = $db->f("password"); $userdata["perms"] = $db->f("perms"); // register userdata in session $sess->register("userdata"); // garbage collection unset($db_query); unset($db); |