Re: solaris 2.6, mod_perl 1.27, apache 1.3.26, resulting server fails

2002-08-09 Thread Lupe Christoph

On Thursday, 2002-08-08 at 15:48:48 -0700, John E. Mendenhall wrote:
 On Thu, 8 Aug 2002, Lupe Christoph wrote:

  Since mod_perl seems to play tricks with bootstrap, I don't really
  know how this comes into play.

 I have done all you have asked.  All output appears similar.  Three files,
 including Log.xs.  Nine entries in httpd for XS_Apache__Log, as follows:

 So, where to from here?  Any ideas?

Well, this proves that Apache::Log *is* linked into the httpd binary.
The questions is why bootstrap is called at all. I'm afraid, I have
to hand this over to people who know the internal logic of mod_perl.
bootstrap *should* not be called, I think.

You could try to reduce your config until the error goes away.
Or start with a minimal startup.pl that only does a use Apache::Log.
I fear the whatever that has a list of the modules linked into
httpd is scrambled by your production config.

Lupe Christoph
-- 
| [EMAIL PROTECTED]   |   http://www.lupe-christoph.de/ |
| I have challenged the entire ISO-9000 quality assurance team to a  |
| Bat-Leth contest on the holodeck. They will not concern us again.  |
| http://public.logica.com/~stepneys/joke/klingon.htm|



Apache::Session HELP!

2002-08-09 Thread Rafiq Ismail (ADMIN)

Hi, I'm in major poop.

Got a presentation soon and my just implemented, implementation of
Apache::Session is not working as per the man page.

I've set commit to 1 and tied a session to a postgres database.  I then
set a field and check the table it's not there.

When I later do a fetch on it, I get a scarey error:

 [error] Object does not exist in the data store at
/usr/lib/perl5/site_perl/5.6.1/Apache/Session/Store/Postgres.pm line 81


Create and fetch methods, with table schema, below:


1)Create:


sub tieSession
{
  my $self = shift;
  my %session;
  my $dsn = DBI:Pg:dbname=.$DBI_DB.;host=.$DBI_HOST;

  print STDERR \n CREATING SESSION using dsn: $dsn \n;

  tie %session, 'Apache::Session::Postgres', undef,
{
 DataSource = $dsn,
 UserName = $DBI_USER,
 Password = $DBI_PWD,
 Commit = 1
};

  ## store creation time
  $session{CREATION_TIME}=time;

  return \%session;
}





2) fetching the session:



sub fetchSession
{
  my $self = shift;
  my $sessionId = shift;
  my $dsn = DBI:Pg:dbname=.$DBI_DB.;host=.$DBI_HOST;
  my %session;

  print STDERR \n getting session for $sessionId\n;

  tie %session, 'Apache::Session::Postgres', $sessionId,
{ DataSource = $dsn,
  UserName = $DBI_USER,
  Password = $DBI_PWD,
  Commit = 1
};

  ## store last access
  $session{LAST_ACCESS} = time;

  $ENV{GUEST_ID} = $session{GUEST_ID} || undef;
  return \%session;
}



3) Table Schemata



CREATE TABLE sessions (
   id char(32) not null primary key,
   a_session text
);




help?

Cheers,

fiq





Re: Apache::Session HELP!

2002-08-09 Thread Fran Fabrizio


What does your config file look like?  All pointing at the right tables 
and fields and such?

-Fran

Rafiq Ismail (ADMIN) wrote:

Hi, I'm in major poop.

Got a presentation soon and my just implemented, implementation of
Apache::Session is not working as per the man page.

I've set commit to 1 and tied a session to a postgres database.  I then
set a field and check the table it's not there.

When I later do a fetch on it, I get a scarey error:

 [error] Object does not exist in the data store at
/usr/lib/perl5/site_perl/5.6.1/Apache/Session/Store/Postgres.pm line 81


Create and fetch methods, with table schema, below:


1)Create:


