Re: mp2: any recommendations for template systems yet?

2003-02-21 Thread Josh Chamas
Perrin Harkins wrote:

On Thu, 2003-02-20 at 22:27, Carl Brewer wrote:


Do any of you have any recommendations for template systems with
mp2?  Not of the religious kind (!) but more on the lines
of what's working with mp2 at the moment?



Everything that doesn't make mod_perl API calls should work without
changes.  That means HTML::Template, Template Toolkit, Text::Template,
CGI::FastTemplate, etc.



Without wishing to start anything religious ... any suggestions
for a template system that handles sessions?



Apache::ASP, Embperl, and Mason all have session support integrated
now.  I can't vouch for their stability on mp2 yet though.



AFAIK, Apache::ASP v2.51 is working correctly on mp2 without any
special installation or configuration.

As a separate issue, but also interesting, users are reporting
success with running Apache::ASP under SpeedyCGI also which speaks
well towards its portability.

Regards,

Josh


Josh Chamas, Founder   phone:925-552-0128
Chamas Enterprises Inc.http://www.chamas.com
NodeWorks Link Checkinghttp://www.nodeworks.com




RE: HELP - Problem installing modperl

2003-02-21 Thread Pablo Jejcic
Here is my 'perl -V'.

Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
  Platform:
osname=solaris, osvers=2.9, archname=sun4-solaris-64int
uname='sunos localhost 5.9 sun4u sparc sunw,ultra-1'
config_args=''
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=define use64bitall=undef uselongdouble=undef
  Compiler:
cc='cc', ccflags ='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-xO3 -xdepend',
cppflags=''
ccversion='Sun WorkShop', gccversion='', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=87654321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=8, usemymalloc=n, prototype=define
  Linker and Libraries:
ld='cc', ldflags =''
libpth=/lib /usr/lib /usr/ccs/lib
libs=-lsocket -lnsl -ldl -lm -lc
perllibs=-lsocket -lnsl -ldl -lm -lc
libc=/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so
  Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-R
/usr/perl5/5.6.1/lib/sun4-solaris-64int/CORE'
cccdlflags='-KPIC', lddlflags='-G'


Characteristics of this binary (from libperl): 
  Compile-time options: USE_64_BIT_INT USE_LARGE_FILES
  Locally applied patches:
 9676 Port the OpenBSD glob() security patch
 9678 Addendum to #9676: some missing changes from OpenBSD glob.c
 9679 Up $File::Glob::VERSION, add OpenBSD glob version note
 9693 $VERSION and Version() on same line provokes CPAN.pm warning
 9706 #7210 broke .packlist generation
 9707 ExtUtils::Installed doesn't quote regex metacharacters in paths
 9775 Typo in utf8.h
 9950 Revert integration of #8254,#8255 in #8620 (causes coredump)
