Re: modperl 1.31 PDF pb

2001-11-17 Thread Sisyphus





  - Original Message - 
  From: 
  pascal barbedor 
  To: [EMAIL PROTECTED] 
  Sent: Saturday, November 17, 2001 4:49 
  AM
  Subject: modperl 1.31 PDF pb
  
  Hi 
  
  I have problem trying to download the pdf version 
  of the guide.
  several downloads always results in incorrect zip 
  impossible to decompress.
  
  i already noticed this problem with former 
  version of the guide.
  
  has anyone succesfully downloaded and 
  uncompressed the pdf file ?*
  
  I am on win
  
  thanks
  
  pascal
  
  Had a similar problem (also on win) with another 
  zip containing pdf docs, so I used LWP::Simple to download it. WinZip was then 
  able to unzip it without any problems. (Remember to 'binmode FILEHANDLE;' when 
  copying the zip to your hard drive.)
  
  Seems that my problem, at least, was a Windows 
  thing, as someone else has already suggested. Hard to believe, isn't it 
  :-)
  
  Cheers,
  Rob


Re: modperl 1.31 PDF pb

2001-11-17 Thread Stas Bekman

pascal barbedor wrote:

 I have problem trying to download the pdf version of the guide.
 
 several downloads always results in incorrect zip impossible to decompress.

As suggested by others this is a winXX ie/ns prob. it's covered here:

http://perl.apache.org/guide/#download

-- 


_
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: no_cache()

2001-11-17 Thread Stas Bekman

David Wheeler wrote:


 Huh, according to the mod_perl guide:
 
 
http://thingy.kcilink.com/modperlguide/correct_headers/2_1_3_Expires_and_Cache_Control.html
 
 Those headers are not added by no_cache(1). But I see that, according to
 the mod_perl Changes file, those headers were added to the behavior of
 no_cache(1) in mod_perl 1.21_01. So perhaps the mod_perl guide should be
 changed from its current documentation:
 
   my $headers = $r-headers_out;
   $headers-{'Pragma'} = $headers-{'Cache-control'} = 'no-cache';
   $r-no_cache(1);
 
 To simply:
 
   $r-no_cache(1).
 
 Stas?


Thanks David, fixed in the cvs version.

_
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/




ANNOUNCEMENT: HTML::Template::JIT 0.01

2001-11-17 Thread Sam Tregar

HTML::Template::JIT - a just-in-time compiler for HTML::Template

DESCRIPTION

This module provides a just-in-time compiler for HTML::Template.
Templates are compiled into native machine code using Inline::C.  The
compiled code is then stored to disk and reused on subsequent calls.

HTML::Template::JIT is up to 4 times as fast as HTML::Template using
caching.


NOTE

This module is not feature-complete.  Be sure to read the CAVEATS
section in the documentation before using!


AVAILABILITY

This module is available on SourceForge.  Download it at:

  http://prdownloads.sourceforge.net/html-template/HTML-Template-JIT-0.01.tar.g

The module is also available on CPAN.  You can get it using CPAN.pm or
go to:

  http://www.cpan.org/authors/id/S/SA/SAMTREGAR/


CONTACT INFO

You can join the HTML::Template mailing-list by sending a blank
message to [EMAIL PROTECTED]





[DBI] DBI-install_driver fails

2001-11-17 Thread Dau Hee

Hi

I am running on Redhat 7.1 with Apache/1.3.22 and
mod_perl/1.26. My perl version is 5.6.1, my DBI is at
1.20, DBD-Oracle is at 1.12, ApacheDBI at 0.88 and
Oracle is at 8.1.7.0.1. I also use up2date to upgraded
my glibc to 2.2.4 from 2.2.2.

After the glibc upgrade, I cannot get Apache to run.
It dies immediately after starting. After playing
around with the configuration, I found that if I
comment out this line in startup.pl
DBI-install_driver(Oracle);
Apache will run just fine. No other configuration
options needs to be changed.

The odd thing about this is that when Apache dies,
nothing is printed on my console. Nothing is printed
to error_log as well(including the resuming normal
operations line that you normally see when you start
Apache). I also cannot find any core file(ulimit is
unlimited).

I recompiled everything again, meaning Apache,
mod_perl, DBI and DBD-Oracle and still no go.

I also tried to use gdb and this is what I get.
==
GNU gdb 5.0rh-5 Red Hat Linux 7.1
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General
Public License, and you are
welcome to change it and/or distribute copies of it
under certain conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show
warranty for details.
This GDB was configured as i386-redhat-linux...
(gdb) run -X
Starting program: /usr/sbin/httpd -X
[New Thread 1024 (LWP 14062)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 14062)]
0x403a388f in S_new_xpvmg () from
/etc/httpd/modules/libperl.so
(gdb) bt
#0  0x403a388f in S_new_xpvmg () from
/etc/httpd/modules/libperl.so
#1  0x403a3dc5 in Perl_sv_upgrade () from
/etc/httpd/modules/libperl.so
#2  0x403a7c4c in Perl_sv_magic () from
/etc/httpd/modules/libperl.so
#3  0x403954ce in Perl_mg_copy () from
/etc/httpd/modules/libperl.so
#4  0x40399608 in Perl_hv_store () from
/etc/httpd/modules/libperl.so
#5  0x40360a00 in S_init_postdump_symbols () from
/etc/httpd/modules/libperl.so
#6  0x4035dda5 in S_parse_body () from
/etc/httpd/modules/libperl.so
#7  0x4035d552 in perl_parse () from
/etc/httpd/modules/libperl.so
#8  0x4033f0e6 in perl_startup () from
/etc/httpd/modules/libperl.so
#9  0x40342e0d in perl_cmd_require () from
/etc/httpd/modules/libperl.so
#10 0x08054924 in invoke_cmd () at eval.c:41
#11 0x08054d3e in ap_handle_command () at eval.c:41
#12 0x08054dd1 in ap_srm_command_loop () at eval.c:41
#13 0x0805543e in ap_process_resource_config () at
eval.c:41
#14 0x08055d67 in ap_read_config () at eval.c:41
#15 0x0805fc4d in standalone_main () at eval.c:41
#16 0x080605bf in main () at eval.c:41
#17 0x4016e627 in __libc_start_main (main=0x8060220
main, argc=2,
ubp_av=0xb8c4, init=0x804e278 _init,
fini=0x807d840 _fini,
rtld_fini=0x4000dcd4 _dl_fini,
stack_end=0xb8bc)
at ../sysdeps/generic/libc-start.c:129
==
Unfortunately I do not know what it means. 