sub tieSession
{
  my $self = shift;
  my %session;
  my $dsn = DBI:Pg:dbname=.$DBI_DB.;host=.$DBI_HOST;

  print STDERR \n CREATING SESSION using dsn: $dsn \n;

  tie %session, 'Apache::Session::Postgres', undef,
{
DataSource = $dsn,
UserName = $DBI_USER,
Password = $DBI_PWD,
Commit = 1
   };

  ## store creation time
  $session{CREATION_TIME}=time;

  return \%session;
}





2) fetching the session:



sub fetchSession
{
  my $self = shift;
  my $sessionId = shift;
  my $dsn = DBI:Pg:dbname=.$DBI_DB.;host=.$DBI_HOST;
  my %session;

  print STDERR \n getting session for $sessionId\n;

  tie %session, 'Apache::Session::Postgres', $sessionId,
{ DataSource = $dsn,
  UserName = $DBI_USER,
  Password = $DBI_PWD,
  Commit = 1
};

  ## store last access
  $session{LAST_ACCESS} = time;

  $ENV{GUEST_ID} = $session{GUEST_ID} || undef;
  return \%session;
}



3) Table Schemata



CREATE TABLE sessions (
   id char(32) not null primary key,
   a_session text
);




help?

Cheers,

fiq

  







Re: Apache::Session HELP!

2002-08-09 Thread Fran Fabrizio


Wait, ignore that - I was getting my Apache::Session and my 
Apache::AuthCookie signals crossed.  Sorry.

-Fran


Fran Fabrizio wrote:


 What does your config file look like?  All pointing at the right 
 tables and fields and such?

 -Fran

 Rafiq Ismail (ADMIN) wrote:

 Hi, I'm in major poop.

 Got a presentation soon and my just implemented, implementation of
 Apache::Session is not working as per the man page.

 I've set commit to 1 and tied a session to a postgres database.  I then
 set a field and check the table it's not there.

 When I later do a fetch on it, I get a scarey error:

 [error] Object does not exist in the data store at
 /usr/lib/perl5/site_perl/5.6.1/Apache/Session/Store/Postgres.pm line 81


 Create and fetch methods, with table schema, below:


 1)Create:
 

 sub tieSession
 {
  my $self = shift;
  my %session;
  my $dsn = DBI:Pg:dbname=.$DBI_DB.;host=.$DBI_HOST;

  print STDERR \n CREATING SESSION using dsn: $dsn \n;

  tie %session, 'Apache::Session::Postgres', undef,
{
  DataSource = $dsn,
  UserName = $DBI_USER,
  Password = $DBI_PWD,
  Commit = 1
 };

  ## store creation time
  $session{CREATION_TIME}=time;

  return \%session;
 }

 



 2) fetching the session:

 

 sub fetchSession
 {
  my $self = shift;
  my $sessionId = shift;
  my $dsn = DBI:Pg:dbname=.$DBI_DB.;host=.$DBI_HOST;
  my %session;

  print STDERR \n getting session for $sessionId\n;

  tie %session, 'Apache::Session::Postgres', $sessionId,
{ DataSource = $dsn,
  UserName = $DBI_USER,
  Password = $DBI_PWD,
  Commit = 1
};

  ## store last access
  $session{LAST_ACCESS} = time;

  $ENV{GUEST_ID} = $session{GUEST_ID} || undef;
  return \%session;
 }

 

 3) Table Schemata

 

CREATE TABLE sessions (
   id char(32) not null primary key,
   a_session text
);

 


 help?

 Cheers,

 fiq

  









Re: Apache::Session HELP!

2002-08-09 Thread JPifer


  Your provided code looks accurate.  Given that you get no errors
trying to place the session ID in the first place, it implies that the
$sessionID you are passing in your fetchSession routine is either not being
passed, being passed incorrectly or the object does not, in fact, live in
the database.
  You should check what you are passing into the routine and then see
