Re: Apache::Session and user sessions

2002-12-07 Thread md

--- Perrin Harkins [EMAIL PROTECTED] wrote:
 Todd W wrote:
   I have a table with some basic user information
 (first name, last name, 
  address,
  phone number, etc...).
 
 That's permanent data, not session data.  Session
 data is transient.

I was reading through the archives and came across
this. Everyone was so helpful the last time I had a
Apache::Session question (thread what goes in a
session?) so I'm back with another question. 

The last project I worked on really had no transient
data, so the only thing I put in the session was the
user id (well, there was one transisent item...current
page, so that got put in the session as well). 

The project I'm currently working on (mod_perl, TT,
Apache::Session) is a registration system. Since this
is closer to a shopping cart, I would consider the
data transisent. 

My question is with regards to whether I need or
should put the submitted data into the session as the
user navigates the forms (to create an account). The
user will be taken through three forms to create an
account. So for instance, form one will ask the user
to create a username, password, and provide an email
address. Before moving on to form two (billing info),
should I put this data in the session, or just go
ahead and dump it in the database (after making any
nec. checks), since I won't need the info until they
actually login? Or should I collect all the info from
all three screens by putting it in the session as the
user traverses the forms and then put it all in the
database at once? I'm currently using the first
option. BTW, it is possible for a user to create a
free account by hitting form one only, so no harm
would come if something happened after form one.

Another question, while not mod_perl related (sorry:),
is how to taint check input data like usernames,
address fields and email addresses. All info is just
put in the database, no unsafe system calls are run.
I'm curious as to what characters to limit for
usernames in particular.

Thanks...

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com



Re: Online Tonight (Bricolage)

2002-12-07 Thread David Wheeler
On Friday, December 6, 2002, at 09:18  PM, Les Mikesell wrote:


I got the workspace side running with only a little fiddling to
back out a CPAN-installed Mason 1.15, but still don't understand
how to publish pages to a viewing site.   Is a working example included
or available?   I was hoping for something like http://www.plone.org
has as a starting point (but of course I want to use apache/mod_perl
instead of zope/python).  Or do I just have to learn a lot more about
Mason myself?


Unfortunately, there is no demo site. If you create stories with the 
default elements in the system and preview them, the default templates 
will render your stories (in a very ugly way). If you create a 
Destination to distribute those stories, you can then publish them.

But if you want to customize the look and feel of the templates for 
your own site, you are going to have to learn how to create templates. 
This is even more true if you create your own elements. The 
documentation for Mason templates is in Bric::Templates and 
Bric::AdvTemplates. But no, you don't have to learn Mason; you can use 
HTML::Template templates, instead, if you like. The documentation for 
HTML::Template templates is in, you guessed it, Bric::HTMLTemplate. 
BTW, all of the Bricolage documentation is available online, too, 
although be aware that the online copies are for the development 
version of Bricolage.

  http://bricolage.cc/documentation.html

Good luck!

David

--
David Wheeler AIM: dwTheory
[EMAIL PROTECTED] ICQ: 15726394
http://david.wheeler.net/  Yahoo!: dew7e
   Jabber: [EMAIL PROTECTED]



0x444ba45b in prof_mark () from /usr/lib/perl5/5.6.1/i686-linux/auto/Devel/DProf/DProf.so

2002-12-07 Thread Richard Clarke
List,
I seem to have hit a slight stumbling block in my mod_perl development.
Without wanting to write a whole essay on the exact combination of events
that causes this segv to happen I'll just say for now that it happens after
my custom Template::Provider returns a status indicating a template could
not be found. My apache error log indicates that the segv happens
immediately after my contenthandler returns SERVER_ERROR.
As you can see from the topic, the segv happens in the DProf library. I have
listed the gdb output at the end of my email.
My question is simply, is this a mod_perl problem, a template toolkit
problem or a problem somewhere in the dprof library?.
If I really need to use Apache::DProf then I'll just avoid requesting
templates that don't exist. I'm still curious however, as to whether there
is a more sinister problem waiting to cause my problems in the future.
Any advice? Has anyone else ever experienced a code path which causes a
similar segv in dprof?

