Deleting a cookie

2001-11-27 Thread Jon Robison

I have created a login system using the wonderful Ticket system from the
Eagle book.  I have modified TicketAccess so that after authentication,
it reviews the arguments in the query string and does push_handler, the
handler being chosen based on the args.

My only problem is that I want to provide the users with a logout button
which will delete the cookie from thier browser, yet I cannot find how!.
I have reviewed every module on my system with 'Cookie' in the name
(Apache::Cookie, CGI::Cookie, etc.) and nowhere does it tell how to do
this. There is a small mention of changing the expiration to  0, but
apparently I am doing it wrong (possible confusing point is the use of
an 'expires' value in the cookie itself, seperate, I think, from the
'expires' attribute on the cookie?)

I know it is a lot to ask, but I am relatively new to this part of
mod_perl (pushing handlers, etc.), so if anyone can look at this and
replace my BLOCKED comments with a couple of helpfull lines, I would
greatly appreciate it! 

Thanks in advance - 

Jonathon Robison


Below is my modified TicketAccess, as well as the Logout module I am
re-directing to for logout action:
=
package FES::Apache::TicketAccess;

use strict;
use Apache::Constants qw(:common);
use FES::Apache::TicketTool ();

sub handler {
my $r = shift;
my %input = $r-args;  
 # for checking input items
my $ticketTool = FES::Apache::TicketTool-new($r);
my($result, $msg) = $ticketTool-verify_ticket($r);
unless ($result) {
$r-log_reason($msg, $r-filename);
my $cookie = $ticketTool-make_return_address($r);
$r-err_headers_out-add('Set-Cookie' = $cookie);
return FORBIDDEN;
}
## Here is where we need to insert a push_handler insert. I won't need
## the requested uri from the $r, since the $r goes along for the ride
in## push_handler

my $action = defined $input{'act'} ? $input{'act'} : 'view';

print STDERR action is defined as $action\n;  ## DEBUGGING

if ($action eq 'logout')  {
$r-push_handlers('PerlHandler' = 'FES::Control::Logout');
return OK;
} elsif ($action eq 'view') {
$r-push_handlers('PerlHandler' = 'FES::Control::View');
return OK;
}   else {
$r-push_handlers('PerlHandler' = 'FES::Control::View');
return OK;
}
   ## ARE THOSE THE CORRECT THINGS TO 'RETURN' FOR THESE CASES?
 
}

1;
==

And the Logout.pm:

=
package FES::Control::Logout;

use strict;
use Apache;
use Apache::Constants qw(:common);
use FES::Common::Common qw( header footer);
use CGI qw/:standard/;
use CGI::Cookie;

sub handler {
my $r = shift;
my $q = new CGI;
my $ticket = _get_ticket('r' = $r);

## HERE IS WHERE I NEED TO 1.) DELETE USER'S TICKET COOKIE AND
## 2.) REDIRECT THEM TO /FES (w/o bringing old
$r),(WHERE THEY SHOULD GET
## A NEW LOGIN SCREEN BECAUSE COOKIE IS
GONE.)

}

sub _get_ticket {
my $args = {
'r' = undef,
@_
};
my $r = $args-{'r'};
my %cookies = CGI::Cookie-parse($r-header_in('Cookie'));
# TESTING
my %ticket = $cookies{'Ticket'}-value;  # TESTING
return \%ticket;
}

1;
=



Re: Deleting a cookie

2001-11-27 Thread Mohit Agarwal

On Tue, 27 Nov 2001, Jon Robison wrote:

 My only problem is that I want to provide the users with a logout
 button which will delete the cookie from thier browser, yet I cannot
 find how!.  I have reviewed every module on my system with 'Cookie'
 in the name (Apache::Cookie, CGI::Cookie, etc.) and nowhere does it
 tell how to do this. There is a small mention of changing the
 expiration to  0, but apparently I am doing it wrong (possible
 confusing point is the use of an 'expires' value in the cookie
 itself, seperate, I think, from the 'expires' attribute on the
 cookie?)

Never tried the negative value for expiration time, but setting it to
a very small value, say 1s, works.  I'm not sure, but setting the
cookie value to null should also have the same effect.




RE: Apache::Registry HTTP HEAD feature fix ;-)

2001-11-27 Thread Geoffrey Young



 -Original Message-
 From: Jean-Michel Hiver [mailto:[EMAIL PROTECTED]]
 Sent: Monday, November 26, 2001 9:38 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Apache::Registry HTTP HEAD feature fix ;-)
 
 
  well, I just gave you a patch that worked :)  basically, it 
 only provides a
  solution for mod_cgi compatible scripts, but if you're 
 using the mod_perl
  API then it is up to you to check $r-header_only and take 
 appropriate
  action...
 
 True, however your patch also means that it's necessary to recompile
 stuff, which is not always possible. In addition (and as an exercise)
 I'd be happy to find a clean Perl way to do it.
 

this should work for scripts that only use print() (without the patch I sent
yesterday :)

--Geoff

package My::HEADRegistry;

use Apache::Constants qw(DONE);
use Apache::RegistryNG;
use strict;

@My::HEADRegistry::ISA = qw(Apache::RegistryNG);

sub new {

  my ($class, $r) = @_;

  $r ||= Apache-request;

  tie *STDOUT, $class, $r;

  return tied *STDOUT;
}

sub PRINT {

  my ($self, @data) = @_;

  my $r = $self-{r};

  # we're emulating mod_cgi, where there is no auto-dereferencing...
  my $data = join '', @data;

  my $dlm = \015?\012; # a bit borrowed from LWP::UserAgent
  my ($key, $value);
  local $_;

  unless ($r-sent_header) {
# if we have already sent the headers, no reason to scan the output

while(($_, $data) = split /$dlm/, $data, 2) {
  # scan the incoming data for headers

  if ($_  /^(\S+?):\s*(.*)$/) {
# if the data looks like a header, add it to the header table

($key, $value) = ($1, $2);

last unless $key;

$r-cgi_header_out($key, $value);
  }
}
  }

  # send the headers unless we've already sent them
  $r-send_http_header  $r-sent_header(DONE)
unless $r-sent_header;

  # if this is a HEAD request, we're done
  return if $r-header_only;

  # otherwise, send whatever data we have left to the client
  $r-write_client($data);
}

sub TIEHANDLE {

  my ($class, $r) = @_;

  return bless { r = $r }, $class;
}
1;



Re: Apache::Registry HTTP HEAD feature fix ;-)

2001-11-27 Thread Jean-Michel Hiver

 this should work for scripts that only use print() (without the patch I sent
 yesterday :)

Looks neat! I'll make sure I'll take a close look at that :-)
Cheers,
-- 
== \__ =
   /\/\  IT'S TIME FOR A DIFFERENT KIND OF WEB 
  / /\__/\ \