if the key for the session is in your table.

  --jayson



   
   
  Rafiq Ismail
   
  (ADMIN) To:  mod_perl list 
[EMAIL PROTECTED]
  [EMAIL PROTECTED] cc: 
   
  hought.com  Subject: Apache::Session HELP!  
   
  Sent by: Rafiq   
   
  Ismail (ADMIN)   
   
  rafiq@Dreamthought. 
   
  com 
   
   
   
   
   
  08/09/02 06:01:23 AM 
   
   
   
   
   




Hi, I'm in major poop.

Got a presentation soon and my just implemented, implementation of
Apache::Session is not working as per the man page.

I've set commit to 1 and tied a session to a postgres database.  I then
set a field and check the table it's not there.

When I later do a fetch on it, I get a scarey error:

 [error] Object does not exist in the data store at
/usr/lib/perl5/site_perl/5.6.1/Apache/Session/Store/Postgres.pm line 81


Create and fetch methods, with table schema, below:


1)Create:


sub tieSession
{
  my $self = shift;
  my %session;
  my $dsn = DBI:Pg:dbname=.$DBI_DB.;host=.$DBI_HOST;

  print STDERR \n CREATING SESSION using dsn: $dsn \n;

  tie %session, 'Apache::Session::Postgres', undef,
{
  DataSource = $dsn,
  UserName = $DBI_USER,
  Password = $DBI_PWD,
  Commit = 1
 };

  ## store creation time
  $session{CREATION_TIME}=time;

  return \%session;
}





2) fetching the session:



sub fetchSession
{
  my $self = shift;
  my $sessionId = shift;
  my $dsn = DBI:Pg:dbname=.$DBI_DB.;host=.$DBI_HOST;
  my %session;

  print STDERR \n getting session for $sessionId\n;

  tie %session, 'Apache::Session::Postgres', $sessionId,
{ DataSource = $dsn,
  UserName = $DBI_USER,
  Password = $DBI_PWD,
  Commit = 1
};

  ## store last access
  $session{LAST_ACCESS} = time;

  $ENV{GUEST_ID} = $session{GUEST_ID} || undef;
  return \%session;
}



3) Table Schemata



CREATE TABLE sessions (
   id char(32) not null primary key,
   a_session text
);




help?

Cheers,

fiq








--
Jefferies archives and reviews outgoing and incoming e-mail.  Such may be 
produced at the request of regulators. Sender accepts no liability for 
any errors or omissions arising as a result of  transmission. Use by other than 
intended recipients is prohibited. This is neither an offer nor a 
solicitation of an offer to buy or sell securities. Opinions or estimates 
constitute our best judgment at this time and are subject to change without 
notice. Information upon which this material is based was obtained from 
sources believed to be reliable but has not been verified. Additional 
information is available upon request. Jefferies its affiliates and 
respective directors officers and employees may buy or sell 
securities mentioned as agent or principal. This is for use by 
professional or institutional investors only. No investments or 
services mentioned or described are available to private 
customers as defined by the SFA or to anyone in Canada not a Designated 
Institution. 



Is it possible to change the browser's address/location URL without Redirect?

2002-08-09 Thread Harry Zhu

Looks like my explanation is too long or too bad.
The simple idea is in page step 1, after the

form action=/step/2 method=post.../form

submitted, I want the browser show something
http://www.example.com/step/1/error, instead of
http://www.example.com/step/2,
if there is a need for user to correct the data submitted.

It might be accomplished by using one of the approaches outlined below, but
I was wondering if there's other way that can save the overhead of the
write/read or resend the data, and the re-process. Probably not much we can
do if the URL displayed in the browser's address/location bar depends only
on the action value of the form submitted, not based on the server response?

Harry