10021 Insecure regexes
10091 $ref1 == $ref2 behaves unpredictably if not NV_PRESERVES_UV
10093 Incorrect line numbers in AutoSplit
10100 [20010514.027] PL_last_in_gv may not be GV if stale filehandle
10145 [20010515.004] Segfaults from premature GC
10203 Don't think about UTF8
10250 [20010422.005] perl -e '{s//${}/; //}' segfaults
10394 Leakage of file scope lexicals into predeclared subroutines
10404 eval.t was relying on pre-#10394 buggy behavior
10412 Rationalize locale handling to fix bugs uncovered by #10394
10422 Potential buffer overrun if the radix separator  1 byte
10448 Lexicals outside eval weren't resolved correctly pre-#10394
10450 Optimize #10448 slightly
10543 Add LC_MESSAGES constant to POSIX module
10667 #10449 broke visibility of lexicals inside DB::DB()
10739 Ceval /x$\r\n/x fails to compile correctly
10939 Proposed fix for Pod::Man
11169 Doc patch for Tie::Hash
11374 Make h2ph grok ccsymbols fo the form 1234L, 1234ULL etc
11427 t/harness wasn't picking up all the tests
11428 run/runenv.t needs fflushNULL sanity
11431 pod/*.t tests not picked up by t/TEST either
11510 eval 'format foo=' would loop indefinitely
11713 UTF8 wasn't printing for PVMGs
11716 UTF8 flag should be meaningful only when POK
11808 [20010831.002] Bug in Term::Cap on Solaris ansi terminal
11847 Typo in perl_clone() code causes local(*foo) breakage
12005 [20010912.007] substr reference core dump
12024 Fix local() precedence bug in #8311
12303 Fix 'local $!=0;undef*STDOUT;' segfault
12304 Pod::Html makes a poor guess at author
12350 Typo in IO::Seekable doc
12496 Carp::shortmess_heavy() doesn't notice trailing newline
12549 readline() doesn't work with 'our' variables
12550 #12549 wasn't aware of strictures
12752 croak(Nullch) wasn't printing the contents of ERRSV
12811 [20011101.069] \stat('.') gives 'free unref scalar' error
12812 Slight modification of #12811
13149 Integrate #13147 from mainline (fixes nit in #10091)
13261 Integrate #8340,#13260 from mainline
  Built under solaris
  Compiled at Apr  6 2002 14:45:34
  @INC:
/usr/perl5/5.6.1/lib/sun4-solaris-64int
/usr/perl5/5.6.1/lib
/usr/perl5/site_perl/5.6.1/sun4-solaris-64int
/usr/perl5/site_perl/5.6.1
/usr/perl5/site_perl
/usr/perl5/vendor_perl/5.6.1/sun4-solaris-64int
/usr/perl5/vendor_perl/5.6.1
/usr/perl5/vendor_perl
.

Any thoughts will be appreciated.-


Kind Regards.
  _  

Pablo Jejcic
Smartweb Senior system Administrator
School of Computing - Robert Gordon University
[EMAIL PROTECTED]
T:44-(0)1224-262797
F:44-(0)1224-262790 
  _  


``The nice thing about standards is that there are so many to choose from.
And if you really don't like all the standards you just have to wait another
year until the one arises you are looking for.'' 
A. Tanenbaum, ``Introduction to Computer Networks'

  _  



-Original 

RE: mod_perl 2 apache::session and or die

2003-02-21 Thread Chris Faust
Thanks Perrin,

I've been trying to use Apache::DB to track down the problem, but I'm not
having a lot of luck.

I think it is in the locking as if I let things hang long enough and then
shut down Apache, I get a error of:

Can't call method disconnect on an undefined value at
/usr/lib/perl5/site_perl/5.6.1/Apache/Session/Lock/MySQL.pm line 89 during
global destruction.

Which is Apache::Session::Lock:MySQL

I'm still no closer as to figuring out why though.

-Chris

 -Original Message-
 From: Perrin Harkins [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, February 19, 2003 11:55 AM
 To: Chris Faust
 Cc: Modperl
 Subject: Re: mod_perl 2 apache::session and or die


 Chris Faust wrote:
  All works well except when there is any kind of problem in the
 script where
  the condition will die..
 [...]
  When this happens everything to do with that script is
 unresponsive - I know
  that is a little vague but that is the best way I can describe it. What
  happens is the error comes up (standard server error) and that
 is the last
  thing that is logged, if you try to go back and refresh the
 hourglass will
  go for hours and nothing happens and nothing is ever logged

 It sounds like a locking problem to me.  I'm guessing that mod_perl 2 is
 not calling the right hooks when it traps a die() to trigger the DESTROY
 method in Apache::Session which releases all locks.  You can find out
 exactly what's going on if you run it in the debugger (Apache::DB) or
 throw some debug logging into Apache::Session to find out where it gets
 stuck.  This is the beauty of having the source code.

 - Perrin






Re: mod_perl2 apache::requestrec and imagemagick.pm

2003-02-21 Thread Brendon Anderson
Thanks for the quick reply.

I'm not a perl person... what/where is startup.pl?

 Nick Tonkin [EMAIL PROTECTED] 02/21/03 09:42AM 
On Fri, 21 Feb 2003, Brendon Anderson wrote:

 Apache 2.0.44
 Perl 5.8.0
 mod_perl 1.99_08
 ImageMagick 5.4.7-5
 ImageMagick-perl 5.4.7-5
 Apache-ImageMagick 2.0b7

 I would like to be able to use the PerlMagick package to automatically convert a 
.tif image to a .jpg image like you can at the website located at: 
http://modperl.com:9000/examples/chapter4/Apache::Magick.html 

 When I try to do this on my setup by going to 
http://192.168.100.15/images/example.jpg (where example.jpg is really example.tif), I 
get the following error in my apache error_log:

 [Fri Feb 21 09:19:56 2003] [error] [client 192.168.100.128] Can't locate object 
method args via package Apache::RequestRec at 
/usr/lib/perl5/site_perl/5.8.0/Apache/ImageMagick.pm line 256.

 I believe Apache::RequestRec is part of the mod_perl package.

You are right about that. The error is a little ambiguous but what it
means I think is that you haven't loaded Apache::RequestRec. try putting
it in your startup.pl, then it will be available to all modules.

Also note that $r-args does not behave as it did in mp1 ... it
simplyreturns a string that you would need to parse yourself (where it
used to return an array if called in array context) ... see
http://perl.apache.org/docs/2.0/user/compat/compat.html#C__r_E_gt_args__in_an_Array_Context
 
for more information.

- nick

-- 


Nick Tonkin   {|8^)





Re: mp2: any recommendations for template systems yet?

2003-02-21 Thread Udlei Nattis
you can use Ananke::Template

is one version of template::toolkit but very very very very fast

[]s

nattis

Josh Chamas wrote:

Perrin Harkins wrote:

On Thu, 2003-02-20 at 22:27, Carl Brewer wrote:

Do any of you have any recommendations for template systems with
mp2?  Not of the religious kind (!) but more on the lines
of what's working with mp2 at the moment?


Everything that doesn't make mod_perl API calls should work without
changes.  That means HTML::Template, Template Toolkit, Text::Template,
CGI::FastTemplate, etc.

Without wishing to start anything religious ... any suggestions
for a template system that handles sessions?


Apache::ASP, Embperl, and Mason all have session support integrated
now.  I can't vouch for their stability on mp2 yet though.
AFAIK, Apache::ASP v2.51 is working correctly on mp2 without any
special installation or configuration.
As a separate issue, but also interesting, users are reporting
success with running Apache::ASP under SpeedyCGI also which speaks
well towards its portability.
Regards,

Josh


Josh Chamas, Founder   phone:925-552-0128
Chamas Enterprises Inc.http://www.chamas.com
NodeWorks Link Checkinghttp://www.nodeworks.com






Preloading DBI crashes Apache

2003-02-21 Thread Dan Brosemer
Hi.  I'm new here, and hoping someone can help me.  I've installed the
latest -current version of OpenBSD, and loaded mod_perl as a DSO.  That gets
me Apache 1.3.27, Perl 5.8.0, and mod_perl 1.27.

Apache starts fine, but when I try to access any script that does
DBI-connect(...), it generates a segfault:

[Thu Feb 20 14:52:09 2003] [notice] child pid 29135 exit signal Segmentation fault (11)

This happens with DBI versions 1.28, 1.30, and 1.32.  It happens when DBI is
in Pure Perl mode or in XS mode with DBD::mysql, DBD::mysqlPP, DBD::Pg, and
DBD::PgPP.

It only happens when DBI is pulled in at server startup, though.  Either
through 'PerlModule DBI' or 'perlrequire startup.perl' and 'use DBI' in
startup.perl.  I can load other modules (like CGI.pm) at server startup just
fine.

The same thing happens if I use 'PerlModule SomethingElse' where
SomethingElse has a 'use DBI' in it.

I'm at my wit's end, so any help would be greatly appreciated.  I've pased a
backtrace from 'httpd -X' and the script I've been using to test.

Thanks in advance for any help.

-Dan


These are taken using DBD::mysql.  I'd be happy to provide backtraces using
other modules if they'd be useful to someone debugging.

before loading sharedlibrary symbols:

(gdb) bt
#0  0x403ea000 in ?? () from 
/usr/local/libdata/perl5/site_perl/i386-openbsd/auto/DBD/mysql/mysql.so
#1  0x40337fe5 in ?? () from /usr/lib/libperl.so.8.0
#2  0x40380041 in ?? () from /usr/lib/libperl.so.8.0
#3  0x403627d0 in ?? () from /usr/lib/libperl.so.8.0
#4  0x4036255a in ?? () from /usr/lib/libperl.so.8.0
#5  0x402b4ada in ?? () from /usr/lib/apache/modules/mod_perl.so
#6  0x402b3e8d in ?? () from /usr/lib/apache/modules/mod_perl.so
#7  0x402b1a2b in ?? () from /usr/lib/apache/modules/mod_perl.so
#8  0x49ca1 in ap_invoke_handler (r=0x6c5034) at http_config.c:520
#9  0x69d4c in process_request_internal (r=0x6c5034) at http_request.c:1308
#10 0x69db6 in ap_process_request (r=0x6c5034) at http_request.c:1324
#11 0x5c88b in child_main (child_num_arg=0) at http_main.c:4708
#12 0x5cab1 in make_child (s=0xd3034, slot=0, now=1045861707) at http_main.c:4832
#13 0x5cc2a in startup_children (number_to_start=20) at http_main.c:4914
#14 0x5d8a4 in standalone_main (argc=2, argv=0xcfbfd838) at http_main.c:5272
#15 0x5e298 in main (argc=2, argv=0xcfbfd838) at http_main.c:5639

and after

(gdb) bt
#0  0x403ea000 in end ()
#1  0x403f5d1d in boot_DBD__mysql (cv=0x704354) at mysql.xsi:18
#2  0x40337fe5 in Perl_pp_entersub ()
#3  0x40380041 in Perl_runops_standard ()
#4  0x403627d0 in Perl_call_sv ()
#5  0x4036255a in Perl_call_sv ()
#6  0x402b4ada in perl_call_handler (sv=0x28615c, r=0x6c5034, args=0x0) at 
mod_perl.c:1658
#7  0x402b3e8d in perl_run_stacked_handlers (hook=0x402af439 PerlHandler, 
r=0x6c5034, handlers=0x284b9c) at mod_perl.c:1371
#8  0x402b1a2b in perl_handler (r=0x6c5034) at mod_perl.c:897
#9  0x49ca1 in ap_invoke_handler (r=0x6c5034) at http_config.c:520
#10 0x69d4c in process_request_internal (r=0x6c5034) at http_request.c:1308
#11 0x69db6 in ap_process_request (r=0x6c5034) at http_request.c:1324
#12 0x5c88b in child_main (child_num_arg=0) at http_main.c:4708
#13 0x5cab1 in make_child (s=0xd3034, slot=0, now=1045861707) at http_main.c:4832
#14 0x5cc2a in startup_children (number_to_start=20) at http_main.c:4914
#15 0x5d8a4 in standalone_main (argc=2, argv=0xcfbfd838) at http_main.c:5272
#16 0x5e298 in main (argc=2, argv=0xcfbfd838) at http_main.c:5639


#!/usr/bin/perl -w

use CGI;
use DBI;

use lib '/var/www/localsettings';
use Settings;

my $cgi = new CGI;
my $dbh = DBI-connect(Settings::dbconnect);

print $cgi-header;

print EOT;
htmlheadtitlefoo/titlebodyConnected/body/html
EOT

exit 0;

-- 
Burnished gallows set with red
 Caress the fevered, empty mind
 Of man who hangs bloodied and blind
 To reach for wisdom, not for bread.  -- Deoridhe Grimsdaughter


Re: mp2: any recommendations for template systems yet?

2003-02-21 Thread Perrin Harkins
On Fri, 2003-02-21 at 16:10, Udlei Nattis wrote:
 you can use Ananke::Template
 
 is one version of template::toolkit but very very very very fast

I wouldn't really call it a version of Template Toolkit.  It's much more
like HTML::Template: a very streamlined templating tool with an
intentionally limited mini-language.  The mini-language used looks like
Template Toolkit but is functionally equivalent to HTML::Template.

Template Toolkit has many other features and a much more extensive
mini-language, which is presumably why someone would choose to use it. 
Ananke::Template would be more appropriate for someone whose needs are
met by HTML::Template but who prefers the look of the TT tags.

- Perrin



Re: Apologize

2003-02-21 Thread Doran Barton
Not long ago, Franck PORCHER proclaimed...
 Democratic ideas should be able to be discussed, argued upon, and of
 course opposed diplomatically.

Sure, but your message is not topical for this mailing list. Hell, THIS
message -- my message -- isn't on-topic, but it is a plea for adherance to
rules of netiquette so it's not completely inappropriate.

I'll keep this short. Please review some good sources of netiquette before
spreading your off-topic rhetoric. Here's one:

   http://www.sherlockat.com/list_netiquette.html  

-=Fozz

-- 
Doran L. Barton [EMAIL PROTECTED] - President/CSH - Iodynamics LLC
http://www.iodynamics.com/ - Network consulting, development, and Linux
 Any assistance? We can help you with our pleasure.
-- Sign above elevator in Japan


Re: [mp1] Alternative for CHECK

2003-02-21 Thread David Wheeler
On Thursday, February 20, 2003, at 10:51  PM, Stas Bekman wrote:

Why not? Use a separate module to drive the others?

package My::PostConfig;

BEGIN {
  # whatever needs to be done for other modules
}
1;
startup.pl:
---
use My::PostConfig
Excellent point, and a quick experiment on my end shows that this does 
do what I need. I have two different modules to be loaded for this 
project, so I just make sure that one loads after the other does, and 
it all works.

Thanks for the nudge, Stas, it was just what I needed.

Regards,

David

--
David Wheeler AIM: dwTheory
[EMAIL PROTECTED]  ICQ: 15726394
   Yahoo!: dew7e
   Jabber: [EMAIL PROTECTED]
Kineticode. Setting knowledge in motion.[sm]