userlogin-users Mailing List for UserLogin
Status: Beta
Brought to you by:
johnkeiser
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(21) |
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(4) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Max B. <ma...@wa...> - 2002-01-27 21:07:39
|
Hi John et al., I am going to use User Login for a project I'm working on (it's a photo gallery built in mason, open source), and need to taylor userlogin to my needs. I wanted to make sure i wasn't duplicating any efforts in : - Removing any dependencies to CGI:: - Making a verified account registration system, a la mailing lists, where you have to send a confirmation. - Adding a PL/SQL function to expire old sessions, instead of a cron job. looks like a great piece of software, i'll keep you all posted. -max |
From: John K. <jk...@in...> - 2002-01-22 23:55:23
|
On Tue, 2002-01-22 at 13:58, Bruce Albrecht wrote: > I'm trying to set up a test of UserLogin-0.6.2, and register, > edit_session, and edit_user all fail with > > error in file: > /usr/local/mason/obj/ihug/edit_session.mason > > line 15: > Global symbol "$session" requires explicit package name > line 27: > Global symbol "$sys" requires explicit package name > > > The line numbers may be different for edit_user.mason. According to > the Changes notes, there shouldn't be a need for these symbols to be > global any more. Is there something I'm doing wrong, or are these > files out of date? > I've been having problems intermittently with this. Your best bet by far is to edit the Mason configuration and use AllowGlobals with those two vars. The problem being that they are not set up as global vars. I had thought I got around that in 0.6.2, but it is obvious I did not :( --John Keiser |
From: Bruce A. <br...@zu...> - 2002-01-22 21:07:06
|
Bruce Albrecht writes: > The line numbers may be different for edit_user.mason. According to > the Changes notes, there shouldn't be a need for these symbols to be > global any more. Is there something I'm doing wrong, or are these > files out of date? This all occurred before I logged in. After logging in, it all worked, so maybe there was a cache problem. |
From: Bruce A. <br...@zu...> - 2002-01-22 20:58:09
|
I'm trying to set up a test of UserLogin-0.6.2, and register, edit_session, and edit_user all fail with error in file: /usr/local/mason/obj/ihug/edit_session.mason line 15: Global symbol "$session" requires explicit package name line 27: Global symbol "$sys" requires explicit package name The line numbers may be different for edit_user.mason. According to the Changes notes, there shouldn't be a need for these symbols to be global any more. Is there something I'm doing wrong, or are these files out of date? |
From: John K. <jk...@in...> - 2001-09-07 21:57:11
|
Incidentally, UserLogin *will* work for what you want to do, it just might be overkill :) --John On 07 Sep 2001 11:28:46 -0800, Brian Avis wrote: > Okay I followed your blatant plug from the mason list to use UserLogin. > > The install docs say to do this. > > cd sql > setup-postgres.pl > > > I am running > Postgres 7.1.3 > Perl 5.6.1 > > Solaris 8 > > I created a db called userdata (didn't really know what to call it). > > and ran setup-postgres.pl userdata and this is what I got. > > Dropping ul_PARAMETER ... > ERROR: table "ul_parameter" does not exist > DBD::Pg::st execute failed: ERROR: table "ul_parameter" does not exist > at ./setup-postgres.pl line 113. > Dropping ul_SESSION_VAR ... > ERROR: table "ul_session_var" does not exist > DBD::Pg::st execute failed: ERROR: table "ul_session_var" does not > exist at ./setup-postgres.pl line 113. > Dropping ul_SESSION ... > ERROR: table "ul_session" does not exist > DBD::Pg::st execute failed: ERROR: table "ul_session" does not exist at > ./setup-postgres.pl line 113. > Dropping ul_USER_ATTRIBUTE ... > ERROR: table "ul_user_attribute" does not exist > DBD::Pg::st execute failed: ERROR: table "ul_user_attribute" does not > exist at ./setup-postgres.pl line 113. > Dropping ul_ATTRIBUTE (seq: ul_attribute_attribute_id_seq) ... > ERROR: sequence "ul_attribute_attribute_id_seq" does not exist > DBD::Pg::st execute failed: ERROR: sequence > "ul_attribute_attribute_id_seq" does not exist at ./setup-postgres.pl > line 109. > ERROR: table "ul_attribute" does not exist > DBD::Pg::st execute failed: ERROR: table "ul_attribute" does not exist > at ./setup-postgres.pl line 113. > Dropping ul_USER (seq: ul_user_user_id_seq) ... > ERROR: sequence "ul_user_user_id_seq" does not exist > DBD::Pg::st execute failed: ERROR: sequence "ul_user_user_id_seq" does > not exist at ./setup-postgres.pl line 109. > ERROR: table "ul_user" does not exist > DBD::Pg::st execute failed: ERROR: table "ul_user" does not exist at > ./setup-postgres.pl line 113. > Dropping ul_GROUP (seq: ul_group_group_id_seq) ... > ERROR: sequence "ul_group_group_id_seq" does not exist > DBD::Pg::st execute failed: ERROR: sequence "ul_group_group_id_seq" > does not exist at ./setup-postgres.pl line 109. > ERROR: table "ul_group" does not exist > DBD::Pg::st execute failed: ERROR: table "ul_group" does not exist at > ./setup-postgres.pl line 113. > Executing psql -f create_schema_postgres.sql.new userdata ... > ERROR: Relation 'ul_attribute' does not exist > DBD::Pg::st execute failed: ERROR: Relation 'ul_attribute' does not > exist at /usr/local/lib/perl5/site_perl/5.6.1/Tie/HashRef/DBICache.pm > line 37. > DBD::Pg::st execute failed: ERROR: Relation 'ul_attribute' does not > exist at /usr/local/lib/perl5/site_perl/5.6.1/Tie/HashRef/DBICache.pm > line 37. > Database handle destroyed without explicit disconnect. > pq_recvbuf: unexpected EOF on client connection > Segmentation Fault > > > I am pretty sure that isn't correct. :) > > All I want to do is to be able to track from 4 to 5 variables throughout > a users session. I am not even sure if I need a user login to do this or > not. > > Any advice on what I am doing wrong? > > > > -- > Brian Avis > SEARHC Medical Clinic > Juneau, AK 99801 > (907) 463-4049 > If nautical nonsense be something you wish, > then drop on the deck and flop like a fish. > > > > _______________________________________________ > userlogin-users mailing list > use...@li... > https://lists.sourceforge.net/lists/listinfo/userlogin-users -- http://www.johnkeiser.com http://www.wrighthaven.com - Technology and Philanthropy |
From: John K. <jk...@in...> - 2001-09-07 20:24:12
|
On 07 Sep 2001 11:28:46 -0800, Brian Avis wrote: > Okay I followed your blatant plug from the mason list to use UserLogin. > > The install docs say to do this. > > cd sql > setup-postgres.pl > > > I am running > Postgres 7.1.3 > Perl 5.6.1 > > Solaris 8 > > I created a db called userdata (didn't really know what to call it). > > and ran setup-postgres.pl userdata and this is what I got. > > Dropping ul_PARAMETER ... > ERROR: table "ul_parameter" does not exist > DBD::Pg::st execute failed: ERROR: table "ul_parameter" does not exist > at ./setup-postgres.pl line 113. > Dropping ul_SESSION_VAR ... > ERROR: table "ul_session_var" does not exist > DBD::Pg::st execute failed: ERROR: table "ul_session_var" does not > exist at ./setup-postgres.pl line 113. > Dropping ul_SESSION ... > ERROR: table "ul_session" does not exist > DBD::Pg::st execute failed: ERROR: table "ul_session" does not exist at > ./setup-postgres.pl line 113. > Dropping ul_USER_ATTRIBUTE ... > ERROR: table "ul_user_attribute" does not exist > DBD::Pg::st execute failed: ERROR: table "ul_user_attribute" does not > exist at ./setup-postgres.pl line 113. > Dropping ul_ATTRIBUTE (seq: ul_attribute_attribute_id_seq) ... > ERROR: sequence "ul_attribute_attribute_id_seq" does not exist > DBD::Pg::st execute failed: ERROR: sequence > "ul_attribute_attribute_id_seq" does not exist at ./setup-postgres.pl > line 109. > ERROR: table "ul_attribute" does not exist > DBD::Pg::st execute failed: ERROR: table "ul_attribute" does not exist > at ./setup-postgres.pl line 113. > Dropping ul_USER (seq: ul_user_user_id_seq) ... > ERROR: sequence "ul_user_user_id_seq" does not exist > DBD::Pg::st execute failed: ERROR: sequence "ul_user_user_id_seq" does > not exist at ./setup-postgres.pl line 109. > ERROR: table "ul_user" does not exist > DBD::Pg::st execute failed: ERROR: table "ul_user" does not exist at > ./setup-postgres.pl line 113. > Dropping ul_GROUP (seq: ul_group_group_id_seq) ... > ERROR: sequence "ul_group_group_id_seq" does not exist > DBD::Pg::st execute failed: ERROR: sequence "ul_group_group_id_seq" > does not exist at ./setup-postgres.pl line 109. > ERROR: table "ul_group" does not exist > DBD::Pg::st execute failed: ERROR: table "ul_group" does not exist at > ./setup-postgres.pl line 113. > Executing psql -f create_schema_postgres.sql.new userdata ... > ERROR: Relation 'ul_attribute' does not exist > DBD::Pg::st execute failed: ERROR: Relation 'ul_attribute' does not > exist at /usr/local/lib/perl5/site_perl/5.6.1/Tie/HashRef/DBICache.pm > line 37. > DBD::Pg::st execute failed: ERROR: Relation 'ul_attribute' does not > exist at /usr/local/lib/perl5/site_perl/5.6.1/Tie/HashRef/DBICache.pm > line 37. > Database handle destroyed without explicit disconnect. > pq_recvbuf: unexpected EOF on client connection > Segmentation Fault > > > I am pretty sure that isn't correct. :) > > All I want to do is to be able to track from 4 to 5 variables throughout > a users session. I am not even sure if I need a user login to do this or > not. > > Any advice on what I am doing wrong? > Well, first, I think I might have steered you wrong, if you are not going to have users at all, or store information about each user ... Apache::Session might actually be better for you if all you care about is anonymous sessions, though you're going to have to write the cookie-dropping logic yourself. (Not terribly hard.) Plus, if you use Apache::Session, you should be able to easily convert to UserLogin later if you decide to add users. (Both systems use hashes to store / retrieve data.) As to the errors you're getting, don't worry, it looks like you're set up fine :) The removing tables thing is happening because the script doesn't check to see if tables exist before removing them yet. I'll have to fix that sometime or at least put a note in the install guide. The db handle destroyed error is troubling, I'll look into it. It's almost like we're not calling $sys->finished; at the end of the script. --John |
From: Brian A. <bri...@se...> - 2001-09-07 19:28:45
|
Okay I followed your blatant plug from the mason list to use UserLogin. The install docs say to do this. cd sql setup-postgres.pl I am running Postgres 7.1.3 Perl 5.6.1 Solaris 8 I created a db called userdata (didn't really know what to call it). and ran setup-postgres.pl userdata and this is what I got. Dropping ul_PARAMETER ... ERROR: table "ul_parameter" does not exist DBD::Pg::st execute failed: ERROR: table "ul_parameter" does not exist at ./setup-postgres.pl line 113. Dropping ul_SESSION_VAR ... ERROR: table "ul_session_var" does not exist DBD::Pg::st execute failed: ERROR: table "ul_session_var" does not exist at ./setup-postgres.pl line 113. Dropping ul_SESSION ... ERROR: table "ul_session" does not exist DBD::Pg::st execute failed: ERROR: table "ul_session" does not exist at ./setup-postgres.pl line 113. Dropping ul_USER_ATTRIBUTE ... ERROR: table "ul_user_attribute" does not exist DBD::Pg::st execute failed: ERROR: table "ul_user_attribute" does not exist at ./setup-postgres.pl line 113. Dropping ul_ATTRIBUTE (seq: ul_attribute_attribute_id_seq) ... ERROR: sequence "ul_attribute_attribute_id_seq" does not exist DBD::Pg::st execute failed: ERROR: sequence "ul_attribute_attribute_id_seq" does not exist at ./setup-postgres.pl line 109. ERROR: table "ul_attribute" does not exist DBD::Pg::st execute failed: ERROR: table "ul_attribute" does not exist at ./setup-postgres.pl line 113. Dropping ul_USER (seq: ul_user_user_id_seq) ... ERROR: sequence "ul_user_user_id_seq" does not exist DBD::Pg::st execute failed: ERROR: sequence "ul_user_user_id_seq" does not exist at ./setup-postgres.pl line 109. ERROR: table "ul_user" does not exist DBD::Pg::st execute failed: ERROR: table "ul_user" does not exist at ./setup-postgres.pl line 113. Dropping ul_GROUP (seq: ul_group_group_id_seq) ... ERROR: sequence "ul_group_group_id_seq" does not exist DBD::Pg::st execute failed: ERROR: sequence "ul_group_group_id_seq" does not exist at ./setup-postgres.pl line 109. ERROR: table "ul_group" does not exist DBD::Pg::st execute failed: ERROR: table "ul_group" does not exist at ./setup-postgres.pl line 113. Executing psql -f create_schema_postgres.sql.new userdata ... ERROR: Relation 'ul_attribute' does not exist DBD::Pg::st execute failed: ERROR: Relation 'ul_attribute' does not exist at /usr/local/lib/perl5/site_perl/5.6.1/Tie/HashRef/DBICache.pm line 37. DBD::Pg::st execute failed: ERROR: Relation 'ul_attribute' does not exist at /usr/local/lib/perl5/site_perl/5.6.1/Tie/HashRef/DBICache.pm line 37. Database handle destroyed without explicit disconnect. pq_recvbuf: unexpected EOF on client connection Segmentation Fault I am pretty sure that isn't correct. :) All I want to do is to be able to track from 4 to 5 variables throughout a users session. I am not even sure if I need a user login to do this or not. Any advice on what I am doing wrong? -- Brian Avis SEARHC Medical Clinic Juneau, AK 99801 (907) 463-4049 If nautical nonsense be something you wish, then drop on the deck and flop like a fish. |
From: John K. <jk...@in...> - 2001-09-06 21:18:52
|
On 06 Sep 2001 15:46:22 -0500, Mark Nickel wrote: > > > Just another quick question, how are sessions, both anonymous and user, > expired? I see that there is a control in the database for Sessions, > but the default is like 2 days. Is that for all sessions?? > > Are we required to set up a cron job to cruise through the ul_sessions > table and delete stale records? > > Thanks also, John, for the great example on how to use permissions with > the newest release! > As it happens, I just added a bug report on this. I just wrote one up (attached), which deleted an old session and didn't delete a new one; let me know if it works for you. It could use some help at *least* in argument passing (a la userlogin/sql/setup-postgres.pl) to be really slick, but I suppose it's not necessary. --John |
From: Mark N. <mn...@du...> - 2001-09-06 20:43:49
|
Just another quick question, how are sessions, both anonymous and user, expired? I see that there is a control in the database for Sessions, but the default is like 2 days. Is that for all sessions?? Are we required to set up a cron job to cruise through the ul_sessions table and delete stale records? Thanks also, John, for the great example on how to use permissions with the newest release! TIA Mark |
From: John K. <jk...@in...> - 2001-09-06 20:19:01
|
On 06 Sep 2001 16:07:24 -0400, la...@lu... wrote: > Thanks for the info John. > > By the way, is there a way to set password to be encrypted, or will I need > to hack that in if I want it? > Not yet ... if you want to hack it in that'd be great :) I was thinking it would be good to keep the changes local to JavaScript (encrypt password when registering (before sending to server), encrypt password before sending to server when logging in. Then the server just has to do a compare, and as an added benefit the password is encrypted even over HTTP. The other possible way is to make the change in UserLogin.pm itself, in any place where it looks at the "-password". I figure if it can be done in JavaScript it's easier, though. See the related bug (http://sourceforge.net/tracker/index.php?func=detail&aid=457128&group_id=34123&atid=410562) for some info. --John Keiser |
From: <la...@lu...> - 2001-09-06 20:07:28
|
Thanks for the info John. By the way, is there a way to set password to be encrypted, or will I need to hack that in if I want it? ----------------------------------------------------------------------------- Brian Knox Just Another Perl Hacker perl -le '$_="6110>374086;2064208213:90<307;55";tr[0->][ LEOR!AUBGNSTY];print' On 6 Sep 2001, John Keiser wrote: > Incidentally all, 0.6.2 is out with a bugfix in permissions checking. > > > On 06 Sep 2001 11:20:53 -0400, la...@lu... wrote: > > > > Hello all. I recently ran into the UserLogin component(s) for mason, and > > have one question about it. I have it set up and working, but the > > documentation is a little sparse (non existant? :) ). > > > > Besides the comments in autohandler and the install guide, none. Soon, > I promise :) > > BTW, the proper place for this use...@so... ... I'd > like to pollute the Mason list as little as possible with my bugs. > > You might want to grab the new version I just put up (0.6.2) which fixes > the $sys->finished thing and makes the example permissions stuff look > better. Answers below. > > > I'm unclear about one of the overrideable things in the autohandler. The > > permissions attribute has me confused. > > > > First of all, the example attributes in the included autohandler in the > > sample application looks wrong. It has: > > > > <%attr> > > $permissions=> { "Cannot Do Anything" => 0, "Super-User" => 1} > > </%attr> > > > > Shouldn't that be "permissions=>" instead? > > > > Yeppers. > > And the <%doc> around it needs to be removed. In fact, you don't need > either of those statements--they are redundant. The default > check_permissions checks those no matter what. And you're right about > the ->finished thing, I apparently didn't retest permissions hash after > changing %cleanup. The new version fixes the error. > > For the situation you described, this boolean checking won't help you > anyway, so you don't need to grab it yet. Read on. > > > Does anyone have a good working example on what I need to do to specify in > > a component / page that it can only be accessed by someone at or above a > > specific user level using UserLogin? > > > > Since the default check_session only checks boolean, you'll have to > override check_permissions. Search for %method check_permissions in > autohandler. Remove the %doc around it. > > For what you're looking for, check_permissions is your best bet. > > Here's an example. You can override this in different components to use > different levels. > > <%method check_permissions> > <%perl> > my $user = $ARGS{-sys}{users}{$ARGS{-session}{_user_id}}; > if($user->{UserLevel} < 5) { > return 0; > } > > return $m->call_method("session:check_permissions", %ARGS); > </%perl> > </%method> > > You don't have to call session:check_permissions, but if you want to be > able to disable users using the "Cannot Do Anything" parameter it's a > good idea. > > --John > > > > _______________________________________________ > userlogin-users mailing list > use...@li... > https://lists.sourceforge.net/lists/listinfo/userlogin-users > |
From: John K. <jk...@in...> - 2001-09-06 17:47:00
|
Incidentally all, 0.6.2 is out with a bugfix in permissions checking. On 06 Sep 2001 11:20:53 -0400, la...@lu... wrote: > > Hello all. I recently ran into the UserLogin component(s) for mason, and > have one question about it. I have it set up and working, but the > documentation is a little sparse (non existant? :) ). > Besides the comments in autohandler and the install guide, none. Soon, I promise :) BTW, the proper place for this use...@so... ... I'd like to pollute the Mason list as little as possible with my bugs. You might want to grab the new version I just put up (0.6.2) which fixes the $sys->finished thing and makes the example permissions stuff look better. Answers below. > I'm unclear about one of the overrideable things in the autohandler. The > permissions attribute has me confused. > > First of all, the example attributes in the included autohandler in the > sample application looks wrong. It has: > > <%attr> > $permissions=> { "Cannot Do Anything" => 0, "Super-User" => 1} > </%attr> > > Shouldn't that be "permissions=>" instead? > Yeppers. And the <%doc> around it needs to be removed. In fact, you don't need either of those statements--they are redundant. The default check_permissions checks those no matter what. And you're right about the ->finished thing, I apparently didn't retest permissions hash after changing %cleanup. The new version fixes the error. For the situation you described, this boolean checking won't help you anyway, so you don't need to grab it yet. Read on. > Does anyone have a good working example on what I need to do to specify in > a component / page that it can only be accessed by someone at or above a > specific user level using UserLogin? > Since the default check_session only checks boolean, you'll have to override check_permissions. Search for %method check_permissions in autohandler. Remove the %doc around it. For what you're looking for, check_permissions is your best bet. Here's an example. You can override this in different components to use different levels. <%method check_permissions> <%perl> my $user = $ARGS{-sys}{users}{$ARGS{-session}{_user_id}}; if($user->{UserLevel} < 5) { return 0; } return $m->call_method("session:check_permissions", %ARGS); </%perl> </%method> You don't have to call session:check_permissions, but if you want to be able to disable users using the "Cannot Do Anything" parameter it's a good idea. --John |
From: <la...@lu...> - 2001-09-06 17:44:17
|
I was wondering if anyone had a working example on how to use the <%attr> section to set what level a user needs to be to access a page / component. The autohandler that comes w/ UserLogin has a <%doc> section with an <%attr> section, but I believe it is wrong. <%attr> $permissions => { "Cannot Do Anything" => 0, "Super-User" => 1 } </%attr> Shouldn't that be permissions=> instead of $permissions=> ? If I remove the doc tags from that section I get: error in file: /usr/local/apache/mason/obj/testauth/autohandler line 47: Global symbol "$permissions" requires explicit package name line 56: BEGIN not safe after errors--compilation aborted context: ... 43: db => "userlogin", 44: host => undef, 45: port => undef, 46: username => "laotse", 47: password => "laotse",$permissions => { "Cannot Do Anything" => 0, "Super-User" => 1 }}, 48: 'code'=>sub { 49: my %ARGS; 50: { local $^W; %ARGS = @_ unless (@_ % 2); } 51: my $_out = $m->current_sink; 52: $m->debug_hook($m->current_comp->path) if (%DB::); 53: 54: 55: # Create global session and sys 56: use POSIX; 57: use vars qw($session $sys); 58: my $err; 59: # Assign global session and sys 60: ($session, $sys, $err) = $m->comp('session', %ARGS); I tried removing the $ from permissions but that did not work either. Can someone explain to me / show me an example on how to get a page/component to check for the user level of the logged in person and display or not display according to the required permission level? ----------------------------------------------------------------------------- Brian Knox Just Another Perl Hacker perl -le '$_="6110>374086;2064208213:90<307;55";tr[0->][ LEOR!AUBGNSTY];print' |
From: John K. <jk...@in...> - 2001-09-05 17:19:22
|
On 05 Sep 2001 09:58:34 +0200, Robert Lundsten wrote: > Hello all! > > I just downloaded Userlogin and to my suprice It dosen't > support MySQL. Or... is it just me?! > If not, does anyone know if there is going to be > a relese of userlogin for MySQL? > Next version. The way it's split up right now, it shouldn't be awful hard, but I'm more used to Postgres so that's what got done first. My webhost only supports MySQL though, so it's a high priority on my list :) DBM and Oracle are two others in the plans. I suspect Oracle will be the easier of the two, but it doesn't seem to exist. --John |
From: Robert L. <rob...@tc...> - 2001-09-05 07:56:11
|
Hello all! I just downloaded Userlogin and to my suprice It dosen't support MySQL. Or... is it just me?! If not, does anyone know if there is going to be a relese of userlogin for MySQL? Thanks! ------------------------------------- Robert Lundsten Senior Systems Engineer TCM, Take Care Marketing AB rob...@tc... +46-73-917 20 00 |
From: John K. <jk...@in...> - 2001-09-03 20:25:41
|
gotcha -- http://www.johnkeiser.com http://www.wrighthaven.com - Technology and Philanthropy |
From: John K. <jk...@in...> - 2001-09-03 20:16:07
|
Trying again |
From: John K. <jk...@in...> - 2001-09-03 20:11:47
|
Sorry for spam. |
From: John K. <jk...@in...> - 2001-09-03 19:57:16
|
On 03 Sep 2001 10:35:09 +0200, Amodiovalerio Verde wrote: > Hmmm... >=20 > 1=B0 there's an error in sql/setup-postgres.pl >=20 > it's asking for UserLoginInit.pm >=20 Arr. I should have un-tarred the dist. It's included (and tested) now. > 2=B0 avoid strftime in autohandler ( i've no such function so other peopl= e > could have problem to figure it out ) >=20 strftime is in POSIX ... I've added "use POSIX" in the autohandler. Try that and let me know if it works for you. It should come standard with Perl. > 3=B0 It doesn't work :( ... There's the error file attached. >=20 Fixed. Though I have no idea why it worked for me, ever. I also found and fixed a much larger problem that your stacktrace indicated--thanks. It was trying to cache the entire system object, not just the sessions in use. You will need to delete your Mason cache files (/var/www/mason/cache/* for me). > Have you seen that module I told you ? >=20 Yep. It looks like it's mainly authentication from the docs on the site ... one possible way we could work with modules like this is to split our authentication off from the user/session data. I am not entirely sure whether this buys us anything great, though. > I'll look further in UserLogin later today. >=20 Attached is 0.6.1. Thanks so much for your help! --John |
From: Amodiovalerio V. <am...@wi...> - 2001-09-03 08:35:16
|
Hmmm... 1° there's an error in sql/setup-postgres.pl it's asking for UserLoginInit.pm 2° avoid strftime in autohandler ( i've no such function so other people could have problem to figure it out ) 3° It doesn't work :( ... There's the error file attached. Have you seen that module I told you ? I'll look further in UserLogin later today. Valerio [Hypo] Verde |
From: Amodiovalerio V. <am...@wi...> - 2001-09-03 08:23:14
|
http://userlogin.sourceforge.net/ ... Changes...ehm...we are in 2001 :) not in 2000 :P > P.S. Valerio, try this version, and make sure you call $sys->finished in cleanup. It should save unsaved stuff and disconnect from the DB. I'll try it immediatly and I let you know. Valerio [Hypo] Verde |
From: John K. <jk...@in...> - 2001-09-03 07:49:41
|
0.6, the "Zero Administration Version," is out, with these changes: - Remove need for $sys and $session to be global - Make Perl script to perform all DB setup tasks - Add grant capability to SQL (thanks Mark Nickel) - Add host and port parameters for Postgres - Allow table name prefixes to be user-configurable - Arguments to new UserLogin::Postgres are now a hash for easier overriding - Add "finished" to $sys to clean up connection It's at http://sourceforge.net/project/showfiles.php?group_id=34123. P.S. Valerio, try this version, and make sure you call $sys->finished in cleanup. It should save unsaved stuff and disconnect from the DB. -- http://www.johnkeiser.com http://www.wrighthaven.com - Technology and Philanthropy |
From: John K. <jk...@in...> - 2001-09-02 18:51:41
|
On 02 Sep 2001 12:35:53 +0200, Amodiovalerio Verde wrote: > I look a little further inside UserLogin. > > I'm not so good with 'object-like' programming, but it seems that the > DESTROY constructor in Postgres.pm is never called. So you end up with a > bounce of connect until postgresql will complain. > > Well I'm going to debug it a little to see what it's happening. > > I look around using web search engine, and seems that other people has some > problem with mod_perl, mason and the DESTROY constructor and looking in the > perlobj page : > > When the last reference to an object goes away, the object is automatically > destroyed. (This may even be after you exit, if you've stored references in > global variables.) > > maybe there still some reference in a persistence connection ??? > Wow, thanks :) Well, what I think is going on there at least is the garbage collector isn't able to delete it immediately because there are circular references. Specifically, $sys holds a reference to $sys->{parameters}, which holds a reference back to $sys. I am thinking we may want to create a $sys->finished() method that does the same thing as DESTROY to alleviate these problems. I've opened a bug on this. I'll play with it and get finished() in today or tomorrow along with Mark Nickel's patch. --John |
From: Amodiovalerio V. <am...@wi...> - 2001-09-02 10:36:04
|
I look a little further inside UserLogin. I'm not so good with 'object-like' programming, but it seems that the DESTROY constructor in Postgres.pm is never called. So you end up with a bounce of connect until postgresql will complain. Well I'm going to debug it a little to see what it's happening. I look around using web search engine, and seems that other people has some problem with mod_perl, mason and the DESTROY constructor and looking in the perlobj page : When the last reference to an object goes away, the object is automatically destroyed. (This may even be after you exit, if you've stored references in global variables.) maybe there still some reference in a persistence connection ??? Valerio [Hypo] Verde |
From: John K. <jk...@in...> - 2001-09-01 23:40:48
|
On 01 Sep 2001 22:50:20 +0200, Amodiovalerio Verde wrote: > Hi John, > > it's quite working now, but there are some problem with Postgresql > connections. > > I don't know why but it seems that after a connect, the connection stay idle > like there was no disconnect at all. > > Pratically after about 20-30 reload it came out with a > > DBI->connect(dbname=userlogin) failed: Sorry too many clients already > > I was writing a kind of UserLogin module few month ago, and I got an > interesting start from a package already written for Perl, called Averist. I > have tested it quite extensively under Postgresql and Mysql and it works > fine. > I had some problem for cookie output, then i had to move to other job, so i > discontinue working on that Averist-Mason hack. > That is odd ... you using regular DBI or Apache::DBI? I think you will be OK with Apache::DBI (and your scripts will be more efficient). All you have to do is replace your use DBI; with use Apache::DBI; But what you are describing is probably a real problem, and I'll look into it. I have noticed that for some reason Perl isn't destroying my objects like I'd like them to :( > Now I had to work on that thing again, cause I'm working to a portal with > user base authentication. > > I'd like to know in which direction will UserLogin move, if there are any > other interested and so on. > > I think is unusefull to came up with two things that made the same thing. > > Let me know what do you think about it. > For UserLogin itself, short-term plans are to make the cache happier and have the example code encrypt the password before it gets sent over the wire. Long-range, I think the basic architecture is sound but I'm more than happy to hear suggestions. But the place where it gets interesting is, I'd like to end up building a suite of apps that use UserLogin--bulletin board, shopping cart & other ecommerce apps, content management. Really what I want to do is convert some existing utilities (like Mason-CM) to use it. This could become something like an application base--install this set of packages (conveniently bundled together), customize a few parameters and you have a dynamic website. Besides myself (I am using UserLogin in an upcoming shopping cart) there have been a few other people that have emailed me about it already. We should continue discussion about project direction in the mailing list though, I'm cc'ing this there. To look at the list, or subscribe, go to http://sourceforge.net/mail/?group_id=34123. --John |