- Original Message -
From: Harry Zhu [EMAIL PROTECTED]
To: mod_perl list [EMAIL PROTECTED]
Sent: Thursday, August 08, 2002 4:22 PM
Subject: Can I change the browser's address/location?


 Suppose I have a generic content handler to handle requst
 /step/1, /step/2, ..., /step/n

 Location /step
   SetHandler perl-script
   PerlHandler MyHandler

 /Location

 #MyHandler.pm
 package MyHandler;
 sub handler {
   my $r=shift;
   my $step = substr($r-path_info(),1);

   #do something before fetch the content

   #fetch content: usually include a form that will assign action
 /step/($step+1)

 }

 So if everything goes well, the user will follow through from step 1, step
 2, until fnish.
 Now if in the #do something ... part, something is wrong, it will
usually
 require user go back to the same step, for example, to fill the form
again.
 The way my old cgi script does is just generate the form with prefilled
 value plus some error message indicate what's wrong. It works ok but the
 browser location will show /step/($step+1) while it actually is
/step/$step.
 Now that I am working it on mod-perl I thought I should be able to do
 something about it. I briefly browsed the 2 mod-perl books (eagle,
 cookbook), and could not found a simple solution yet  (or I missed it?). I
 was think using one of the folowing might work:z
 1) save the request data in a temp file and redirect or http-refresh to
 /step/$step?$session_id or /step/$step/error?$session_id
 Remember the content is dynamic and depend on the input form data, so
simple
 redirect may not work.
 Looks like Apache will not post the form data when redirect with Location?

 2) print a short form with hidden data and assign action=/step/$step/error
 then submit right away (onload=form.submit()?)

 Does anybody have a simple solution, e.g. without redirect? Is it possible
 to change the URI showing in the browser's address/location bar?

 I would appreciated if somebody can pointer me to the right direction.

 Harry







RE: Is it possible to change the browser's address/location URL without Redirect?

2002-08-09 Thread French, Shawn

One option:

If there's an erro in form 2,
Save the user's form data in some session variables
Then use a META HTTP-EQUIV=Refresh CONTENT=0; URL=/step2 tag to get the
user's browser to redirect.
Then populate the form with the data and error message you saved in his/her
session object.

There are obviously many other ways to do this... but if you're using some
sort of session data structure, this is probably the easiest way to get it
done.

Shawn



 -Original Message-
 From: Harry Zhu [mailto:[EMAIL PROTECTED]]
 Sent: August 9, 2002 2:26 PM
 To: [EMAIL PROTECTED]
 Subject: Is it possible to change the browser's address/location URL
 without Redirect?
 
 
 Looks like my explanation is too long or too bad.
 The simple idea is in page step 1, after the
 
 form action=/step/2 method=post.../form
 
 submitted, I want the browser show something
 http://www.example.com/step/1/error, instead of
 http://www.example.com/step/2,
 if there is a need for user to correct the data submitted.
 
 It might be accomplished by using one of the approaches 
 outlined below, but
 I was wondering if there's other way that can save the overhead of the
 write/read or resend the data, and the re-process. Probably 
 not much we can
 do if the URL displayed in the browser's address/location bar 
 depends only
 on the action value of the form submitted, not based on the 
 server response?
 
 Harry
 
 
 
 - Original Message -
 From: Harry Zhu [EMAIL PROTECTED]
 To: mod_perl list [EMAIL PROTECTED]
 Sent: Thursday, August 08, 2002 4:22 PM
 Subject: Can I change the browser's address/location?
 
 
  Suppose I have a generic content handler to handle requst
  /step/1, /step/2, ..., /step/n
 
  Location /step