_/_/_/\/\_\_  Jean-Michel Hiver - Software Director
 \ \ \/*/ /   [EMAIL PROTECTED]+44 (0)114 221 4968
  \ \/__\/   
   \/\   VISIT HTTP://WWW.MKDOC.COM 
== / ===



RE: Apache::Registry HTTP HEAD feature fix ;-)

2001-11-27 Thread Geoffrey Young



 -Original Message-
 From: Jean-Michel Hiver [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, November 27, 2001 9:02 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Apache::Registry HTTP HEAD feature fix ;-)
 
 
  this should work for scripts that only use print() (without 
 the patch I sent
  yesterday :)
 
 Looks neat! I'll make sure I'll take a close look at that :-)
 Cheers,

BTW, I think I figured out why your redirect to /dev/null was working...
CGI.pm can tell if it is running under mod_perl and sets its header()
routine to add the headers to the outgoing header table using mod_perl
methods.  thus, the headers go directly to the client while the content
stays put.  however, if you don't use CGI.pm your old solution doesn't
work...

anyway, I haven't stressed the solution I just posted too much, but I did
test both CGI.pm and non-CGI.pm cases with multiple print statements and it
seems to work ok... time will tell :)

HTH

--Geoff



Re: Deleting a cookie

2001-11-27 Thread Mithun Bhattacharya

Mohit Agarwal wrote:
 


 Never tried the negative value for expiration time, but setting it to
 a very small value, say 1s, works.  I'm not sure, but setting the
 cookie value to null should also have the same effect.


I believe setting the expiry date less than the current time should
work.



Mithun



location directive

2001-11-27 Thread [EMAIL PROTECTED]

Hi

I have put mod_perl handler inside a virtual host section

then inside the virtualhost section, i also put location
directives to override overall modperl handler in some
situations, with sethandler default-handler.

for instance

Alias /icons/ d:/Apache/icons/
location /icons/
SetHandler default-handler
/location


this works ok as soon as the uri is /icons/file

but modperl handler intercept if the uri is just
/icons/ which should otherwise show the directory index of the
location.


isn't it a sort of bug ?

everything works ok if i put modperl handler inside a
location, inside the virtual host but this is precisely what i
don't want to do.
















Ce message vous est envoyé par laposte.net - web : www.laposte.net/  minitel : 3615 
LAPOSTENET (0,84 F TTC la minute)/ téléphone : 08 92 68 13 50 (2,21 F TTC la minute)





Re: Deleting a cookie

2001-11-27 Thread Nick Tonkin


Expiring the cookie works well for me. Here's what I have:

sub handler {

[ ... ]

if ($r-uri =~ /logout/) {
if (my $cookie = destroy_cookie($r)) {
return logout_screen($r);
} else {
return 500;
}
}

[ ... ]

}

sub destroy_cookie {
my $r = shift;

# you may or may not be using this
my $auth_domain = $r-dir_config('Auth_Domain');
 
my $cookie =  Apache::Cookie-new(
$r,
expires = -24h,
domain  = $auth_domain,
name= 'auth', # whatever you've called it
path= '/',
value   = ''
);
   
$cookie-bake;
return $cookie;
}

sub logout_screen {

[ ... ]

}

1;


~~~
Nick Tonkin

On Tue, 27 Nov 2001, Jon Robison wrote:

 I have created a login system using the wonderful Ticket system from the
 Eagle book.  I have modified TicketAccess so that after authentication,
 it reviews the arguments in the query string and does push_handler, the
 handler being chosen based on the args.
 
 My only problem is that I want to provide the users with a logout button
 which will delete the cookie from thier browser, yet I cannot find how!.
 I have reviewed every module on my system with 'Cookie' in the name
 (Apache::Cookie, CGI::Cookie, etc.) and nowhere does it tell how to do
 this. There is a small mention of changing the expiration to  0, but
 apparently I am doing it wrong (possible confusing point is the use of
 an 'expires' value in the cookie itself, seperate, I think, from the
 'expires' attribute on the cookie?)
 
 I know it is a lot to ask, but I am relatively new to this part of
 mod_perl (pushing handlers, etc.), so if anyone can look at this and
 replace my BLOCKED comments with a couple of helpfull lines, I would
 greatly appreciate it! 
 
 Thanks in advance - 
 
 Jonathon Robison
 
 
 Below is my modified TicketAccess, as well as the Logout module I am
 re-directing to for logout action:
 =
 package FES::Apache::TicketAccess;
 
 use strict;
 use Apache::Constants qw(:common);
 use FES::Apache::TicketTool ();
 
 sub handler {
 my $r = shift;
   my %input = $r-args;  
 # for checking input items
 my $ticketTool = FES::Apache::TicketTool-new($r);
 my($result, $msg) = $ticketTool-verify_ticket($r);
 unless ($result) {
   $r-log_reason($msg, $r-filename);
   my $cookie = $ticketTool-make_return_address($r);
   $r-err_headers_out-add('Set-Cookie' = $cookie);
   return FORBIDDEN;
 }
   ## Here is where we need to insert a push_handler insert. I won't need
   ## the requested uri from the $r, since the $r goes along for the ride
 in## push_handler
 
   my $action = defined $input{'act'} ? $input{'act'} : 'view';
 
   print STDERR action is defined as $action\n;  ## DEBUGGING
 
   if ($action eq 'logout')  {
   $r-push_handlers('PerlHandler' = 'FES::Control::Logout');
   return OK;
   } elsif ($action eq 'view') {
   $r-push_handlers('PerlHandler' = 'FES::Control::View');
   return OK;
   }   else {
   $r-push_handlers('PerlHandler' = 'FES::Control::View');
   return OK;
   }
## ARE THOSE THE CORRECT THINGS TO 'RETURN' FOR THESE CASES?
  
 }
 
 1;
 ==
 
 And the Logout.pm:
 
 =
 package FES::Control::Logout;
 
 use strict;
 use Apache;
 use Apache::Constants qw(:common);
 use FES::Common::Common qw( header footer);
 use CGI qw/:standard/;
 use CGI::Cookie;
 
 sub handler {
   my $r = shift;
   my $q = new CGI;
   my $ticket = _get_ticket('r' = $r);
 
 ## HERE IS WHERE I NEED TO 1.) DELETE USER'S TICKET COOKIE AND
 ## 2.) REDIRECT THEM TO /FES (w/o bringing old
 $r),(WHERE THEY SHOULD GET
 ## A NEW LOGIN SCREEN BECAUSE COOKIE IS
 GONE.)
 
 }
 
 sub _get_ticket {
   my $args = {
   'r' = undef,
   @_
   };
   my $r = $args-{'r'};
   my %cookies = CGI::Cookie-parse($r-header_in('Cookie'));
 # TESTING
   my %ticket = $cookies{'Ticket'}-value;  # TESTING
   return \%ticket;
 }
 
 1;
 =
 




Apache - mod_perl - Windows

2001-11-27 Thread Albrecht Fortenbacher

Hi,

sorry for bothering you with a question concerning mod_perl under 
windows (it's not that I like windows so much, it's just because I have 
to use a windows system ...)

I tried to install precompiled mod_perl within an Apache 1.3.22 server 
on Windows 2000 as indicated on http://perl.apache.org, and this failed 
(error message below).

My question is:
1. is there a way to get a precompiled windows version running (I don't 
want to reset my Apache server to some ancient version!)
or
2. is it worth the effort (and likely to be successful) to configure the 
CPAN module with make- and cc-Utilities (e.g. from cygwin), and is there 
an *easy* indication how to do it
or
3. is Apache/mod_perl and windows an invalid combination which simply 
should not be used???

Thanks in advance
Albrecht Fortenbacher

---
1. my environment is Windows 2000, Apache 1.3.22 and Perl 5.6.1, binary 
build 629 provided by ActiveState
2. I installed mod_perl via ActiveState's ppm from 
http://theoryx5.uwinnipeg.ca/ppmpackages, as indicated on the 
perl.apache.org page
3. at the end of the installation process, the module mod_perl.so is 
copied into the Apache modules directory
4. this module is not recognized by Apache, as the following *weird* 
error message shows:
   Can't locate API module structure `mod_perl' in file
   e:/apache/modules/mod_perl.
   so: (127) The specified procedure could not be found:
This error message was produced by the line
   LoadModule mod_perl modules/mod_perl.so
in the httpd.conf file.

-- 
___
Prof. Dr. Albrecht Fortenbacher Angew. Informatik / FHTW Berlin
 Anschrift: FB4, FHTW Berlin, Treskowallee 8, 10313 Berlin
 Tel: 030 5019-2321  Fax: -2671
 mailto:[EMAIL PROTECTED]
 http://www.f4.fhtw-berlin.de/people/forte




DSO Issues

2001-11-27 Thread David Wheeler

Hi All,

While it seems to be well-known anecdotally that one should never use a
DSO install of mod_perl (particularly among Mason developers), is there
yet any place where all the known issues surrounding the use of DSO
mod_perl are documented? I see a place in the guide where Stas mentions
issues with mymalloc and such, but I also saw a post from a few months
ago where he'd asked for someone with extensive experience with DSO
installs to come forward and discuss the known issues. Did this ever
come about?

Thanks!

David
-- 
David Wheeler AIM: dwTheory
[EMAIL PROTECTED] ICQ: 15726394
   Yahoo!: dew7e
   Jabber: [EMAIL PROTECTED]




RE: Apache - mod_perl - Windows

2001-11-27 Thread Jonathan M. Hollin

:: sorry for bothering you with a question concerning mod_perl under
:: windows (it's not that I like windows so much, it's just because I have
:: to use a windows system ...)

Same here - I'm forced to use Windows because we're a Windows only shop.
Additionally, I don't know Unix so that kind of limits my opportunities.
:-(

:: My question is:
:: 1. is there a way to get a precompiled windows version running (I don't
:: want to reset my Apache server to some ancient version!)

I have set up several Windows / Apache / mod_perl servers without any
problems whatsoever.  I would recommend the following (in order):

Download and install the latest non-v2 distribution of Apache
Download ActiveState's ActivePerl (http://www.activestate.com/) and
install into the Apache directory
Use PPM (Perl Package Manager) to download and install mod_perl (and any
other module you want).

Note:  You will need to add the following PPD Repository Path to PPM in
order to get mod_perl:
http://theoryx5.uwinnipeg.ca/cgi-bin/ppmserver?urn:/PPMServer


:: 2. is it worth the effort (and likely to be successful) to configure the
:: CPAN module with make- and cc-Utilities (e.g. from cygwin), and is there
:: an *easy* indication how to do it
:: or

It's possible to do it via Cygwin, but not necessary if you follow the steps
above.

As to whether or not it's worth the effort...  YES, YES, YES!!!  You have
got to see the difference between mod_perl and mod_cgi to believe it.  Once
you've worked under mod_perl, you'll will never go back to plain old CGI.

:: 3. is Apache/mod_perl and windows an invalid combination which simply
:: should not be used???

No way.  This combination works very well with some caveats (see the
documentation for details).

Jonathan M. Hollin - WYPUG Co-ordinator
West Yorkshire Perl User Group
http://wypug.pm.org/




Re: Apache - mod_perl - Windows

2001-11-27 Thread Randy Kobes

On Tue, 27 Nov 2001, Albrecht Fortenbacher wrote:

 I tried to install precompiled mod_perl within an Apache 1.3.22 server
 on Windows 2000 as indicated on http://perl.apache.org, and this failed
 (error message below).
[ .. ]
 ---
 1. my environment is Windows 2000, Apache 1.3.22 and Perl 5.6.1, binary
 build 629 provided by ActiveState
 2. I installed mod_perl via ActiveState's ppm from
 http://theoryx5.uwinnipeg.ca/ppmpackages, as indicated on the
 perl.apache.org page
 3. at the end of the installation process, the module mod_perl.so is
 copied into the Apache modules directory
 4. this module is not recognized by Apache, as the following *weird*
 error message shows:
Can't locate API module structure `mod_perl' in file
e:/apache/modules/mod_perl.
so: (127) The specified procedure could not be found:
 This error message was produced by the line
LoadModule mod_perl modules/mod_perl.so
 in the httpd.conf file.

Hi,
Try, in http.conf,
LoadModule perl_module modules/mod_perl.so
rather than
LoadModule mod_perl modules/mod_perl.so

best regards,
randy kobes




Re: Apache - mod_perl - Windows

2001-11-27 Thread Alessandro Forghieri

Greetings.

You may be in need of

AddModule mod_perl.c

After the ClearModuleList somewhere around line 207 of httpd.conf as
distributed.
(What's ClearModuleList's used for anyway? I never really understood it -
but then again, I never really read its documentation...)

As for mod_perl on win32, I am using it and the speed up in the load times
is quite impressive. It does have a few glitches, the major possibly being
that script execution is single threaded. Look for the relevant discussion
in the list's archive (and in a forthcoming documentation upgrade).

One thing I noticed on Win2k (but I believe it is Apache releated: as I
recall, I saw it in a cgi-bin situation) is that scripts printing abundantly
to stderr (which apache redirects to errorr_log) have a tendency to hang.
This is an incentive to have  a clena compile, if you use warnings ... or
to redirect stderr to some other file ;)

Cheers,
alf





[Job Seeker]

2001-11-27 Thread Geoffrey Young

hi all...

  well, with this economy and all I guess it's a bad
time to look for a new job, but...

  things here at covad are taking a turn for the
worse.  In fact, covad stopped using mod_perl some
time ago, and I no longer have the internal corporate
sponsorship and support I once had.  Thus, stuff like
the weekly digest is probably going to come to an end
after only a year (yes, the first issue covered the
week of Septmber 24, 2000) due to my situation here at
work.

  anyway, if anyone has room for a decent mod_perl
developer and doesn't mind me working remotely (unless
you are near Philadelphia), please drop me a line...

--Geoff

__
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1



[JOB-SF Bay Area] Looking for someone to join my Web apps team at EFI/PrintMe

2001-11-27 Thread John Armstrong

Hello all-
I got my head count for the next few months and was given another 
spot to fill on the team! Hooray!

We are building a next generation internet printing system here at 
Electronics For Imaging (EFII). The Web apps portion is heavily 
Apache/ModPerl/HTML::Mason/Oracle based running under Linux and Solaris. 
I am looking for someone that can help round out the team and work on 
more back-end functionality. Initially this is the e-commerce/ERP 
integration, XML integration with other system components as well as 
'modernizing' our initially developed architecture and helping to clean 
up the code base so that moving forward is not quite so painful.

EFI is a mid-sized( 1000 employees or so ) public company that is 
doing just fine in the current market. We have not had any lay-off's and 
are growing at a comfortable rate, our stock is stable and we always 
meet our market expectations. All in all its a comfortable place to 
weather this storm. The PrintMe team runs as an 'internal startup', that 
means its pretty relaxed and divorced from many of the day-to-day issues 
that would normally come with working in a larger company.

Looking for the usual skill-set, experience with mod-perl/apache, 
ability to build your own architecture and framework from the ground-up 
and the ability to write code that plays well with others. I really 
enjoy people that come to the table with an overall understanding of how 
things work together and a somewhat proven track-record.

If your interested drop me an email. We are located in Foster City, 
CA, just south of San Francisco.

See us on the web at http://www.printme.com/ or http://www.efi.com/

John-




RE: DSO Issues

2001-11-27 Thread Christian Gilmore

Ditto. DSO makes my life so much better in terms of portability and
administratability that having my services down for a few seconds during a
log rotation is certainly worth it.

Regards,
Christian

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
 Behalf Of Vivek Khera
 Sent: Tuesday, November 27, 2001 2:17 PM
 To: [EMAIL PROTECTED]
 Subject: Re: DSO Issues


  DW == David Wheeler [EMAIL PROTECTED] writes:

 DW While it seems to be well-known anecdotally that one
 should never use a
 DW DSO install of mod_perl (particularly among Mason
 developers), is there
 DW yet any place where all the known issues surrounding the
 use of DSO

 The *only* issue I encounter is a massive memory leak upon SIGHUP or
 SIGUSR to apache.  The amount of leakage depends on my particular
 application.  Having a DSO makes it much easier for me to administer
 (having multiple instances of apache running on the same machine, some
 with and some without mod_perl), so I live with it and do a full
 stop/restart instead of SIGHUP to rotate logs.

 --
 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Vivek Khera, Ph.D.Khera Communications, Inc.
 Internet: [EMAIL PROTECTED]   Rockville, MD   +1-240-453-8497
 AIM: vivekkhera Y!: vivek_khera   http://www.khera.org/~vivek/





[OT] search.cpan.org

2001-11-27 Thread Robert Landrum

Does anyone know why search.cpan.org is always the s-l-o-w-e-s-t site 
on the internet?  I can't believe it always busy.  I've had trouble 
hitting it at 3 AM.

Maybe it's just me...


Rob

--
Only two things are infinite: The universe, and human stupidity. And I'm not
sure about the former. --Albert Einstein



Re: [JOB-SF Bay Area] Looking for someone to join my Web apps team at EFI/PrintMe

2001-11-27 Thread Aleksandr Vladimirskiy

Hi John,

I have been working with apache/mod_perl/oracle on Solaris and Linux for
about 2 years. The projects included building secure intranet sections,
dynamic pages, and most recently a ticketing system and a system to
replace a paper trail in a very large non-profit. I'm relocating to Palo
Alto, CA and I'm in the process of looking for a part time job. Do you
think that there might be part-time opporotunity as part of the department
you've described?

Thanks,

Alex 

On Tue, 27 Nov 2001, John Armstrong wrote:

 Hello all-
   I got my head count for the next few months and was given another 
 spot to fill on the team! Hooray!
 
   We are building a next generation internet printing system here at 
 Electronics For Imaging (EFII). The Web apps portion is heavily 
 Apache/ModPerl/HTML::Mason/Oracle based running under Linux and Solaris. 
 I am looking for someone that can help round out the team and work on 
 more back-end functionality. Initially this is the e-commerce/ERP 
 integration, XML integration with other system components as well as 
 'modernizing' our initially developed architecture and helping to clean 
 up the code base so that moving forward is not quite so painful.
 
   EFI is a mid-sized( 1000 employees or so ) public company that is 
 doing just fine in the current market. We have not had any lay-off's and 
 are growing at a comfortable rate, our stock is stable and we always 
 meet our market expectations. All in all its a comfortable place to 
 weather this storm. The PrintMe team runs as an 'internal startup', that 
 means its pretty relaxed and divorced from many of the day-to-day issues 
 that would normally come with working in a larger company.
 
   Looking for the usual skill-set, experience with mod-perl/apache, 
 ability to build your own architecture and framework from the ground-up 
 and the ability to write code that plays well with others. I really 
 enjoy people that come to the table with an overall understanding of how 
 things work together and a somewhat proven track-record.
 
   If your interested drop me an email. We are located in Foster City, 
 CA, just south of San Francisco.
 
   See us on the web at http://www.printme.com/ or http://www.efi.com/
 
 John-
 
 




[OT] Re: search.cpan.org

2001-11-27 Thread Nick Tonkin


Because it does a full text search of all the contents of the DB.


~~~
Nick Tonkin

On Tue, 27 Nov 2001, Robert Landrum wrote:

 Does anyone know why search.cpan.org is always the s-l-o-w-e-s-t site 
 on the internet?  I can't believe it always busy.  I've had trouble 
 hitting it at 3 AM.
 
 Maybe it's just me...
 
 
 Rob
 
 --
 Only two things are infinite: The universe, and human stupidity. And I'm not
 sure about the former. --Albert Einstein
 




[OT] Re: search.cpan.org

2001-11-27 Thread Robert Landrum

Sure... When doing searches. But it takes me about 20 seconds just to 
hit any page... not just the search pages.

And don't misunderstand, I think search.cpan.org is awesome.  I just 
wondered if anyone knew why it was slow all the time.

Rob


At 12:55 PM -0800 11/27/01, Nick Tonkin wrote:
Because it does a full text search of all the contents of the DB.


~~~
Nick Tonkin

On Tue, 27 Nov 2001, Robert Landrum wrote:

 Does anyone know why search.cpan.org is always the s-l-o-w-e-s-t site
 on the internet?  I can't believe it always busy.  I've had trouble
 hitting it at 3 AM.

 Maybe it's just me...


 Rob

 --
 Only two things are infinite: The universe, and human stupidity. 
And I'm not
 sure about the former. --Albert Einstein




--
Only two things are infinite: The universe, and human stupidity. And I'm not
sure about the former. --Albert Einstein



Re: [OT] Re: search.cpan.org

2001-11-27 Thread Bill Moseley

At 12:55 PM 11/27/01 -0800, Nick Tonkin wrote:

Because it does a full text search of all the contents of the DB.

Perhaps, but it's just overloaded.

I'm sure he's working on it, but anyone want of offer Graham free hosting?
A few mirrors would be nice, too.

(Plus, all my CPAN.pm setups are now failing to work, too)



Bill Moseley
mailto:[EMAIL PROTECTED]



[OT] Re: search.cpan.org

2001-11-27 Thread Nick Tonkin


Well, ask Ask if you want the whole truth. But when I saked him that's
what he said. Maybe there's a problem with the architecture and some
pre-indexing is done per session or something suboptimal like that. Ask?

~~~
Nick Tonkin

On Tue, 27 Nov 2001, Robert Landrum wrote:

 Sure... When doing searches. But it takes me about 20 seconds just to 
 hit any page... not just the search pages.
 
 And don't misunderstand, I think search.cpan.org is awesome.  I just 
 wondered if anyone knew why it was slow all the time.
 
 Rob
 
 
 At 12:55 PM -0800 11/27/01, Nick Tonkin wrote:
 Because it does a full text search of all the contents of the DB.
 
 
 ~~~
 Nick Tonkin
 
 On Tue, 27 Nov 2001, Robert Landrum wrote:
 
  Does anyone know why search.cpan.org is always the s-l-o-w-e-s-t site
  on the internet?  I can't believe it always busy.  I've had trouble
  hitting it at 3 AM.
 
  Maybe it's just me...
 
 
  Rob
 
  --
  Only two things are infinite: The universe, and human stupidity. 
 And I'm not
  sure about the former. --Albert Einstein
 
 
 
 
 --
 Only two things are infinite: The universe, and human stupidity. And I'm not
 sure about the former. --Albert Einstein
 




Re: Deleting a cookie

2001-11-27 Thread Mark Maunder

Jon Robison wrote:

 I have created a login system using the wonderful Ticket system from the
 Eagle book.  I have modified TicketAccess so that after authentication,
 it reviews the arguments in the query string and does push_handler, the
 handler being chosen based on the args.

 My only problem is that I want to provide the users with a logout button
 which will delete the cookie from thier browser, yet I cannot find how!.

Jon,

I had the same problem and could not succesfully delete the cookie from all browsers 
(IE, Netscape, Konqueror, Lynx, Opera etc.). I eventually solved
it by keeping the existing (session) cookie which was assigned when the user first 
logged in, but marking the user as logged out on the server side.
i.e. associate a user cookie with session data stored in a database, and instead of 
deleting the cookie on the client side, just set something on the
server side session information that marks the user as having logged out. If the user 
then logs in again, just reuse the same cookie and mark the user
as having logged in. This way you only have to assign an authentication cookie once 
per browser session.

This may be tough to drop into TicketTool because IIRC it stores the authentication 
info in the cookie itself, rather than a server side session it
associates with a cookie. Not very helpful, but it's another approach. I'd like to 
hear if you get it working across various browsers by expiring the
cookie - for future ref.

~mark




Re: [OT] Re: search.cpan.org

2001-11-27 Thread Mark Maunder

Nick Tonkin wrote:

 Because it does a full text search of all the contents of the DB.


Not sure what he's using for a back end, but mysql 4.0 (in alpha) has very fast and
feature rich full text searching now, so perhaps he can migrate to that once it's
released in December sometime. I'm using it on our site and searching fulltext
indexes on three fields (including a large text field) in under 3 seconds on over
70,000 records on a p550 with 490 megs of ram.




Re: [OT] search.cpan.org

2001-11-27 Thread Perrin Harkins

There's a simple solution:
http://kobesearch.cpan.org/




Re: [OT] Re: search.cpan.org

2001-11-27 Thread Bill Moseley

At 09:02 PM 11/27/01 +, Mark Maunder wrote:
I'm using it on our site and searching fulltext
indexes on three fields (including a large text field) in under 3 seconds
on over
70,000 records on a p550 with 490 megs of ram.


Hi Mark,

plug

Some day if you are bored, try indexing with swish-e (the development
version).
http://swish-e.org

The big problem with it right now is it doesn't do incremental indexing.
One of the developers is trying to get that working with in a few weeks.
But for most small sets of files it's not an issue since indexing is so fast.

My favorite feature is it can run an external program, such as a perl mbox
or html parser or perl spider, or DBI program or whatever to get the source
to index.  Use it with Cache::Cache and mod_perl and it's nice and fast
from page to page of results.

Here's indexing only 24,000 files:

 ./swish-e -c u -i /usr/doc
Indexing Data Source: File-System
Indexing /usr/doc
270279 unique words indexed.
4 properties sorted.  
23840 files indexed.  177638538 total bytes.
Elapsed time: 00:03:50 CPU time: 00:03:16
Indexing done!

Here's searching:

 ./swish-e -w install -m 1
# SWISH format: 2.1-dev-24
# Search words: install
# Number of hits: 2202
# Search time: 0.006 seconds
# Run time: 0.011 seconds

A phrase:

 ./swish-e -w 'public license' -m 1
# SWISH format: 2.1-dev-24
# Search words: public license
# Number of hits: 348
# Search time: 0.007 seconds
# Run time: 0.012 seconds
998 /usr/doc/packages/ijb/gpl.html gpl.html 26002


A wild card and boolean search:

 ./swish-e -w 'sa* or java' -m 1
# SWISH format: 2.1-dev-24
# Search words: sa* or java
# Number of hits: 7476
# Search time: 0.082 seconds
# Run time: 0.087 seconds

Or a good number of results:

 ./swish-e -w 'is or und or run' -m 1
# SWISH format: 2.1-dev-24
# Search words: is or und or run
# Number of hits: 14477
# Search time: 0.084 seconds
# Run time: 0.089 seconds

Or everything:

 ./swish-e -w 'not dksksks' -m 1
# SWISH format: 2.1-dev-24
# Search words: not dksksks
# Number of hits: 23840
# Search time: 0.069 seconds
# Run time: 0.074 seconds


This is pushing the limit for little old swish, but here's indexing a few
more very small xml files (~150 bytes each)

3830016 files indexed.  582898349 total bytes.
Elapsed time: 00:48:22 CPU time: 00:44:01

/plug

Bill Moseley
mailto:[EMAIL PROTECTED]



Re: DSO Issues

2001-11-27 Thread John Chia

On 27 November 2001 15:17 (-0500), Vivek Khera wrote:
 The *only* issue I encounter is a massive memory leak upon SIGHUP or
 SIGUSR to apache. 

Hm.  I only get memory leaks if PerlFreshRestart is enabled and I SIGHUP
it.

-- 
john chia [EMAIL PROTECTED]  starnix inc.
tollfree: 1-87-pro-linuxthornhill, ontario, canada
http://www.starnix.com  professional linux services  products



ANNOUNCE: Embperl 2.0b5

2001-11-27 Thread Gerald Richter

The URL

ftp://ftp.dev.ecos.de/pub/perl/embperl/HTML-Embperl-2.0b5.tar.gz

has entered CPAN as

  file: $CPAN/authors/id/G/GR/GRICHTER/HTML-Embperl-2.0b5.tar.gz
  size: 506804 bytes
   md5: e5836be6ad29f8658052e512e2427c74

This is mainly a bug fix release. The only new feature is the possibility to
pass parameters to xslt processors. Details about the new XML support can be
found in the announce for 2.0b4 (see
http://www.ecos.de/~mailarc/embperl/2001-11/msg00120.html)

Embperl is a system for building dynamic websites with Perl.
It gives you the power to embed Perl code in your HTML documents
and the ability to build your Web site out of small reusable objects in
an object-oriented style. You can also take advantage of all the
usual Perl modules, (including DBI for database access) use their
functionality and easily include their output in your web pages.

Embperl has several features which are especially useful for creating
HTML, including dynamic tables, form field processing, URL
escaping/unescaping, session handling, and more.

With 2.0 this feature are extented to use XML/XSLT, extent the Embperl's
syntax, build taglibs, cacheing and more.

See http://perl.apache.org/embperl/ (english) or
http://www.ecos.de/embperl/ (german) for more information.

Changes since 2.0b4:

   - Add xsltparam parameter which takes a hashref and is used to
 pass parameters to the xslt processor. If not given defaults
 to %fdat.
   - Add require URI::URL to test.pl so make test work with newer LWP.
 Patch from Jonathan Stowe.
   - Fixed problem in registry/tied test, which failed for some Apache
 versions because of addtional http header. Patch from Jonathan Stowe.
   - Fixed problem with comments inside [! !] blocks. Reported by
 Alan Milligan.
   - Fixed compiling problem with very recent versions of libxslt.
 Reported by Michael Stevens and Jonathan Stowe.
   - Fixed make test so it skips session tests if Apache::SessionX isn't
 installed. Reported by from Jonathan Stowe.
   - Fixed path problem with Execute ({sub = foo,... }) on win32.
   - Fixed a problem with duplicate subroutine names when running
 multiple pages in the same package.
   - Fixed problem with reloading when file changed, which sometimes
 didn't reload correctly in 2.0b4
   - Fixed memory leak which occured when using libxslt.
   - Fixed MakeMaker problem with Perl 5.7.1.
   - Removed some uninitialized value warnings.
   - Added make start and make stop to start and stop test httpd


Enjoy

Gerald

-
Gerald Richterecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:   Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131
WWW:http://www.ecos.de  Fax:  +49 6133 925152
-





ANNOUNCE: Apache::ImageMagick 2.0b5

2001-11-27 Thread Gerald Richter

The URL

ftp://ftp.dev.ecos.de/pub/perl/image/Apache-ImageMagick-2.0b5.tar.gz

has entered CPAN as

  file: $CPAN/authors/id/G/GR/GRICHTER/Apache-ImageMagick-2.0b5.tar.gz
  size: 10734 bytes
   md5: f2b27559a97f349603c218be8205409d


This release fixes a bug, which causes cached files to stay opened.


NAME

Apache::ImageMagick - Convert and manipulate images on the fly

DESCRIPTION

This module uses the Image::Magick library to process or create an image on
the fly. It is able to convert the source image to any type you request that
is supported by Image::Magick (e.g. TIFF, PPM, PGM, PPB, GIF, JPEG and
more).
Additionaly you can specify (multiple) image manipulation filters in the
additional path info and format options in the query string.
Apache::ImageMagick caches the result image so multiple requested with
the same parameters only needs one computation. To do more sophisticated
manipulation, Apache::ImageMagick can run a script that does the image
manipulation/creation. Last but not least Apache::ImageMagick comes with
a proxy module, that can be linked into a non mod_perl frontend proxy server
and which will delivers cached images which highest possible speed.

For detailed information see

  perldoc Apache::ImageMagick


AUTHOR

G.Richter ([EMAIL PROTECTED])

Based on work from Lincoln Stein and Doug MacEachern publish in
Writing Apache Modules with Perl and C see www.modperl.com



-
Gerald Richterecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:   Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131
WWW:http://www.ecos.de  Fax:  +49 6133 925152
-





Re: Apache::AuthCookie login faliure reason

2001-11-27 Thread Vivek Khera

 CH == Carolyn Hicks [EMAIL PROTECTED] writes:

CH this to something like 'InvalidLogin' in authen_cred, you can then check
CH for this and set the reason via $r-subprocess_env in
AuthCookieHandler- authen_ses_key, before AuthCookie-authenticate wipes
CH the cookie out. Not extensively tested, but seems to work so far :)

This is what I do.  Unfortunately the diagram in AuthCookie man page
is incorrect in that returning undef from authen_cred sends you back
to the login screen (last I checked), so one must pull these tricks.


my %errors =
  (
   'badpass' = 'Sorry, your login information is incorrect.  Please try again.',
   'suspended' = 'Sorry, your account is supended.  Please contact us for 
assistance.',
   'sessfail' = 'Sorry, there was a problem establishing your session.  Please try 
again.',
   'terminated' = 'Sorry, this account has been cancelled.  Please create a new one.',
  );

# Check credentials in database.  If failure, return 'ERROR:code'
# where code is from %errors hash.  On success, return the cookie

sub authen_cred ($$\@) {
  my $self = shift;
  my $r = shift;
  my ($acct,$password,$isAdmin) = @_;

  Apache-request($r);  # need to set for openDB().

  my $dbh = openDB() or return 'ERROR:sessfail';

  # first, check id/password from database
  my $orec = new orec()
or return 'ERROR:sessfail';
  my $oid = $orec-acct_to_id($acct) or return 'ERROR:badpass';
  eval { $orec-populate_id($oid); };
  return 'ERROR:badpass' if ($@ and $@ =~ m/^notfound/);

  return 'ERROR:terminated' if $orec-owner_status() eq 'terminated';

  $orec-verify_password($password) or return 'ERROR:badpass';

  # ok, so now create a session for them and use that session ID
  # as their cookie value
  my %session;
  eval {
tie %session, 'Apache::Session::Postgres', undef,
  {
   Handle = $dbh,
   Commit = 0,
  };
  };

  if ($@) {
warn authen_cred got $@ creating new session;
return 'ERROR:sessfail';
  } else {
$session{user} = $orec-owner_email();
$session{owner_id} = $orec-owner_id();
if ($isAdmin) {
  # instantiate the admin record in this session and log that
  # this admin is impersonating this user.
  my $arec = arec-new($orec-{_CONTEXT});
  $arec-populate_id($arec-decode($isAdmin));
  $session{arec} = $arec;
  $arec-log_action('Logged in as account owner.',$orec);
}
return $session{_session_id};
  }
}

# upon failure to authenticate the session, set MLMAuthReason environment and
# return undef.

sub authen_ses_key ($$$) {
  my $self = shift;
  my $r = shift;
  my $key = shift;

  Apache-request($r);  # need to set for openDB().

  if ($key =~ m/^ERROR:(\w+)(-\d+)?$/) {
# set $r-subprocess_env('MLMAuthReason') to failure reason
$r-subprocess_env('MLMAuthReason' = $errors{$1});
return undef;
  }

  # Check if key is in database.

  my %session;
  eval {
my $dbh = openDB();
tie %session, 'Apache::Session::Postgres', $key,
  {
   Handle = $dbh,
   Commit = 0,
  };
  };

  if ($@) {
warn authen_ses_key got $@ retrieving session `$key';
$r-subprocess_env('MLMAuthReason' = 'Unable to retrieve session.  Possibly 
expired.  Please login again.');
return undef;
  } else {
# got the session... now stash it away for later use
$r-pnotes('sessionkey',$key);
$r-pnotes('sessionhashref',\%session);
$r-pnotes('owner_id',scalar($session{owner_id}));
return $session{user};
  }
}



-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D.Khera Communications, Inc.
Internet: [EMAIL PROTECTED]   Rockville, MD   +1-240-453-8497
AIM: vivekkhera Y!: vivek_khera   http://www.khera.org/~vivek/



[OT] A couple of dubious network problems...

2001-11-27 Thread Dave Hodgkinson


Chaps,

Can I pick the wisdom of the hive here please? I witnessed a couple of
mod_perl related network problems yesterday which are kind of mod_perl
related:

1. On a RH6.0 (yes, ick) box without persistent DBI connections, the
server side of the DBD::mysql connection was successfully closed
(netstat shows nothing), but the client side shows a TIME_WAIT state,
which hangs around for 30 seconds or so before
disappearing. Obviously, using Apache::DBI makes this go away, but
it's disturbing nonetheless. Does this ring any bells?

2. On both RH6 (in the office) and Solaris (at the co-lo) with a
middling-recent Apache and mod_perl, some pages were getting truncated
when sent to the browser. This happens on a variety of browsers and a
variety of pages. Once it happens on a particular combination of page
and browser it's reproducible. Now, the page is definitely being
completely sent to $r-print(), but it's not making it to the browser
(or at least that's what tcpdump shows). Again, any bells ringing?

Thanks,

Dave






Upgrade Perl to 5.6.1and mod_perl still see 5.6.0

2001-11-27 Thread Hans Poo

I've just installed a redhat 7.2 machine.

I the installed Apache::ASP using CPAN, and ended upgrading to perl 5.6.1.

After restarting httpd. i noticed that mod_perl is still int he old libraries.

The test are:

1.-  @INC seems fine in the system:

# perl -e 'print join \n, @INC'
/usr/local/lib/perl5/5.6.1/i686-linux
/usr/local/lib/perl5/5.6.1
/usr/local/lib/perl5/site_perl/5.6.1/i686-linux
/usr/local/lib/perl5/site_perl/5.6.1
/usr/local/lib/perl5/site_perl

2.- But mod_perl is still on the old @INC

# /etc/rc.d/init.d/httpd start
Iniciando httpd: Syntax error on line 1448 of /etc/httpd/conf/httpd.conf:
Can't locate Apache/ASP.pm in @INC (@INC contains: 
/usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0 
/usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0 
/usr/lib/perl5/site_perl . /etc/httpd/ /etc/httpd/lib/perl) at (eval 3) line 
3.
   [FALLÓ]
#

Hans Poo



[OT] A couple of weird network problems...

2001-11-27 Thread daveh


I was at a client site last week and we saw two Apache/mod_perl
related network problems:

1. On one particular handler, a $r-print() looks good and yet it's
truncated my the time it gets to the browser. This is on Linux and
Solaris, Apache 1.3.14 and early 1.2x mod_perl. Does this ring any
bells?

2. On an Apache that's using DBI (_not_ Apache::DBI) and frequently
making connections and closing them, the MySQL end appears to close
out properly, but the client side ends up with loads of connections in
TIME_WAIT and eventually we run out of sockets. This is on Linux. IS
this expected? Obviously making connections persistent is a Good
Thing, but is a TIME_WAIT expected?

Not strictly mod_perl related, but if anyone has a clue, I'd
appreciate it!

Ta,

Dave




[OT] A couple of weird network problems...

2001-11-27 Thread daveh


I was at a client site last week and we saw two Apache/mod_perl
related network problems:

1. On one particular handler, a $r-print() looks good and yet it's
truncated my the time it gets to the browser. This is on Linux and
Solaris, Apache 1.3.14 and early 1.2x mod_perl. Does this ring any
bells?

2. On an Apache that's using DBI (_not_ Apache::DBI) and frequently
making connections and closing them, the MySQL end appears to close
out properly, but the client side ends up with loads of connections in
TIME_WAIT and eventually we run out of sockets. This is on Linux. IS
this expected? Obviously making connections persistent is a Good
Thing, but is a TIME_WAIT expected?

Not strictly mod_perl related, but if anyone has a clue, I'd
appreciate it!

Ta,

Dave

-- 
David Hodgkinson, Wizard for Hirehttp://www.davehodgkinson.com
Editor-in-chief, The Highway Star   http://www.deep-purple.com
Deep Purple Family Tree news  http://www.slashrock.com
   Interim Technical Director, Web Architecture Consultant for hire



Re: [modperl-site design challenge] Thomas Klausner (domm)

2001-11-27 Thread mathias

on 26.11.01 17:14, John Saylor at [EMAIL PROTECTED] wrote:

 Hi
 
 ( 01.11.25 22:37 +0100 ) Thomas Klausner:
 You can look at my idea of the the new modperl-site design here:
 http://domm.zsi.at/modperl-site-domm/
 

Nice work!

Is it all right to talk details?

In my opinion something like:
.content {
line-height: 130%;
}
... can improve readability quite a lot.


mathias




Problem with asp module and apache on win98

2001-11-27 Thread Giorgio D'Anna

Hi,

I have installed apache server on windows98 with modperl
and apache::asp module, but I can't make it working.

I have put this in httpd.conf:

Files *.asp
   SetHandler perl-script
   PerlHandler Apache::ASP
   PerlSetVar Global C:/Windows/temp
   PerlSetVar CookiePath /
   PerlSetVar AllowSessionState 1
   PerlSetVar SessionTimeout 20
   PerlSetVar Debug 2
   PerlSetVar BufferingOn 1
   PerlSetVar StatINC 1
   PerlSetVar SessionSerialize 0
   PerlSetVar SoftRedirect 0
   PerlSetVar NoState 0
   PerlSetVar StateDir ./.state
   PerlSetVar StateManager 10
/Files


When I try to run in my browser an ASP page I
get an internal error (500) and this is the error.log:


[Mon Nov 26 03:39:00 2001] [error] Can't call method FETCH on an undefined
value at /apache/lib/perl/MLDBM/Sync.pm line 86.
 MLDBM::Sync::AUTOLOAD('MLDBM::Sync=HASH(0x114a1f8)', 'application') called
at D:/Perl/site/lib/Apache/ASP.pm line 5221
 Apache::ASP::State::FETCH('Apache::ASP::State=HASH(0x114b36c)',
'application') called at D:/Perl/site/lib/Apache/ASP.pm line 4954
 Apache::ASP::State::new('Apache::ASP=HASH(0x114bf48)', 'application',
'server') called at D:/Perl/site/lib/Apache/ASP.pm line 5208
 Apache::ASP::State::TIEHASH('Apache::ASP::State',
'Apache::ASP=HASH(0x114bf48)', 'application', 'server') called at
D:/Perl/site/lib/Apache/ASP.pm line 4530
 Apache::ASP::Application::new('Apache::ASP=HASH(0x114bf48)') called at
D:/Perl/site/lib/Apache/ASP.pm line 563
 Apache::ASP::new('Apache::ASP', 'Apache=SCALAR(0x140e638)') called at
D:/Perl/site/lib/Apache/ASP.pm line 148
 Apache::ASP::handler('Apache=SCALAR(0x140e638)') called at nul line 0
 eval {...} called at nul line 0



Could anyone help me?

Thanks in advance.


--
G.d'A.



P.S.:
before I got another error too:
flock() unimplemented on this platform at /apache/lib/perl/
MLDBM/Sync.pm line xxx
but I commented out some lines in sync.pm and so I fixed that.
Anyway, since I have read on the documentation that it is possible to
disable use of flock() on Win95/98 where it is unimplemented
I'd want to know how I can do this (instead of commenting out).






Re: Deleting a cookie

2001-11-27 Thread Hans Poo

El Mar 27 Nov 2001 10:21, Jon Robison escribió:
 I have created a login system using the wonderful Ticket system from the
 Eagle book.  I have modified TicketAccess so that after authentication,
 it reviews the arguments in the query string and does push_handler, the
 handler being chosen based on the args.

 My only problem is that I want to provide the users with a logout button
 which will delete the cookie from thier browser, yet I cannot find how!.
 I have reviewed every module on my system with 'Cookie' in the name
 (Apache::Cookie, CGI::Cookie, etc.) and nowhere does it tell how to do
 this. There is a small mention of changing the expiration to  0, but
 apparently I am doing it wrong (possible confusing point is the use of
 an 'expires' value in the cookie itself, seperate, I think, from the
 'expires' attribute on the cookie?)

 I know it is a lot to ask, but I am relatively new to this part of
 mod_perl (pushing handlers, etc.), so if anyone can look at this and
 replace my BLOCKED comments with a couple of helpfull lines, I would
 greatly appreciate it!

 Thanks in advance -

 Jonathon Robison


 Below is my modified TicketAccess, as well as the Logout module I am
 re-directing to for logout action:
 =
 package FES::Apache::TicketAccess;

 use strict;
 use Apache::Constants qw(:common);
 use FES::Apache::TicketTool ();

 sub handler {
 my $r = shift;
   my %input = $r-args;  
 # for checking input items
 my $ticketTool = FES::Apache::TicketTool-new($r);
 my($result, $msg) = $ticketTool-verify_ticket($r);
 unless ($result) {
   $r-log_reason($msg, $r-filename);
   my $cookie = $ticketTool-make_return_address($r);
   $r-err_headers_out-add('Set-Cookie' = $cookie);
   return FORBIDDEN;
 }
   ## Here is where we need to insert a push_handler insert. I won't need
   ## the requested uri from the $r, since the $r goes along for the ride
 in## push_handler

   my $action = defined $input{'act'} ? $input{'act'} : 'view';

   print STDERR action is defined as $action\n;  ## DEBUGGING

   if ($action eq 'logout')  {
   $r-push_handlers('PerlHandler' = 'FES::Control::Logout');
   return OK;
   } elsif ($action eq 'view') {
   $r-push_handlers('PerlHandler' = 'FES::Control::View');
   return OK;
   }   else {
   $r-push_handlers('PerlHandler' = 'FES::Control::View');
   return OK;
   }
## ARE THOSE THE CORRECT THINGS TO 'RETURN' FOR THESE CASES?

 }

 1;
 ==

 And the Logout.pm:

 =
 package FES::Control::Logout;

 use strict;
 use Apache;
 use Apache::Constants qw(:common);
 use FES::Common::Common qw( header footer);
 use CGI qw/:standard/;
 use CGI::Cookie;

 sub handler {
   my $r = shift;
   my $q = new CGI;
   my $ticket = _get_ticket('r' = $r);

 ## HERE IS WHERE I NEED TO 1.) DELETE USER'S TICKET COOKIE AND
 ## 2.) REDIRECT THEM TO /FES (w/o bringing old
 $r),(WHERE THEY SHOULD GET
 ## A NEW LOGIN SCREEN BECAUSE COOKIE IS
 GONE.)

 }

 sub _get_ticket {
   my $args = {
   'r' = undef,
   @_
   };
   my $r = $args-{'r'};
   my %cookies = CGI::Cookie-parse($r-header_in('Cookie'));
 # TESTING
   my %ticket = $cookies{'Ticket'}-value;  # TESTING
   return \%ticket;
 }

 1;
 =

Set it again with an expiration time of 'now', i actually use it with CGI.pm

You  can send it with a custom invalid value, like 'invalidated', and take 
apropriate actions.

Hans Poo



Re: [OT] Re: search.cpan.org

2001-11-27 Thread Randy Kobes

On Tue, 27 Nov 2001, Bill Moseley wrote:

 At 12:55 PM 11/27/01 -0800, Nick Tonkin wrote:
 
 Because it does a full text search of all the contents of the DB.

 Perhaps, but it's just overloaded.

I think the load, and network connection, is the main reason; the
search itself, if you were connected locally at a time when the
machine isn't so busy, is pretty quick.

 I'm sure he's working on it, but anyone want of offer Graham free hosting?
 A few mirrors would be nice, too.

They (Graham and Elaine) are aware that it can be slow at times,
and have set up at least one mirror site to help spread the load.

best regards,
randy kobes




Re: [OT] A couple of dubious network problems...

2001-11-27 Thread Mark Maunder

Dave Hodgkinson wrote:

 1. On a RH6.0 (yes, ick) box without persistent DBI connections, the
 server side of the DBD::mysql connection was successfully closed
 (netstat shows nothing), but the client side shows a TIME_WAIT state,
 which hangs around for 30 seconds or so before
 disappearing. Obviously, using Apache::DBI makes this go away, but
 it's disturbing nonetheless. Does this ring any bells?

Dunno about number 2, but 1 is perfectly normal. TIME_WAIT is a condition
the OS puts a closed socket into to prevent another app from using the
socket, just in case the peer host has any more packets to send to that
port. The host that closes the socket will put the old socket into
TIME_WAIT. BSD IP stack implementations keep sockets in time_wait for
about 30 seconds, others go up to 2 minutes. The duration is called 2MSL
(2 * max_segment_lifetime). Don't worry about it and dont mess with it
(unless you're consuming 64000+ sockets per 30 seconds, in which case you
have other problems to deal with ;-)

~mark




Re: Can you help?

2001-11-27 Thread Stas Bekman

Gill wrote:

 I hope you can help...
 
 I have untarred the mod_perl file.
 I run ./configure --add-module=path/mod_perl.c

http://perl.apache.org/guide/install.html

_
Stas Bekman JAm_pH  --   Just Another mod_perl Hacker
http://stason.org/  mod_perl Guide   http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/




Re: Upgrade Perl to 5.6.1and mod_perl still see 5.6.0

2001-11-27 Thread Brett W. McCoy

On Fri, 23 Nov 2001, Hans Poo wrote:

 I've just installed a redhat 7.2 machine.

 I the installed Apache::ASP using CPAN, and ended upgrading to perl 5.6.1.

 After restarting httpd. i noticed that mod_perl is still int he old libraries.

Did you rebuild mod_perl?  If not, it's still the 5.6.0 version fo the
interpreter.

-- Brett
  http://www.chapelperilous.net/

Alden's Laws:
(1)  Giving away baby clothes and furniture is the major cause
 of pregnancy.
(2)  Always be backlit.
(3)  Sit down whenever possible.




Re: array's first element is empty

2001-11-27 Thread Perrin Harkins

 Not sure if this is mod_perl related, but i hope someone can help me
 anyway. When i do DBI queries from mod_perl handler and put all
returned
 results in array then array's first element is empty, I wonder why? I
 don't like to shift off first element every time i return the result.
 Has anyone seen this before and what could cause this?

Unless you see different behavior when running under CGI, this is not a
mod_perl question.  I suggest you ask it on http://perlmonks.org/ and
post a code sample with your question.
- Perrin




Re: Class data preloading modules

2001-11-27 Thread Perrin Harkins

 * initialize everything in the parent Apache, just make sure to create
   new DBI connections in the children.

That's what I would do.  It increases the amount of shared memory.
Disconnect the DBI connection when you're done with it.  Apache::DBI
doesn't cache connections during startup, so this shouldn't be a
problem.
- Perrin




Re: DSO Issues

2001-11-27 Thread Vivek Khera

 DW == David Wheeler [EMAIL PROTECTED] writes:

DW While it seems to be well-known anecdotally that one should never use a
DW DSO install of mod_perl (particularly among Mason developers), is there
DW yet any place where all the known issues surrounding the use of DSO

The *only* issue I encounter is a massive memory leak upon SIGHUP or
SIGUSR to apache.  The amount of leakage depends on my particular
application.  Having a DSO makes it much easier for me to administer
(having multiple instances of apache running on the same machine, some
with and some without mod_perl), so I live with it and do a full
stop/restart instead of SIGHUP to rotate logs.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D.Khera Communications, Inc.
Internet: [EMAIL PROTECTED]   Rockville, MD   +1-240-453-8497
AIM: vivekkhera Y!: vivek_khera   http://www.khera.org/~vivek/



Re: DSO Issues

2001-11-27 Thread Stephen Reppucci


If we're collecting a list of things that don't work in a DSO
build, add perl subs (via !--#perl sub=My::handler--).

At least, they didn't work as of January of this year.

On Tue, 27 Nov 2001, John Chia wrote:

 On 27 November 2001 15:17 (-0500), Vivek Khera wrote:
  The *only* issue I encounter is a massive memory leak upon SIGHUP or
  SIGUSR to apache.

 Hm.  I only get memory leaks if PerlFreshRestart is enabled and I SIGHUP
 it.



-- 
Steve Reppucci   [EMAIL PROTECTED] |
Logical Choice Software  http://logsoft.com/ |
=-=-=-=-=-=-=-=-=-=-  My God!  What have I done?  -=-=-=-=-=-=-=-=-=-=