Richard.

(gdb) c
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x4477145b in prof_mark () from
/usr/lib/perl5/5.6.1/i686-linux/auto/Devel/DProf/DProf.so
(gdb) bt
#0  0x4477145b in prof_mark () from
/usr/lib/perl5/5.6.1/i686-linux/auto/Devel/DProf/DProf.so
#1  0x44771b5d in XS_DB_sub () from
/usr/lib/perl5/5.6.1/i686-linux/auto/Devel/DProf/DProf.so
#2  0x444e2732 in Perl_pp_entersub () from /usr/lib/libperl.so
#3  0x444dc7e0 in Perl_runops_standard () from /usr/lib/libperl.so
#4  0x444900cc in S_call_body () from /usr/lib/libperl.so
#5  0x4448c28e in perl_call_sv () from /usr/lib/libperl.so
#6  0x4448fcbe in perl_call_method () from /usr/lib/libperl.so
#7  0x0806fbe1 in perl_call_handler ()
#8  0x0806f472 in perl_run_stacked_handlers ()
#9  0x0806dfc4 in perl_handler ()
#10 0x0808e1b9 in ap_invoke_handler ()
#11 0x080a3f7f in ap_some_auth_required ()
#12 0x080a3fea in ap_process_request ()
#13 0x0809a876 in ap_child_terminate ()
#14 0x0809aa35 in ap_child_terminate ()
#15 0x0809abb6 in ap_child_terminate ()
#16 0x0809b24d in ap_child_terminate ()
#17 0x0809babc in main ()
#18 0x445743bd in __libc_start_main () from /lib/libc.so.6
(gdb)




Re: 0x444ba45b in prof_mark () from/usr/lib/perl5/5.6.1/i686-linux/auto/Devel/DProf/DProf.so

2002-12-07 Thread Ilya Martynov
 On Sat, 7 Dec 2002 19:58:40 -, Richard Clarke [EMAIL PROTECTED] said:

RC List,
RC I seem to have hit a slight stumbling block in my mod_perl development.
RC Without wanting to write a whole essay on the exact combination of events
RC that causes this segv to happen I'll just say for now that it happens after
RC my custom Template::Provider returns a status indicating a template could
RC not be found. My apache error log indicates that the segv happens
RC immediately after my contenthandler returns SERVER_ERROR.
RC As you can see from the topic, the segv happens in the DProf library. I have
RC listed the gdb output at the end of my email.
RC My question is simply, is this a mod_perl problem, a template toolkit
RC problem or a problem somewhere in the dprof library?.

Likely it is Dprof's problem. 

RC If I really need to use Apache::DProf then I'll just avoid requesting
RC templates that don't exist. I'm still curious however, as to whether there
RC is a more sinister problem waiting to cause my problems in the future.
RC Any advice? Has anyone else ever experienced a code path which causes a
RC similar segv in dprof?

Many times. Apache::DProf happily segfaults on any non-trivial
program.

-- 
Ilya Martynov,  [EMAIL PROTECTED]
CTO IPonWEB (UK) Ltd
Quality Perl Programming and Unix Support
UK managed @ offshore prices - http://www.iponweb.net
Personal website - http://martynov.org




[mp2]mason ROCKS under mp2

2002-12-07 Thread Beau E. Cox
Hello folks -

I know this is slightly OT, but over the past week I have
implemented mason under ap2/mp2 on my test server. The mini-HOWTO
below also addresses some problems I had installing mp2.

I have been successful in getting mason up and running under
Apache2 and mod_perl 2. It was relatively easy (as Dave has
said before on the mason list), but it did have some pitfalls.

I have detailed my travail via a mini-HOWTO on my site:

http://beaucox.com/mason/mason-with-apmp2-mini-HOWTO.htm

-or- just got to:

http://beaucox.com/

and navigate from there.

It really, really works! In fact, it ROCKS :)

Aloha = Beau.