SetHandler perl-script
PerlHandler MyHandler
 
  /Location
 
  #MyHandler.pm
  package MyHandler;
  sub handler {
my $r=shift;
my $step = substr($r-path_info(),1);
 
#do something before fetch the content
 
#fetch content: usually include a form that will assign action
  /step/($step+1)
 
  }
 
  So if everything goes well, the user will follow through 
 from step 1, step
  2, until fnish.
  Now if in the #do something ... part, something is wrong, it will
 usually
  require user go back to the same step, for example, to fill the form
 again.
  The way my old cgi script does is just generate the form 
 with prefilled
  value plus some error message indicate what's wrong. It 
 works ok but the
  browser location will show /step/($step+1) while it actually is
 /step/$step.
  Now that I am working it on mod-perl I thought I should be 
 able to do
  something about it. I briefly browsed the 2 mod-perl books (eagle,
  cookbook), and could not found a simple solution yet  (or I 
 missed it?). I
  was think using one of the folowing might work:z
  1) save the request data in a temp file and redirect or 
 http-refresh to
  /step/$step?$session_id or /step/$step/error?$session_id
  Remember the content is dynamic and depend on the input 
 form data, so
 simple
  redirect may not work.
  Looks like Apache will not post the form data when redirect 
 with Location?
 
  2) print a short form with hidden data and assign 
 action=/step/$step/error
  then submit right away (onload=form.submit()?)
 
  Does anybody have a simple solution, e.g. without redirect? 
 Is it possible
  to change the URI showing in the browser's address/location bar?
 
  I would appreciated if somebody can pointer me to the right 
 direction.
 
  Harry
 
 
 
 



mod_perl install on SGI

2002-08-09 Thread Tom Keller

Greetings,
I am trying to install mod_perl with apache_1.2.26 on and SGI running 
6.5.16.

apache was installed from the freeware.sgi.com website using their very 
nice installer. Unfortunately, the clean up after installation seems to 
remove the Makefile that is used by mod_perl's Makefile.

So running install mod_perl from cpan, I get the question Please tell 
me wher I can find your apache src
[ ../apache_x.x/src]
I can't seem to give it a path that works.

I know the executable is at /usr/freeware/apache, but that gives the 
message can't open /Makefile No such file.

I've also tried using /var/inst/fw_apache which is the downloaded source 
file. No dice.

Any suggestion would be appreciated.

Thanks,
Tom Keller

Thomas J. Keller, Ph.D.
Oregon Health  Science University
MMI Research Core Facility
3181 SW Sam Jackson Park Rd.
Portland, OR, USA, 97239

http://www.ohsu.edu/core




Re: Is it possible to change the browser's address/location URL without Redirect?

2002-08-09 Thread Harry Zhu

That what's the approach outlined in 1). I was wondering if that network
trip can be avoided.

Thanks,
Harry

- Original Message -
From: French, Shawn [EMAIL PROTECTED]
To: 'Harry Zhu' [EMAIL PROTECTED]; 
Sent: Friday, August 09, 2002 11:49 AM
Subject: RE: Is it possible to change the browser's address/location URL
without Redirect?


 One option:

 If there's an erro in form 2,
 Save the user's form data in some session variables
 Then use a META HTTP-EQUIV=Refresh CONTENT=0; URL=/step2 tag to get
the
 user's browser to redirect.
 Then populate the form with the data and error message you saved in