I would think this is a problem with DBI and not
mod_perl but I am not sure. I also have no idea how to
fix this.

Without the install_driver line, I can still get my
entire website to operate as per normal.
Apache::DBI-connect_on_init still works without the
install_driver line. However I would really like to
use install_driver since I read in the mod_perl line
that this will reduce the memory usage in each child.

I appreciated any help rendered. Thannks.

Regards.







__
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com



ANNOUNCE: Log::Dispach::Config 0.01

2001-11-17 Thread Tatsuhiko Miyagawa

Here I've finished the first version of Log4j for perl.

There already exists a great Logging module Log::Dispatch by Dave
Rolsky and I don't like reinventing the wheels, so my new module
Log::Dispatch::Config just optionally drives configuration parsing
functionality, which Log::Dispatch lacks, against Log4j.

It's now on its way to CPAN and can also be downloaded from:

  http://bulknews.net/lib/archives/Log-Dispatch-Config-0.01.tar.gz

  file: $CPAN/authors/id/M/MI/MIYAGAWA/Log-Dispatch-Config-0.01.tar.gz
  size: 4656 bytes
   md5: 8300cde5fcf0b8d5f254464434d2f73b


Any suggestionss are highly welcome. Thanks.

--

NAME
Log::Dispatch::Config - Log4j for Perl

SYNOPSIS
  use Log::Dispatch::Config;
  Log::Dispatch::Config-configure('/path/to/config');

  my $dispatcher = Log::Dispatch-instance;

DESCRIPTION
Log::Dispatch::Config provides a way to configure Log::Dispatch with
configulation file (in AppConfig format). I mean, this is log4j for Perl,
not with all API compatibility though.

METHOD
This module has one class method `configure' which parses config file and
declares `instance' method in Log::Dispatch namespace. So what you should
do is call `configure' method once in somewhere (like `startup.pl' in
mod_perl), then you can get configured dispatcher instance via
`Log::Dispatch-instance'.

CONFIGURATION
Here is an example of the config file:

  dispatchers = file screen

  file.class = Log::Dispatch::File
  file.min_level = debug
  file.filename = /path/to/log
  file.mode = append
  file.format = [%d] [%p] %m at %F line %L%n

  screen.class = Log::Dispatch::Screen
  screen.min_level = info
  screen.stderr = 1
  screen.format = %m

Config file is parsed with AppConfig module, see the AppConfig manpage
when you face configuration parsing error.

  GLOBAL PARAMETERS

dispatchers
  dispatchers = file screen

`dispatchers' defines logger names, which will be splitted by spaces.
If this parameter is unset, no logging is done.

format
  format = [%d] [%p] %m at %F line %L%n
  format = [${datetime}] [${prioity}] ${message} at ${filename} line ${line}\n

`format' defines log format. `%X' style and `${XXX}' style are both
supported. Possible conversions format are

  %d ${datetime}datetime string
  %p ${priority}priority (debug, indo, warn ...)
  %m ${message} message string
  %F ${filename}filename
  %L ${line}line number
  %P ${package} package
  %nnewline (\n)

`format' defined here would apply to all the log messages to
dispatchers. This parameter is optional.

  PARAMETERS FOR EACH DISPATCHER

Parameters for each dispatcher should be prefixed with name., where
name is the name of each one, defined in global `dispatchers' parameter.

class
  screen.class = Log::Dispatch::Screen

`class' defines class name of Log::Dispatch subclasses. This parameter
is essential.

format
  screen.format = -- %m --

`format' defines log format which would be applied only to the
dispatcher. Note that if you define global `format' also, `%m' is
double formated (first global one, next each dispatcher one). This
parameter is optional.

(others)
  screen.min_level = info
  screen.stderr = 1

Other parameters would be passed to the each dispatcher construction.
See Log::Dispatch::* manpage for the details.

SINGLETON
Declared `instance' method would make `Log::Dispatch' class singleton, so
multiple calls of `instance' will all result in returning same object.

  my $one = Log::Dispatch-instance;
  my $two = Log::Dispatch-instance; # same as $one

See GoF Design Pattern book for Singleton Pattern.

But in practice, in persistent environment like mod_perl, Singleton
instance is not so useful. Log::Dispatch::Config defines `instance' method
so that the object reloads itself when configuration file is modified
since its last object creation time.

TODO
*   LogLevel configuration depending on caller package like log4j?

AUTHOR
Tatsuhiko Miyagawa [EMAIL PROTECTED]

This library is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.

SEE ALSO
the Log::Dispatch manpage, the AppConfig manpage






--
Tatsuhiko Miyagawa [EMAIL PROTECTED]