his/her
 session object.

 There are obviously many other ways to do this... but if you're using some
 sort of session data structure, this is probably the easiest way to get it
 done.

 Shawn



  -Original Message-
  From: Harry Zhu [mailto:[EMAIL PROTECTED]]
  Sent: August 9, 2002 2:26 PM
  To: [EMAIL PROTECTED]
  Subject: Is it possible to change the browser's address/location URL
  without Redirect?
 
 
  Looks like my explanation is too long or too bad.
  The simple idea is in page step 1, after the
 
  form action=/step/2 method=post.../form
 
  submitted, I want the browser show something
  http://www.example.com/step/1/error, instead of
  http://www.example.com/step/2,
  if there is a need for user to correct the data submitted.
 
  It might be accomplished by using one of the approaches
  outlined below, but
  I was wondering if there's other way that can save the overhead of the
  write/read or resend the data, and the re-process. Probably
  not much we can
  do if the URL displayed in the browser's address/location bar
  depends only
  on the action value of the form submitted, not based on the
  server response?
 
  Harry
 
 
 
  - Original Message -
  From: Harry Zhu [EMAIL PROTECTED]
  To: mod_perl list [EMAIL PROTECTED]
  Sent: Thursday, August 08, 2002 4:22 PM
  Subject: Can I change the browser's address/location?
 
 
   Suppose I have a generic content handler to handle requst
   /step/1, /step/2, ..., /step/n
  
   Location /step
 SetHandler perl-script
 PerlHandler MyHandler
  
   /Location
  
   #MyHandler.pm
   package MyHandler;
   sub handler {
 my $r=shift;
 my $step = substr($r-path_info(),1);
  
 #do something before fetch the content
  
 #fetch content: usually include a form that will assign action
   /step/($step+1)
  
   }
  
   So if everything goes well, the user will follow through
  from step 1, step
   2, until fnish.
   Now if in the #do something ... part, something is wrong, it will
  usually
   require user go back to the same step, for example, to fill the form
  again.
   The way my old cgi script does is just generate the form
  with prefilled
   value plus some error message indicate what's wrong. It
  works ok but the
   browser location will show /step/($step+1) while it actually is
  /step/$step.
   Now that I am working it on mod-perl I thought I should be
  able to do
   something about it. I briefly browsed the 2 mod-perl books (eagle,
   cookbook), and could not found a simple solution yet  (or I
  missed it?). I
   was think using one of the folowing might work:z
   1) save the request data in a temp file and redirect or
  http-refresh to
   /step/$step?$session_id or /step/$step/error?$session_id
   Remember the content is dynamic and depend on the input
  form data, so
  simple
   redirect may not work.
   Looks like Apache will not post the form data when redirect
  with Location?
  
   2) print a short form with hidden data and assign
  action=/step/$step/error
   then submit right away (onload=form.submit()?)
  
   Does anybody have a simple solution, e.g. without redirect?
  Is it possible
   to change the URI showing in the browser's address/location bar?
  
   I would appreciated if somebody can pointer me to the right
  direction.
  
   Harry
  
  
 
 






Re: Is it possible to change the browser's address/location URL without Redirect?

2002-08-09 Thread Andrew Ho

Hello,

HZI was wondering if that network trip can be avoided.

The answer is no.

You might be able to use JavaScript to do it on certain browsers, but I'm
reasonably sure you can't do it on recent IE and Netscape browsers.

Why do you want to do this? You could use base href/ or similar if your
goal is just to make links are relative to a certain root.

Humbly,

Andrew

--
Andrew Ho   http://www.tellme.com/   [EMAIL PROTECTED]
Engineer   [EMAIL PROTECTED]  Voice 650-930-9062
Tellme Networks, Inc.   1-800-555-TELLFax 650-930-9101
--




Re: Is it possible to change the browser's address/location URL without Redirect?

2002-08-09 Thread Harry Zhu

The question is not about how to make links relative to root. The purpose is
to show correctly the user what the step he is at in the process. If no
mistake, he would be taken to step 2, but since the data has error and he
needs correct it, so I would like the browser indicating he is still in the
step 1. Although it's not that important an issue.

Did you mean javascript can change the URL text displayed in the (some
version of) browser's address/location bar? I know it is used to display
text in status. Noemally the use of Javascript to validate the data can
almost eliminate the needing of such network trip, but not always.

Thanks,
Harry

- Original Message -
From: Andrew Ho [EMAIL PROTECTED]
To: Harry Zhu [EMAIL PROTECTED]
Cc: mod_perl List 
Sent: Friday, August 09, 2002 4:40 PM
Subject: Re: Is it possible to change the browser's address/location URL
without Redirect?


 Hello,

 HZI was wondering if that network trip can be avoided.

 The answer is no.

 You might be able to use JavaScript to do it on certain browsers, but I'm
 reasonably sure you can't do it on recent IE and Netscape browsers.

 Why do you want to do this? You could use base href/ or similar if your
 goal is just to make links are relative to a certain root.

 Humbly,

 Andrew

 --
 Andrew Ho   http://www.tellme.com/   [EMAIL PROTECTED]
 Engineer   [EMAIL PROTECTED]  Voice 650-930-9062
 Tellme Networks, Inc.   1-800-555-TELLFax 650-930-9101
 --






Re: Is it possible to change the browser's address/location URL without Redirect?

2002-08-09 Thread Peter Bi

It is the browser that controls the URL in the Address bar. So one has to
make another call to get the URL refreshed. If you are worry about the
speed, you may

1) return an error code in case of error
2) in Apache's httpd.conf, config that specific error to display
/step/1/error

A simply redirection does the same job.

Peter

- Original Message -
From: Harry Zhu [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, August 09, 2002 11:26 AM
Subject: Is it possible to change the browser's address/location URL without
Redirect?


 Looks like my explanation is too long or too bad.
 The simple idea is in page step 1, after the

 form action=/step/2 method=post.../form

 submitted, I want the browser show something
 http://www.example.com/step/1/error, instead of
 http://www.example.com/step/2,
 if there is a need for user to correct the data submitted.

 It might be accomplished by using one of the approaches outlined below,
but
 I was wondering if there's other way that can save the overhead of the
 write/read or resend the data, and the re-process. Probably not much we
can
 do if the URL displayed in the browser's address/location bar depends only
 on the action value of the form submitted, not based on the server
response?

 Harry



 - Original Message -
 From: Harry Zhu [EMAIL PROTECTED]
 To: mod_perl list [EMAIL PROTECTED]
 Sent: Thursday, August 08, 2002 4:22 PM
 Subject: Can I change the browser's address/location?


  Suppose I have a generic content handler to handle requst
  /step/1, /step/2, ..., /step/n
 
  Location /step
SetHandler perl-script
PerlHandler MyHandler
 
  /Location
 
  #MyHandler.pm
  package MyHandler;
  sub handler {
my $r=shift;
my $step = substr($r-path_info(),1);
 
#do something before fetch the content
 
#fetch content: usually include a form that will assign action
  /step/($step+1)
 
  }
 
  So if everything goes well, the user will follow through from step 1,
step
  2, until fnish.
  Now if in the #do something ... part, something is wrong, it will
 usually
  require user go back to the same step, for example, to fill the form
 again.
  The way my old cgi script does is just generate the form with prefilled
  value plus some error message indicate what's wrong. It works ok but the
  browser location will show /step/($step+1) while it actually is
 /step/$step.
  Now that I am working it on mod-perl I thought I should be able to do
  something about it. I briefly browsed the 2 mod-perl books (eagle,
  cookbook), and could not found a simple solution yet  (or I missed it?).
I
  was think using one of the folowing might work:z
  1) save the request data in a temp file and redirect or http-refresh to
  /step/$step?$session_id or /step/$step/error?$session_id
  Remember the content is dynamic and depend on the input form data, so
 simple
  redirect may not work.
  Looks like Apache will not post the form data when redirect with
Location?
 
  2) print a short form with hidden data and assign
action=/step/$step/error
  then submit right away (onload=form.submit()?)
 
  Does anybody have a simple solution, e.g. without redirect? Is it
possible
  to change the URI showing in the browser's address/location bar?
 
  I would appreciated if somebody can pointer me to the right direction.
 
  Harry
 
 






Re: Some consideration about my Apache::SessionManager RFC

2002-08-09 Thread Enrico Sorcinelli


 I'd mail the authors at their last known addresses saying that you
 propose steal^H^H^H^H take over the namespace.  If you get no reply in
 a couple of weeks I'd guess you're safe enough to use it.


Today I've mailed to the author.
Also I've asked an advice to [EMAIL PROTECTED]

 I like your module and I like the name.  I'll give it a try when I get
 a chance.  (But don't hold your breath:).  Would you like some help
 with the documentation?


Thanks.
The module is work in progress. The perldoc I've written is also
temporary. The same directives can change from day to another :-)
Any help, comment or criticism are welcome!

- Enrico

PS: currently I've added user inactivity session expiration policy and I'm
working to use Apache::Session::Flex in order to customize session data
storage






Re: Is it possible to change the browser's address/location URL without Redirect?

2002-08-09 Thread Harry Zhu

Simple redirection does not do the same job, because the /step/1/error
page is not a simple error page - I would like it to reload the same form in
step 1 with the values filled and some message indicating what's to be
correct.

Looks like the network trip (redirect/refresh) can not be avoid. Then the
session mechanism maybe better for the speed since it sends less data.

Harry


- Original Message -
From: Peter Bi [EMAIL PROTECTED]
To: Harry Zhu [EMAIL PROTECTED]; 
Sent: Friday, August 09, 2002 5:18 PM
Subject: Re: Is it possible to change the browser's address/location URL
without Redirect?


 It is the browser that controls the URL in the Address bar. So one has
to
 make another call to get the URL refreshed. If you are worry about the
 speed, you may

 1) return an error code in case of error
 2) in Apache's httpd.conf, config that specific error to display
 /step/1/error

 A simply redirection does the same job.

 Peter

 - Original Message -
 From: Harry Zhu [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, August 09, 2002 11:26 AM
 Subject: Is it possible to change the browser's address/location URL
without
 Redirect?


  Looks like my explanation is too long or too bad.
  The simple idea is in page step 1, after the
 
  form action=/step/2 method=post.../form
 
  submitted, I want the browser show something
  http://www.example.com/step/1/error, instead of
  http://www.example.com/step/2,
  if there is a need for user to correct the data submitted.
 
  It might be accomplished by using one of the approaches outlined below,
 but
  I was wondering if there's other way that can save the overhead of the
  write/read or resend the data, and the re-process. Probably not much we
 can
  do if the URL displayed in the browser's address/location bar depends
only
  on the action value of the form submitted, not based on the server
 response?
 
  Harry
 
 
 
  - Original Message -
  From: Harry Zhu [EMAIL PROTECTED]
  To: mod_perl list [EMAIL PROTECTED]
  Sent: Thursday, August 08, 2002 4:22 PM
  Subject: Can I change the browser's address/location?
 
 
   Suppose I have a generic content handler to handle requst
   /step/1, /step/2, ..., /step/n
  
   Location /step
 SetHandler perl-script
 PerlHandler MyHandler
  
   /Location
  
   #MyHandler.pm
   package MyHandler;
   sub handler {
 my $r=shift;
 my $step = substr($r-path_info(),1);
  
 #do something before fetch the content
  
 #fetch content: usually include a form that will assign action
   /step/($step+1)
  
   }
  
   So if everything goes well, the user will follow through from step 1,
 step
   2, until fnish.
   Now if in the #do something ... part, something is wrong, it will
  usually
   require user go back to the same step, for example, to fill the form
  again.
   The way my old cgi script does is just generate the form with
prefilled
   value plus some error message indicate what's wrong. It works ok but
the
   browser location will show /step/($step+1) while it actually is
  /step/$step.
   Now that I am working it on mod-perl I thought I should be able to do
   something about it. I briefly browsed the 2 mod-perl books (eagle,
   cookbook), and could not found a simple solution yet  (or I missed
it?).
 I
   was think using one of the folowing might work:z
   1) save the request data in a temp file and redirect or http-refresh
to
   /step/$step?$session_id or /step/$step/error?$session_id
   Remember the content is dynamic and depend on the input form data, so
  simple
   redirect may not work.
   Looks like Apache will not post the form data when redirect with
 Location?
  
   2) print a short form with hidden data and assign
 action=/step/$step/error
   then submit right away (onload=form.submit()?)
  
   Does anybody have a simple solution, e.g. without redirect? Is it
 possible
   to change the URI showing in the browser's address/location bar?
  
   I would appreciated if somebody can pointer me to the right direction.
  
   Harry