Re: File uploading?

2000-03-30 Thread Matt Sergeant

On Wed, 29 Mar 2000, Frank Wiles wrote:

>  Hello Everyone, 
> 
>  I've been beating my head up against file uploading via the browser, in
>  mod_perl.  The example in the Eagle book doesn't seem to be working for
>  me. This is the latest error I'm getting: 
> 
>   [Wed Mar 29 20:36:07 2000] [error] Can't locate object method "new"
>   via package "Apache::Request" at /usr/local/apache/mod_perl/Upload.pm
>   line 6.
> 
>  I was wondering if someone could point me to a quick and dirty Upload
>  module so I can figure out what is wrong. 
> 
>  P.S. Apache::Request is installed, but doesn't seem to contain a new 
>  subroutine. 

It does have a new method, but you probably just missed out the:

use Apache::Request;

line.

-- 


Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org http://xml.sergeant.org




Problem Compiling with Perl 5.6.0

2000-03-30 Thread Steve Hay

Since I had no reply to my previous problem (re-directing STDOUT in
system() calls), I thought I would try using Perl 5.6.0 instead of
5.005_03 (probably a good idea anyway) to see if that helped.

Unfortunately, now I can't get (the Apache side of) mod_perl to compile.

I'm using MSVC++ 6.0 on Windows NT 4.  Perl 5.6.0 and Apache 1.3.12
compiled fine, as does the Perl side of mod_perl 1.22, but when I go
into Dev Studio to compile the Apache side I get the following output
for each file:

D:\Temp\apache_1.3.12\src\include\../os/win32/os.h(87) : warning C4005:
'crypt' : macro redefinition
D:\perl5\lib\CORE\win32iop.h(301) : see previous definition of
'crypt'
D:\Temp\apache_1.3.12\src\include\../os/win32/os.h(109) : warning C4142:
benign redefinition of type
D:\Temp\apache_1.3.12\src\include\../os/win32/os.h(110) : warning C4142:
benign redefinition of type
D:\Temp\apache_1.3.12\src\include\../os/win32/os.h(112) : error C2371:
'mode_t' : redefinition; different basic types
D:\perl5\lib\CORE\win32.h(197) : see declaration of 'mode_t'
D:\Temp\apache_1.3.12\src\include\../os/win32/os.h(146) : warning C4005:
'sleep' : macro redefinition
D:\perl5\lib\CORE\win32iop.h(279) : see previous definition of
'sleep'
D:\Program Files\Microsoft Visual Studio\VC98\Include\stddef.h(78) :
warning C4005: 'errno' : macro redefinition
D:\perl5\lib\CORE\win32iop.h(188) : see previous definition of
'errno'
D:\Temp\apache_1.3.12\src\include\../os/win32/os.h(165) : warning C4005:
'stat' : macro redefinition
D:\perl5\lib\CORE\win32iop.h(223) : see previous definition of
'stat'
D:\Temp\apache_1.3.12\src\include\../os/win32/readdir.h(34) : error
C2373: 'win32_opendir' : redefinition; different type modifiers
D:\perl5\lib\CORE\win32iop.h(116) : see declaration of
'win32_opendir'
D:\Temp\apache_1.3.12\src\include\../os/win32/readdir.h(35) : error
C2373: 'win32_readdir' : redefinition; different type modifiers
D:\perl5\lib\CORE\win32iop.h(117) : see declaration of
'win32_readdir'
D:\Temp\apache_1.3.12\src\include\../os/win32/readdir.h(36) : error
C2373: 'win32_closedir' : redefinition; different type modifiers
D:\perl5\lib\CORE\win32iop.h(121) : see declaration of
'win32_closedir'

Any ideas, anyone?

Has anyone else got 5.6.0 / 1.3.12 / 1.22 going on NT 4?


Steve Hay





Apache::Session::DBI

2000-03-30 Thread yoav

Hi,

I'm trying to use Apache::Session::DBI. I got the hang of it and 
started using it but I get the following error:

[Thu Mar 30 04:41:41 2000] [error] Can't call method "store" on 
unblessed reference at lib/web/webmaster.p
l line 54.

Now, lines 49-54 on lib/web/webmaster.pl look like this (I added line 
numbers):

49 sub carry_on {
50 my $htdocs_dir = $SETUP::htdocs_dir;
51 my $p = $$query->param('p'); #which page user selected
52 my $do = $$query->param('do'); #which page user selected
53 $session->{'already_reged'} = 1; #so user can't submit this form 
ever again!
54 $session->store();
...
}

Alot of other stuff come after this but it doesn't really matter :)

Anyway, there's another routine, called main, that creates a session 
and then calls carry_on. Here's the routine with the two lines that 
come before it:

package WEBMASTER;
use strict;
sub main {
use vars qw($query $sid $session %session); #making these variables 
global
local $query = \$MAIN::query;

local ($sid,$session,%session); #session stuff
my ($rc,$adv); #recommender, advertiser

if (!$$query->param('sid'))
{
#make a fresh session for a first-time visitor
my $opts = {'subclass-specific' => 'option overrides',  'autocommit' 
=> '0', 'lifetime' => $SETUP::default_session_timeout};
$session = Apache::Session::DBI->new($opts);
tie %session, 'Apache::Session::DBI', undef;

#define variables
$sid = $session->{'_ID'};
$rc = $$query->param('rc'); #recommender
$adv = $$query->param('adv'); #advertiser
#add to object
$session->{'rc'} = $$query->param('rc');
$session->{'adv'} = $$query->param('adv');
$session->store();
}
else
{
#get the session data for a returned visitor
$sid = $$query->param('sid');
$session = Apache::Session::DBI->open($sid);
tie %session, 'Apache::Session::DBI', $sid;
#checking if session has timed-out
$rc = $session->{'rc'}; #recommender
$adv = $session->{'adv'}; #advertiser
}
&carry_on();
}

Well, this is about all of it. :)

If I take off those two lines everything is working fine and the 
sessions is added to the database.

Here's the complete error message from the error_log:

Session manager opening persistent connection at 
/usr/local/lib/site_perl/Apache/Session/DBI.pm line 40.
Apache::Session::DBI::init_connection() called at 
/usr/local/lib/site_perl/Apache/Session/DBI.pm l
ine 206
Apache::Session::DBI::fetch('Apache::Session::DBI', 
'351d62cfe6f5895f') called at /usr/local/lib/s
ite_perl/Apache/Session.pm line 61
Apache::Session::open('Apache::Session::DBI', 
'351d62cfe6f5895f') called at lib/web/webmaster.pl l
ine 40
WEBMASTER::main called at (eval 34) line 88
Apache::ROOT::index_2epl::handler('Apache=SCALAR(0x82c6c78)') 
called at /usr/local/lib/site_perl/A
pache/Registry.pm line 135
eval {...} called at 
/usr/local/lib/site_perl/Apache/Registry.pm line 135
Apache::Registry::handler('Apache=SCALAR(0x82c6c78)') called 
at lib/web/printing.pl line 0
eval {...} called at lib/web/printing.pl line 0
[Thu Mar 30 04:41:41 2000] [error] Can't call method "store" on 
unblessed reference at lib/web/webmaster.p
l line 54.




[install warnings] apxs

2000-03-30 Thread Stas Bekman

Hi,

While doing a simple:
perl Makefile.PL DO_HTTPD=1 APACHE_SRC=../apache_1.3.12/src

for each Makefile.PL in all subdirs I get:

which: no apxs in (.:/usr/bin:/bin [snipped])
apxs:Error: Sorry, no DSO support for Apache available
apxs:Error: under your platform. Make sure the Apache
apxs:Error: module mod_so is compiled into your server
apxs:Error: binary `/usr/local/apache/bin/httpd'.

which is triggered by $src->inc in:

WriteMakefile(
NAME=> "Apache",
VERSION_FROM => "Apache.pm",
'INC'   => $src->inc,
'TYPEMAPS'  => $src->typemaps,
);

in each Makefile.PL in subdirs

Which [$src->inc] in turn calls Apache::src::apxs

Well, these are just two warnings.

1. 
which: no apxs in (.:/usr/bin:/bin)

says that I don't have apxs in the path.

2.
apxs:Error: Sorry, no DSO support for Apache available
apxs:Error: under your platform. Make sure the Apache
apxs:Error: module mod_so is compiled into your server
apxs:Error: binary `/usr/local/apache/bin/httpd'.

I happen to have /usr/local/apache/bin/apxs, which triggers the latter.

Anyway why should the Apache::src::apxs method to be called when I don't
need APXS?

[os: linux RH6.1 perl 5.003 mod_perl-1.22 apache-1.3.12]

__
Stas Bekman | JAm_pH--Just Another mod_perl Hacker
http://stason.org/  | mod_perl Guide http://perl.apache.org/guide/ 
mailto:[EMAIL PROTECTED]  | http://perl.orghttp://stason.org/TULARC/
http://singlesheaven.com| http://perlmonth.com http://sourcegarden.org
--




Re: Problem Compiling with Perl 5.6.0

2000-03-30 Thread Steve Hay

"G.W. Haywood" wrote:

> Come to think of it, NT probably wasn't the best idea you ever had
> either.

I agree, but we're selling a web application and most of our customers
want it on NT.

> > Unfortunately, now I can't get (the Apache side of) mod_perl to
> > compile.
>
> You aren't alone.  You really are on the bleeding edge with that lot.
> My advice would be ro try Linux, and stick with Perl 5.005_03 and
> mod_perl 1.21/Apache 1.3.11 (or .12) for a few weeks.

Well, I got mod_perl 1.22 going on NT with Perl 5.005_03 / Apache 1.3.12
(apart from the problem with system() calls...) after two quick hacks (one
to lib\Apache\src.pm and one to src\modules\perl\Util.xs) so it just seems
a shame I can't get it to go with Perl 5.6.0.  I just wondered if anyone
out there new of any more hacks to help...





[make test warns] mod_perl/mod_ssl

2000-03-30 Thread Stas Bekman

It seems that mod_ssl obsoletes gcache (see
http://www.modssl.org/source/exp/mod_ssl/pkg.mod_ssl/CHANGES) 

Therefore 'make test' warns when starting the test server:

will write error_log to: t/logs/error_log
letting apache warm up...\c
[Thu Mar 30 14:46:51 2000] [warn] mod_ssl:Compat: OBSOLETE
'SSLCacheServerPath /tmp' => Use SSLSessionCache instead
[Thu Mar 30 14:46:51 2000] [warn] mod_ssl:Compat: OBSOLETE
'SSLCacheServerPort /tmp/gcache_port' => Use SSLSessionCache instead
done

httpd.conf should have:


SSLDisable
SSLSessionCache none


or alike, instead of:


SSLDisable
SSLCacheServerPath /tmp
SSLCacheServerPort /tmp/gcache_port


to avoid these warnings.

[os: linux RH6.1 perl 5.003 mod_perl-1.22 apache-1.3.12
mod_ssl-2.6.2-1.3.12 openssl-0.9.5]


__
Stas Bekman | JAm_pH--Just Another mod_perl Hacker
http://stason.org/  | mod_perl Guide http://perl.apache.org/guide/ 
mailto:[EMAIL PROTECTED]  | http://perl.orghttp://stason.org/TULARC/
http://singlesheaven.com| http://perlmonth.com http://sourcegarden.org
--






Re: loading of mod_perl

2000-03-30 Thread Randy Kobes

On Thu, 30 Mar 2000, shang wrote:

> Randy:
> 
> Thanks  for replying my message.
> 
> First of all, my Perl os working and I can run some perl program in cgi-bin
> directory from browser.  The c:\perl\bin is of course in the path.
> 
> My Perl version is : v5.6.0 built for MSWin32-x86-multi-thread.
> Apache version is the lastest 1_3_12 (Win32) and
> Mod_perl is 'mod_perl-1.16-bin-bindist1-i386-win32-vc5',  which is compiled
> by Viusal C++ 5.0.  This is the only Win32 version of mod_perl I can find.
> I download the mod_perl from CPAN in the author directory of
> /Jeffrey_Baker/.  I did not do any compilation at all.
> 
> I need more suggestion from you or it is not a good idea to run the server
> on Win98.
> 
Hi,
I don't think this combination will work - the mod_perl
binary you refer to uses an earlier apache, and things have
changed since then. Plus, it's not clear, at least to me, if
the newest ActiveState Perl, based on 5.6.0, can work together
without modifications - it is known that mod_perl-1.22 needs
some changes to compile on Win32 with Perl-5.6.0. You could
go to http://perl.apache.org/ and try the Win32 binary mentioned
there - it includes Perl(5.005_03)+apache+mod_perl, and is
known to work on Win9x as well as NT. As soon as some issues
involving mod_perl and Perl-5.6.0 are worked out, I'll make
up a newer binary with the later versions of things.

best regards,
randy kobes
 




Re: [install warnings] apxs

2000-03-30 Thread Oleg Bartunov

Stas,

this is fixed in current modperl CVS,

"Apache::src::apxs fixups to quiet warnings if apxs doesnt exist or
httpd is not dso enabled, thanks to Oleg Bartunov and Ville Skyttä for 
spotting"


Regards,

Oleg
On Thu, 30 Mar 2000, Stas Bekman wrote:

> Date: Thu, 30 Mar 2000 14:19:12 +0200 (IST)
> From: Stas Bekman <[EMAIL PROTECTED]>
> To: mod_perl list <[EMAIL PROTECTED]>
> Subject: [install warnings] apxs
> 
> Hi,
> 
> While doing a simple:
> perl Makefile.PL DO_HTTPD=1 APACHE_SRC=../apache_1.3.12/src
> 
> for each Makefile.PL in all subdirs I get:
> 
> which: no apxs in (.:/usr/bin:/bin [snipped])
> apxs:Error: Sorry, no DSO support for Apache available
> apxs:Error: under your platform. Make sure the Apache
> apxs:Error: module mod_so is compiled into your server
> apxs:Error: binary `/usr/local/apache/bin/httpd'.
> 
> which is triggered by $src->inc in:
> 
> WriteMakefile(
> NAME  => "Apache",
> VERSION_FROM => "Apache.pm",
> 'INC' => $src->inc,
> 'TYPEMAPS'  => $src->typemaps,
> );
> 
> in each Makefile.PL in subdirs
> 
> Which [$src->inc] in turn calls Apache::src::apxs
> 
> Well, these are just two warnings.
> 
> 1. 
> which: no apxs in (.:/usr/bin:/bin)
> 
> says that I don't have apxs in the path.
> 
> 2.
> apxs:Error: Sorry, no DSO support for Apache available
> apxs:Error: under your platform. Make sure the Apache
> apxs:Error: module mod_so is compiled into your server
> apxs:Error: binary `/usr/local/apache/bin/httpd'.
> 
> I happen to have /usr/local/apache/bin/apxs, which triggers the latter.
> 
> Anyway why should the Apache::src::apxs method to be called when I don't
> need APXS?
> 
> [os: linux RH6.1 perl 5.003 mod_perl-1.22 apache-1.3.12]
> 
> __
> Stas Bekman | JAm_pH--Just Another mod_perl Hacker
> http://stason.org/  | mod_perl Guide http://perl.apache.org/guide/ 
> mailto:[EMAIL PROTECTED]  | http://perl.orghttp://stason.org/TULARC/
> http://singlesheaven.com| http://perlmonth.com http://sourcegarden.org
> --
> 

_
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: [EMAIL PROTECTED], http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83




Re: Problem Compiling with Perl 5.6.0

2000-03-30 Thread G.W. Haywood

Hi there,

On Thu, 30 Mar 2000, Steve Hay wrote:

> seems a shame I can't get it to go with Perl 5.6.0.  I just wondered
> if anyone out there new of any more hacks to help...

Search the mod_perl List archive for 5.6.0?  Most of it will be about
it not working with something or other.  After all, it's hardly been
out a week yet...

73,
Ged.





Re: Problem Compiling with Perl 5.6.0

2000-03-30 Thread Randy Kobes

On Thu, 30 Mar 2000, Steve Hay wrote:

> Since I had no reply to my previous problem (re-directing STDOUT in
> system() calls), I thought I would try using Perl 5.6.0 instead of
> 5.005_03 (probably a good idea anyway) to see if that helped.
> 
> Unfortunately, now I can't get (the Apache side of) mod_perl to compile.
> 
> I'm using MSVC++ 6.0 on Windows NT 4.  Perl 5.6.0 and Apache 1.3.12
> compiled fine, as does the Perl side of mod_perl 1.22, but when I go
> into Dev Studio to compile the Apache side I get the following output
> for each file:
> 
> D:\Temp\apache_1.3.12\src\include\../os/win32/os.h(87) : warning C4005:
> 'crypt' : macro redefinition
> D:\perl5\lib\CORE\win32iop.h(301) : see previous definition of
> 'crypt'
> D:\Temp\apache_1.3.12\src\include\../os/win32/os.h(109) : warning C4142:
> benign redefinition of type
> D:\Temp\apache_1.3.12\src\include\../os/win32/os.h(110) : warning C4142:
> benign redefinition of type
> D:\Temp\apache_1.3.12\src\include\../os/win32/os.h(112) : error C2371:
> 'mode_t' : redefinition; different basic types
> D:\perl5\lib\CORE\win32.h(197) : see declaration of 'mode_t'
> D:\Temp\apache_1.3.12\src\include\../os/win32/os.h(146) : warning C4005:
> 'sleep' : macro redefinition
> D:\perl5\lib\CORE\win32iop.h(279) : see previous definition of
> 'sleep'
> D:\Program Files\Microsoft Visual Studio\VC98\Include\stddef.h(78) :
> warning C4005: 'errno' : macro redefinition
> D:\perl5\lib\CORE\win32iop.h(188) : see previous definition of
> 'errno'
> D:\Temp\apache_1.3.12\src\include\../os/win32/os.h(165) : warning C4005:
> 'stat' : macro redefinition
> D:\perl5\lib\CORE\win32iop.h(223) : see previous definition of
> 'stat'
> D:\Temp\apache_1.3.12\src\include\../os/win32/readdir.h(34) : error
> C2373: 'win32_opendir' : redefinition; different type modifiers
> D:\perl5\lib\CORE\win32iop.h(116) : see declaration of
> 'win32_opendir'
> D:\Temp\apache_1.3.12\src\include\../os/win32/readdir.h(35) : error
> C2373: 'win32_readdir' : redefinition; different type modifiers
> D:\perl5\lib\CORE\win32iop.h(117) : see declaration of
> 'win32_readdir'
> D:\Temp\apache_1.3.12\src\include\../os/win32/readdir.h(36) : error
> C2373: 'win32_closedir' : redefinition; different type modifiers
> D:\perl5\lib\CORE\win32iop.h(121) : see declaration of
> 'win32_closedir'
> 
> Any ideas, anyone?
> 
> Has anyone else got 5.6.0 / 1.3.12 / 1.22 going on NT 4?

Hi,
 There's a couple things you can do -

- add the flag /D "WIN32IOP_H" - this handles the win32_opendir
and similar errors.
- for the mode_t error, in apache/src/os/win32/os.h, change
the typedef of mode_t from 'int' to 'unsigned short', so as
to agree with the mode_t typedef of perl in perl/lib/core/win32.h.
In the same apache os.h file, if you change the typedef of
uid_t and gid_t from 'int' to 'long', again so as to agree
with Perl's typedefs, then the compilation, at least for me,
proceeeds without warnings.

Unfortunately, there's some problems in the linking phase - some
symbols that were present in perl.lib of 5.005_03 have been
removed from perl56.lib of 5.6.0. Doug has worked on this - you
may want to get the latest mod_perl cvs snapshot from
http://perl.apache.org/ and try that.

best regards,
randy kobes





Re: Apache::Session::DBI

2000-03-30 Thread Jeffrey W. Baker

On Thu, 30 Mar 2000 [EMAIL PROTECTED] wrote:

> Hi,
> 
> I'm trying to use Apache::Session::DBI. I got the hang of it and 
> started using it but I get the following error:
> 
> [Thu Mar 30 04:41:41 2000] [error] Can't call method "store" on 
> unblessed reference at lib/web/webmaster.p
> l line 54.
> 
> Now, lines 49-54 on lib/web/webmaster.pl look like this (I added line 
> numbers):
> 
> 49 sub carry_on {
> 50 my $htdocs_dir = $SETUP::htdocs_dir;
> 51 my $p = $$query->param('p'); #which page user selected
> 52 my $do = $$query->param('do'); #which page user selected
> 53 $session->{'already_reged'} = 1; #so user can't submit this form 
> ever again!
> 54 $session->store();
> ...
> }

Looks like you are using an ancient version of Apache::Session.  I
recommend upgrading to 1.0x.  Even I don't remember how to use the old
0.1x version.

-jwb



> 
> Alot of other stuff come after this but it doesn't really matter :)
> 
> Anyway, there's another routine, called main, that creates a session 
> and then calls carry_on. Here's the routine with the two lines that 
> come before it:
> 
> package WEBMASTER;
> use strict;
> sub main {
> use vars qw($query $sid $session %session); #making these variables 
> global
> local $query = \$MAIN::query;
> 
> local ($sid,$session,%session); #session stuff
> my ($rc,$adv); #recommender, advertiser
> 
> if (!$$query->param('sid'))
>   {
>   #make a fresh session for a first-time visitor
>   my $opts = {'subclass-specific' => 'option overrides',  'autocommit' 
> => '0', 'lifetime' => $SETUP::default_session_timeout};
>   $session = Apache::Session::DBI->new($opts);
>   tie %session, 'Apache::Session::DBI', undef;
> 
>   #define variables
>   $sid = $session->{'_ID'};
>   $rc = $$query->param('rc'); #recommender
>   $adv = $$query->param('adv'); #advertiser
>   #add to object
>   $session->{'rc'} = $$query->param('rc');
>   $session->{'adv'} = $$query->param('adv');
>   $session->store();
>   }
> else
>   {
>   #get the session data for a returned visitor
>   $sid = $$query->param('sid');
>   $session = Apache::Session::DBI->open($sid);
>   tie %session, 'Apache::Session::DBI', $sid;
>   #checking if session has timed-out
>   $rc = $session->{'rc'}; #recommender
>   $adv = $session->{'adv'}; #advertiser
>   }
> &carry_on();
> }
> 
> Well, this is about all of it. :)
> 
> If I take off those two lines everything is working fine and the 
> sessions is added to the database.
> 
> Here's the complete error message from the error_log:
> 
> Session manager opening persistent connection at 
> /usr/local/lib/site_perl/Apache/Session/DBI.pm line 40.
> Apache::Session::DBI::init_connection() called at 
> /usr/local/lib/site_perl/Apache/Session/DBI.pm l
> ine 206
> Apache::Session::DBI::fetch('Apache::Session::DBI', 
> '351d62cfe6f5895f') called at /usr/local/lib/s
> ite_perl/Apache/Session.pm line 61
> Apache::Session::open('Apache::Session::DBI', 
> '351d62cfe6f5895f') called at lib/web/webmaster.pl l
> ine 40
> WEBMASTER::main called at (eval 34) line 88
> Apache::ROOT::index_2epl::handler('Apache=SCALAR(0x82c6c78)') 
> called at /usr/local/lib/site_perl/A
> pache/Registry.pm line 135
> eval {...} called at 
> /usr/local/lib/site_perl/Apache/Registry.pm line 135
> Apache::Registry::handler('Apache=SCALAR(0x82c6c78)') called 
> at lib/web/printing.pl line 0
> eval {...} called at lib/web/printing.pl line 0
> [Thu Mar 30 04:41:41 2000] [error] Can't call method "store" on 
> unblessed reference at lib/web/webmaster.p
> l line 54.
> 
> 




Re: Problem Compiling with Perl 5.6.0

2000-03-30 Thread Steve Hay

Thanks for this!

I tried it with the latest mod_perl cvs: mine now compiles perfectly too
(_never_ seen that before!!!), and there's now only 1 unresolved external
symbol instead of 7.  Looks like it could be nearly there - I'll try another
one some time.

I look forward to mod_perl 1.23 ...

Steve Hay


Randy Kobes wrote:

> On Thu, 30 Mar 2000, Steve Hay wrote:
>
> > Has anyone else got 5.6.0 / 1.3.12 / 1.22 going on NT 4?
>
> Hi,
>  There's a couple things you can do -
>
> - add the flag /D "WIN32IOP_H" - this handles the win32_opendir
> and similar errors.
> - for the mode_t error, in apache/src/os/win32/os.h, change
> the typedef of mode_t from 'int' to 'unsigned short', so as
> to agree with the mode_t typedef of perl in perl/lib/core/win32.h.
> In the same apache os.h file, if you change the typedef of
> uid_t and gid_t from 'int' to 'long', again so as to agree
> with Perl's typedefs, then the compilation, at least for me,
> proceeeds without warnings.
>
> Unfortunately, there's some problems in the linking phase - some
> symbols that were present in perl.lib of 5.005_03 have been
> removed from perl56.lib of 5.6.0. Doug has worked on this - you
> may want to get the latest mod_perl cvs snapshot from
> http://perl.apache.org/ and try that.




Compiling dynamic-loading perl on Solaris 7

2000-03-30 Thread Jeremy Wilson

I tried to find a general mailing list for perl, and I searched Deja and
www.perl.com, and I found nothing, so I thought I'd try this mailing list.

I have an E450 with Solaris 7 on it, on which I am trying to compile
perl5.005_03.  If I try to compile using all default settings, I get the
following during the make test:

lib/anydbm.FAILED at test 0
lib/dumper.FAILED at test 52
lib/io_taint...FAILED at test 0
lib/io_tellFAILED at test 0
lib/io_xs..FAILED at test 0
lib/ipc_sysv...Constant subroutine  redefined at ../lib/DynaLoader.pm
line 65535.
Constant subroutine  redefined at ../lib/DynaLoader.pm line 65535.
Constant subroutine  redefined at ../lib/DynaLoader.pm line 65535.
Constant subroutine  redefined at ../lib/DynaLoader.pm line 65535.
Constant subroutine  redefined at ../lib/DynaLoader.pm line 65535.
Constant subroutine  redefined at ../lib/DynaLoader.pm line 65535.
Constant subroutine  redefined at ../lib/DynaLoader.pm line 65535.
Constant subroutine  redefined at ../lib/DynaLoader.pm line 65535.
Constant subroutine  redefined at ../lib/DynaLoader.pm line 65535.
Constant subroutine  redefined at ../lib/DynaLoader.pm line 65535.
Constant subroutine  redefined at ../lib/DynaLoader.pm line 65535.
Constant subroutine  redefined at ../lib/DynaLoader.pm line 65535.
Constant subroutine  redefined at ../lib/DynaLoader.pm line 65535.
Constant subroutine  redefined at ../lib/DynaLoader.pm line 65535.
Constant subroutine  redefined at ../lib/DynaLoader.pm line 65535.
Constant subroutine  redefined at ../lib/DynaLoader.pm line 65535.
Constant subroutine  redefined at ../lib/DynaLoader.pm line 65535.
Constant subroutine  redefined at ../lib/DynaLoader.pm line 65535.
Constant subroutine  redefined at ../lib/DynaLoader.pm line 65535.
Constant subroutine  redefined at ../lib/DynaLoader.pm line 65535.
Constant subroutine  redefined at ../lib/DynaLoader.pm line 65535.
Constant subroutine  redefined at ../lib/DynaLoader.pm line 65535.
Constant subroutine  redefined at ../lib/DynaLoader.pm line 65535.
Constant subroutine  redefined at ../lib/DynaLoader.pm line 65535.
Constant subroutine  redefined at ../lib/DynaLoader.pm line 65535.
Constant subroutine  redefined at ../lib/DynaLoader.pm line 65535.
Constant subroutine  redefined at ../lib/DynaLoader.pm line 65535.
Constant subroutine  redefined at ../lib/DynaLoader.pm line 65535.
Constant subroutine  redefined at ../lib/DynaLoader.pm line 65535.
Constant subroutine  redefined at ../lib/DynaLoader.pm line 65535.
Constant subroutine  redefined at ../lib/DynaLoader.pm line 65535.
Constant subroutine  redefined at ../lib/DynaLoader.pm line 65535.
Constant subroutine  redefined at ../lib/DynaLoader.pm line 65535.
Constant subroutine  redefined at ../lib/DynaLoader.pm line 65535.
Constant subroutine  redefined at ../lib/DynaLoader.pm line 65535.
Constant subroutine  redefined at ../lib/DynaLoader.pm line 65535.
Constant subroutine  redefined at ../lib/DynaLoader.pm line 65535.
Undefined subroutine &IPC::SysV::IPC_PRIVATE called at lib/ipc_sysv.t line 56.
FAILED at test 0
lib/ndbm...FAILED at test 0
lib/odbm...FAILED at test 0
lib/opsFAILED at test 0
lib/ph.FAILED at test 0
lib/sdbm...FAILED at test 0
lib/socket.FAILED at test 0

If I go through the config and turn dynamic loading off, it compiles and
tests fine.  It currently compiles fine but does not pass the above tests.

Can anyone offer some suggestions as to what I might do?  I tried the
pre-compiled binary from sunsite but I really need to get this to compile
on the box.

Thanks, and sorry for the off-topic post...






Re: [OT slightly] mod_perl developers (do they exist?)

2000-03-30 Thread Bakki Kudva

Hi Stas,

> > My suggestion would be to capture one of two of these tutorial sessions
on
> > audio tape(assuming employer consent), edit and sync them to a bunch of
HTML
> > slides and put the whole shebang on the Net...preferably right next to
Stas'
> > great guide. Some nifty examples of this are at...
>
> Hmm, that's what ORA did at the last Perl conference, although not with
> mod_perl talks... They have prepared the audio/video recording of the most
> popular sessions and made them available to the public. Not for free of
> course.
>
> You probably could have done the same at the ApacheCon, but it's over
> already.  Your next chance is the summer's OpenSource conference in
> Monterey and the autumn's next ApacheCon in London.

As I recall you gave the talk on mod_perl. Would you consent to have your
tutorial session recorded for this purpose? Any other organizational
permissions needed? I wonder if everything at the OpenSource conference
becomes O'Reilly's copyright.

bakki

Bakki Kudva
Navaco
(Electronic Document Management Solutions)
phone: (814) 833-2592
fax:  (603) 947-5747
http://www.navaco.com/






Re: Compiling dynamic-loading perl on Solaris 7

2000-03-30 Thread Lloyd Zusman

> I tried to find a general mailing list for perl, and I searched Deja and
> www.perl.com, and I found nothing, so I thought I'd try this mailing list.

Hello.

You may have already gotten other emails like this, but just in
case you haven't ...

You posted your question to the mailing list for a very specific
Apache module called "modperl".  It's not a generic Perl mailing list,
as it is intended only for questions and discussions concerning this
Apache module.

Yoy probably will not get very much help in the "modperl" list ... and
may very well be asked somewhat unceremoniuously to go elsewhere with
generic Perl questions because "modperl" is a heavily used list and
there is a strong desire to keep the bandwidth down.

If you haven't already, you should probably start looking in ...

  http://www.perl.com/pub/v/faqs

... for pointers as to specific Perl installation questions.  Also,
there's a usenet newsgroup called "comp.lang.perl.misc" which is the
official "home" of Perl on the net ... but the people there will
pretty much insist that you first will have perused the FAQ's before
posting a question which might have already been answered many times.

Good luck!

> [ ... ]

Sincerely,

- Lloyd

-- 
 Lloyd Zusman   [EMAIL PROTECTED]
 perl -le '$n=170;for($d=2;($d*$d)<=$n;$d+=(1+($d%2))){for($t=0;($n%$d)==0;
 $t++){$n=int($n/$d);}while($t-->0){push(@r,$d);}}if($n>1){push(@r,$n);}
 $x=0;map{$x+=(($_>0)?(1<


Segmentation Fault: RedHat 6.[01] / Apache 1.3.12 / mod_perl 1.22 / perl 5.005_03 / IE 5

2000-03-30 Thread Robert Jenks
Title: Segmentation Fault: RedHat 6.[01] / Apache 1.3.12 / mod_perl 1.22 / perl 5.005_03 / IE 5





I'm having a very strange problem.  I'm running a very large application under apache/mod_perl (100+ modules; httpd children grow to 40+MB).  The application uses Apache::DBI (DBD::Oracle) & CGI.pm, so I have it running as a handler and everything works fine except... :)

If the first request to httpd comes from IE5 to the web root, the child httpd process will segfault.  However from any other client I've tried ( Netscape Comm. and "telnet 0 80 GET /" it works fine and doesn't segfault.  Even stranger, if I point IE5 at "/perl-status?inc", and then at "/" it doesn't segfault (from that point forward it doesn't segfault; even if it hits a new child httpd).

I haven't been able to isolate the problem because I haven't been able to get apache to give me a core file.  I've tried the "ulimit -c unlimited" without success.  Any hints, RwhatFM, etc

My build script is attached. (which includes building mod_ssl, but this even happened before I added mod_ssl)


Thanks in advance...
--
Robert Jenks


-httpd.conf
ServerType standalone
ServerRoot "/Suite/apache"
PidFile /Suite/apache/logs/httpd.pid
ScoreBoardFile /Suite/apache/logs/httpd.scoreboard
ResourceConfig /dev/null
AccessConfig /dev/null
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 1
MaxSpareServers 3
StartServers 3
MaxClients 3
MaxRequestsPerChild 0
ExtendedStatus on
Port 80
User nobody
Group nobody
ServerAdmin [EMAIL PROTECTED]
ServerName server.mydomain.com
DocumentRoot /Suite/AppSites/practice

    Options FollowSymLinks
    AllowOverride None


    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all



AccessFileName .htaccess

    Order allow,deny
    Deny from all



UseCanonicalName On



    TypesConfig /Suite/apache/conf/mime.types



DefaultType text/plain



    MIMEMagicFile /Suite/apache/conf/magic



HostnameLookups Off


ErrorLog /Suite/apache/logs/error_log


LogLevel warn


LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent


CustomLog /Suite/apache/logs/access_log common
CustomLog /Suite/apache/logs/referer_log referer
CustomLog /Suite/apache/logs/agent_log agent


ServerSignature Off



    BrowserMatch "Mozilla/2" nokeepalive
    BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
    BrowserMatch "RealPlayer 4\.0" force-response-1.0
    BrowserMatch "Java/1\.0" force-response-1.0
    BrowserMatch "JDK/1\.0" force-response-1.0



PerlInitHandler Apache::StatINC
PerlSetEnv ORACLE_HOME /u01/app/oracle/product/8.1.5
PerlRequire conf/startup.pl
PerlFreshRestart On

    SetHandler perl-script
    PerlHandler Apache::Suite::Practice
    Options +ExecCGI


    SetHandler default-handler


    SetHandler default-handler


    SetHandler default-handler


    SetHandler server-status


    SetHandler perl-script
    PerlHandler Apache::Status

-httpd.conf


 <> 



 install_httpd.sh


RE: Segmentation Fault: RedHat 6.[01] / Apache 1.3.12 / mod_perl 1.22 / perl 5.005_03 / IE 5

2000-03-30 Thread Geoffrey Young
Title: Segmentation Fault: RedHat 6.[01] / Apache 1.3.12 / mod_perl 1.22 / perl 5.005_03 / IE 5



I'm not really the expert in this, but you might want 
to try removing PerlFreshRestart and Apache::StatINC from your config and see if 
that helps...
 
HTH
 
--Geoff

  -Original Message-From: Robert Jenks 
  [mailto:[EMAIL PROTECTED]]Sent: Thursday, March 30, 2000 
  11:03 AMTo: modperl (E-mail)Subject: Segmentation Fault: 
  RedHat 6.[01] / Apache 1.3.12 / mod_perl 1.22 / perl 5.005_03 / IE 
  5
  I'm having a very strange problem.  I'm 
  running a very large application under apache/mod_perl (100+ modules; httpd 
  children grow to 40+MB).  The application uses Apache::DBI (DBD::Oracle) 
  & CGI.pm, so I have it running as a handler and everything works fine 
  except... :)
  If the first request to httpd comes from IE5 to the 
  web root, the child httpd process will segfault.  However from any other 
  client I've tried ( Netscape Comm. and "telnet 0 80 GET /" it works fine and 
  doesn't segfault.  Even stranger, if I point IE5 at "/perl-status?inc", 
  and then at "/" it doesn't segfault (from that point forward it doesn't 
  segfault; even if it hits a new child httpd).
  I haven't been able to isolate the problem because 
  I haven't been able to get apache to give me a core file.  I've tried the 
  "ulimit -c unlimited" without success.  Any hints, RwhatFM, 
  etc
  My build script is attached. (which includes 
  building mod_ssl, but this even happened before I added mod_ssl) 
  Thanks in advance... -- Robert Jenks 
  -httpd.conf ServerType standalone ServerRoot "/Suite/apache" PidFile 
  /Suite/apache/logs/httpd.pid ScoreBoardFile 
  /Suite/apache/logs/httpd.scoreboard ResourceConfig /dev/null AccessConfig /dev/null Timeout 
  300 KeepAlive On MaxKeepAliveRequests 100 KeepAliveTimeout 15 MinSpareServers 
  1 MaxSpareServers 3 StartServers 3 MaxClients 
  3 MaxRequestsPerChild 0 ExtendedStatus on Port 
  80 User nobody Group nobody ServerAdmin 
  [EMAIL PROTECTED] ServerName 
  server.mydomain.com DocumentRoot 
  /Suite/AppSites/practice      Options 
  FollowSymLinks     
  AllowOverride None       Options Indexes FollowSymLinks MultiViews 
      AllowOverride None 
      Order allow,deny 
      Allow from all  
  AccessFileName .htaccess      Order allow,deny     Deny from all  
  UseCanonicalName On 
       TypesConfig 
  /Suite/apache/conf/mime.types  
  DefaultType text/plain 
       MIMEMagicFile 
  /Suite/apache/conf/magic  
  HostnameLookups Off 
  ErrorLog /Suite/apache/logs/error_log 
  LogLevel warn 
  LogFormat "%h %l %u %t \"%r\" %>s %b 
  \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %b" common LogFormat "%{Referer}i -> %U" referer LogFormat "%{User-agent}i" agent 
  CustomLog /Suite/apache/logs/access_log 
  common CustomLog 
  /Suite/apache/logs/referer_log referer CustomLog /Suite/apache/logs/agent_log agent 
  ServerSignature Off 
       BrowserMatch "Mozilla/2" 
  nokeepalive     BrowserMatch 
  "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0     BrowserMatch "RealPlayer 4\.0" 
  force-response-1.0     
  BrowserMatch "Java/1\.0" force-response-1.0     BrowserMatch "JDK/1\.0" force-response-1.0 
   
  PerlInitHandler Apache::StatINC PerlSetEnv ORACLE_HOME /u01/app/oracle/product/8.1.5 
  PerlRequire conf/startup.pl PerlFreshRestart On  
      SetHandler perl-script 
      PerlHandler Apache::Suite::Practice 
      Options 
  +ExecCGI   
      SetHandler default-handler       SetHandler default-handler       SetHandler default-handler       SetHandler server-status       SetHandler perl-script 
      PerlHandler Apache::Status  -httpd.conf 
  <> 
  


Embperl segfaulting under perl 5.6.0

2000-03-30 Thread Michael J Schout

Hi.

I seem to have run into some issues since I upgraded to perl 5.6.0.  Since
doing this, I recompiled all of my modules (I removed /usr/lib/perl5 and
started fromscratch).  I also recompiled apache/mod_perl so everything was
linked against the properl libperl.

Im using:
apache 1.3.12
mod_perl 1.22
perl 5.6.0
HTML::Embperl 1.2.1

Everything worked fine under perl 5.00503, but now that I am running under
5.6.0, I get an apache segfault for every request.  The problem seems to be in:

XS_HTML__Embperl_GVFile()

I get the entire document from the server before it crashes, so this seems to
be a problem after the request has been served.  XS_HTML__Embperl_GVFile() get
entered lots of times after the page has been delivered before I get the
segfault.  Here is a stack after running httpd under the debugger and serving
one request:

Program received signal SIGSEGV, Segmentation fault.
0x80a9d60 in Perl_gv_fetchfile ()
(gdb) bt
#0  0x80a9d60 in Perl_gv_fetchfile ()
#1  0x4038d434 in XS_HTML__Embperl_GVFile (cv=0x843bf24) at Embperl.xs:77
#2  0x80e6426 in Perl_pp_entersub ()
#3  0x80e138d in Perl_runops_standard ()
#4  0x80a7455 in S_call_body ()
#5  0x80a7221 in perl_call_sv ()
#6  0x8066acb in perl_call_handler ()
#7  0x8065f14 in mod_perl_cleanup_handler ()
#8  0x807d04a in run_cleanups ()
#9  0x807bf88 in ap_clear_pool ()
#10 0x807bfda in ap_destroy_pool ()
#11 0x807bf76 in ap_clear_pool ()
#12 0x8086812 in child_main ()
#13 0x8086cab in make_child ()
#14 0x8086da5 in startup_children ()
#15 0x808725e in standalone_main ()
#16 0x808784d in main ()
#17 0x400d1cb3 in __libc_start_main (main=0x80875d0 , argc=5, 
argv=0xb9c4, init=0x8062c60 <_init>, fini=0x812089c <_fini>, 
rtld_fini=0x4000a350 <_dl_fini>, stack_end=0xb9bc)
at ../sysdeps/generic/libc-start.c:78
(gdb) 

As you can see, it looks like Embperl is involved in the problem here.  If I
set a breakpoint at XS_HTML__Embperl_GVFile, I enter the break point about 42
times before the segmentation fault happens.

Has anyone else seen this?

Mike




Re: Embperl segfaulting under perl 5.6.0

2000-03-30 Thread Michael schout

Doh!

I just checked the development version of HTML::Embperl, and this is fixed in
there.

Gerald:  Could we patch this fix in to the HTML::Embperl stable tree and get a
new stable release?  I would like to avoid running the beta version of Embperl
on a production site :).

The patch in question I would like to see in the stable release includes
differences between revision 1.24 and 1.26:

diff -c -r1.24 -r1.26
*** Embperl.xs  2000/01/04 06:10:02 1.24
--- Embperl.xs  2000/03/28 19:46:04 1.26
***
*** 71,78 
  SV * gv
  CODE:
  RETVAL = "" ;
! if (gv && SvTYPE(gv) == SVt_PVGV)
{
GV * fgv = GvFILEGV(gv) ;
if (fgv && SvTYPE(fgv) == SVt_PVGV)
{
--- 71,86 
  SV * gv
  CODE:
  RETVAL = "" ;
! #ifdef GvFILE
! if (gv && SvTYPE(gv) == SVt_PVGV && GvGP (gv))
{
+   char * name = GvFILE (gv) ;
+   if (name)
+   RETVAL = name ;
+   }
+ #else
+ if (gv && SvTYPE(gv) == SVt_PVGV && GvGP (gv))
+   {
GV * fgv = GvFILEGV(gv) ;
if (fgv && SvTYPE(fgv) == SVt_PVGV)
{
***
*** 81,86 
--- 89,95 
RETVAL = name ;
}
}
+ #endif
  OUTPUT:
  RETVAL


Mike




Can't locate object method "OPEN" via package "Apache"

2000-03-30 Thread Sam Carleton

I am trying to get the Apache::Magick module from the O'Reilly book
"Writing Apache Modules with Perl and C" to work.  The error I am
running into is:

Can't locate object method "OPEN" via package "Apache" (line 80)

The looks real simply:

open(STDOUT, ">&=" . fileno($fh));

Any thoughts on what is going wrong?

Sam

P.S.  The whole Apache::Magick is attached, in case you want to look at
it.




package Apache::Magick;

use strict;
use Apache::Constants qw(:common);
use Image::Magick ();
use Apache::File ();
use File::Basename qw(fileparse);
use DirHandle ();

my %LegalArguments = map { $_ => 1 } 
qw (adjoin background bordercolor colormap colorspace
colors compress density dispose delay dither
display font format iterations interlace
loop magick mattecolor monochrome page pointsize
preview_type quality scene subimage subrange
size tile texture treedepth undercolor);

my %LegalFilters = map { $_ => 1 } 
qw(AddNoise Blur Border Charcoal Chop
   Contrast Crop Colorize Comment CycleColormap
   Despeckle Draw Edge Emboss Enhance Equalize Flip Flop
   Frame Gamma Implode Label Layer Magnify Map Minify
   Modulate Negate Normalize OilPaint Opaque Quantize
   Raise ReduceNoise Rotate Sample Scale Segment Shade
   Sharpen Shear Solarize Spread Swirl Texture Transparent
   Threshold Trim Wave Zoom);

sub handler {
my $r = shift;

# get the name of the requested file
my $file = $r->filename;

# If the file exists and there are no transformation arguments
# just decline the transaction.  It will be handled as usual.
return DECLINED unless $r->args || $r->path_info || !-r $r->finfo;

my $source;
my ($base, $directory, $extension) = fileparse($file, '\.\w+');
if (-r $r->finfo) { # file exists, so it becomes the source
$source = $file;
} 
else {  # file doesn't exist, so we search for it
return DECLINED unless -r $directory;
$source = find_image($r, $directory, $base);
}

unless ($source) {
$r->log_error("Couldn't find a replacement for $file");
return NOT_FOUND;
}

$r->send_http_header;
return OK if $r->header_only;

# Read the image
my $q = Image::Magick->new;
my $err = $q->Read($source);

# Conversion arguments are kept in the query string, and the
# image filter operations are kept in the path info
my(%arguments) = $r->args;

# Run the filters
foreach (split '/', $r->path_info) {
my $filter = ucfirst $_;  
next unless $LegalFilters{$filter};
$err ||= $q->$filter(%arguments);
}

# Remove invalid arguments before the conversion
foreach (keys %arguments) { 
delete $arguments{$_} unless $LegalArguments{$_};
}

# Create a temporary file name to use for conversion
my($tmpnam, $fh) = Apache::File->tmpfile;

# Write out the modified image
open(STDOUT, ">&=" . fileno($fh));
$extension =~ s/^\.//;
$err ||= $q->Write('filename' => "\U$extension\L:-", %arguments);
if ($err) {
unlink $tmpnam;
$r->log_error($err);
return SERVER_ERROR;
}
close $fh;

# At this point the conversion is all done!
# reopen for reading
$fh = Apache::File->new($tmpnam);
unless ($fh) {
$r->log_error("Couldn't open $tmpnam: $!");
return SERVER_ERROR;
}

# send the file
$r->send_fd($fh);

# clean up and go
unlink $tmpnam;  
return OK;
}

sub find_image {
my ($r, $directory, $base) = @_;
my $dh = DirHandle->new($directory) or return;

my $source;
for my $entry ($dh->read) {
my $candidate = fileparse($entry, '\.\w+');
if ($base eq $candidate) {
# determine whether this is an image file
$source = join '', $directory, $entry;
my $subr = $r->lookup_file($source);
last if $subr->content_type =~ m:^image/:;
$source = "";
}
}
$dh->close;
return $source;
}

1;
__END__



RE: Embperl segfaulting under perl 5.6.0

2000-03-30 Thread Gerald Richter

Hi Mike,
>
> I just checked the development version of HTML::Embperl, and this
> is fixed in
> there.
>
> Gerald:  Could we patch this fix in to the HTML::Embperl stable
> tree and get a
> new stable release?  I would like to avoid running the beta
> version of Embperl
> on a production site :).
>
> The patch in question I would like to see in the stable release includes
> differences between revision 1.24 and 1.26:
>

You can apply this patch to 1.2.1 addtionaly you need to changeing
Embperl.pm about line 1233 from

$packfile = '-> No Perl in Source <-' if ($packfile eq ('_<' .
__FILE__)) ;

to

$packfile = '-> No Perl in Source <-' if ($packfile eq ('_<' .
__FILE__) || $packfile eq __FILE__) ;

then it will work also with 1.2.1.

NOTE: make test will fail with Perl 5.6 because a lot of errormessages have
changed in Perl 5.6. This is only a problem of make test and _not_ a problem
of Embperl. Embperl will still work.

I think I will release a new stable version during next week, after doing
some more test on the current beta.

Gerald

P.S. Embperl has now it own mailing list (see
http://perl.apache.org/embperl/Embperl.pod.15.html), were this problem was
already discussed


> diff -c -r1.24 -r1.26
> *** Embperl.xs2000/01/04 06:10:02 1.24
> --- Embperl.xs2000/03/28 19:46:04 1.26
> ***
> *** 71,78 
>   SV * gv
>   CODE:
>   RETVAL = "" ;
> ! if (gv && SvTYPE(gv) == SVt_PVGV)
>   {
>   GV * fgv = GvFILEGV(gv) ;
>   if (fgv && SvTYPE(fgv) == SVt_PVGV)
>   {
> --- 71,86 
>   SV * gv
>   CODE:
>   RETVAL = "" ;
> ! #ifdef GvFILE
> ! if (gv && SvTYPE(gv) == SVt_PVGV && GvGP (gv))
>   {
> + char * name = GvFILE (gv) ;
> + if (name)
> + RETVAL = name ;
> + }
> + #else
> + if (gv && SvTYPE(gv) == SVt_PVGV && GvGP (gv))
> + {
>   GV * fgv = GvFILEGV(gv) ;
>   if (fgv && SvTYPE(fgv) == SVt_PVGV)
>   {
> ***
> *** 81,86 
> --- 89,95 
>   RETVAL = name ;
>   }
>   }
> + #endif
>   OUTPUT:
>   RETVAL
>
>
> Mike
>
>



-
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 925151
WWW:http://www.ecos.de  Fax:  +49 6133 925152
-




Re: Can't locate object method "OPEN" via package "Apache"

2000-03-30 Thread darren chamberlain


Try using CORE::open to be sure that the default open is being called.

darren

Sam Carleton ([EMAIL PROTECTED]) said something to this effect:
> I am trying to get the Apache::Magick module from the O'Reilly book
> "Writing Apache Modules with Perl and C" to work.  The error I am
> running into is:
> 
> Can't locate object method "OPEN" via package "Apache" (line 80)
> 
> The looks real simply:
> 
> open(STDOUT, ">&=" . fileno($fh));
> 
> Any thoughts on what is going wrong?
> 
> Sam
> 
> P.S.  The whole Apache::Magick is attached, in case you want to look at
> it.
> 
> 

> package Apache::Magick;
> 
> use strict;
> use Apache::Constants qw(:common);
> use Image::Magick ();
> use Apache::File ();
> use File::Basename qw(fileparse);
> use DirHandle ();
> 
> my %LegalArguments = map { $_ => 1 } 
> qw (adjoin background bordercolor colormap colorspace
> colors compress density dispose delay dither
> display font format iterations interlace
> loop magick mattecolor monochrome page pointsize
> preview_type quality scene subimage subrange
> size tile texture treedepth undercolor);
> 
> my %LegalFilters = map { $_ => 1 } 
> qw(AddNoise Blur Border Charcoal Chop
>Contrast Crop Colorize Comment CycleColormap
>Despeckle Draw Edge Emboss Enhance Equalize Flip Flop
>Frame Gamma Implode Label Layer Magnify Map Minify
>Modulate Negate Normalize OilPaint Opaque Quantize
>Raise ReduceNoise Rotate Sample Scale Segment Shade
>Sharpen Shear Solarize Spread Swirl Texture Transparent
>Threshold Trim Wave Zoom);
> 
> sub handler {
> my $r = shift;
> 
> # get the name of the requested file
> my $file = $r->filename;
> 
> # If the file exists and there are no transformation arguments
> # just decline the transaction.  It will be handled as usual.
> return DECLINED unless $r->args || $r->path_info || !-r $r->finfo;
> 
> my $source;
> my ($base, $directory, $extension) = fileparse($file, '\.\w+');
> if (-r $r->finfo) { # file exists, so it becomes the source
>   $source = $file;
> } 
> else {  # file doesn't exist, so we search for it
>   return DECLINED unless -r $directory;
>   $source = find_image($r, $directory, $base);
> }
> 
> unless ($source) {
>   $r->log_error("Couldn't find a replacement for $file");
>   return NOT_FOUND;
> }
> 
> $r->send_http_header;
> return OK if $r->header_only;
> 
> # Read the image
> my $q = Image::Magick->new;
> my $err = $q->Read($source);
> 
> # Conversion arguments are kept in the query string, and the
> # image filter operations are kept in the path info
> my(%arguments) = $r->args;
> 
> # Run the filters
> foreach (split '/', $r->path_info) {
>   my $filter = ucfirst $_;  
>   next unless $LegalFilters{$filter};
>   $err ||= $q->$filter(%arguments);
> }
> 
> # Remove invalid arguments before the conversion
> foreach (keys %arguments) {   
>   delete $arguments{$_} unless $LegalArguments{$_};
> }
> 
> # Create a temporary file name to use for conversion
> my($tmpnam, $fh) = Apache::File->tmpfile;
> 
> # Write out the modified image
> open(STDOUT, ">&=" . fileno($fh));
> $extension =~ s/^\.//;
> $err ||= $q->Write('filename' => "\U$extension\L:-", %arguments);
> if ($err) {
>   unlink $tmpnam;
>   $r->log_error($err);
>   return SERVER_ERROR;
> }
> close $fh;
> 
> # At this point the conversion is all done!
> # reopen for reading
> $fh = Apache::File->new($tmpnam);
> unless ($fh) {
>   $r->log_error("Couldn't open $tmpnam: $!");
>   return SERVER_ERROR;
> }
> 
> # send the file
> $r->send_fd($fh);
> 
> # clean up and go
> unlink $tmpnam;  
> return OK;
> }
> 
> sub find_image {
> my ($r, $directory, $base) = @_;
> my $dh = DirHandle->new($directory) or return;
> 
> my $source;
> for my $entry ($dh->read) {
>   my $candidate = fileparse($entry, '\.\w+');
>   if ($base eq $candidate) {
>   # determine whether this is an image file
>   $source = join '', $directory, $entry;
>   my $subr = $r->lookup_file($source);
>   last if $subr->content_type =~ m:^image/:;
>   $source = "";
>   }
> }
> $dh->close;
> return $source;
> }
> 
> 1;
> __END__


-- 
The great artist and thinker are the simplifiers.



Re: [OT slightly] mod_perl developers (do they exist?)

2000-03-30 Thread Stas Bekman

> > > My suggestion would be to capture one of two of these tutorial sessions
> on
> > > audio tape(assuming employer consent), edit and sync them to a bunch of
> HTML
> > > slides and put the whole shebang on the Net...preferably right next to
> Stas'
> > > great guide. Some nifty examples of this are at...
> >
> > Hmm, that's what ORA did at the last Perl conference, although not with
> > mod_perl talks... They have prepared the audio/video recording of the most
> > popular sessions and made them available to the public. Not for free of
> > course.
> >
> > You probably could have done the same at the ApacheCon, but it's over
> > already.  Your next chance is the summer's OpenSource conference in
> > Monterey and the autumn's next ApacheCon in London.
> 
> As I recall you gave the talk on mod_perl. Would you consent to have your
> tutorial session recorded for this purpose? Any other organizational
> permissions needed? I wonder if everything at the OpenSource conference
> becomes O'Reilly's copyright.

If I understand correctly the handouts and possible audio/video records
belong to the host of the conference. Therefore you should talk to them
about this issue. It can be ORA, Camelot or any other conference
organizer.

Another possibility is to organize a training session which will be hosted
by you for example and then you will be able to make the recording with
the only permission of the speakers.

Of course if your intention is to make money by selling the recordings,
you will have to pay a certain percentage to the "artists".

BTW, I think that if you are serious about doing this project, I believe
that the only way to do that is in the video format. It's hard to imagine
the slide and see where the speaker points to with his laser on the audio
recording. Audio format is fine for keynotes, but not for tutorials. 

__
Stas Bekman | JAm_pH--Just Another mod_perl Hacker
http://stason.org/  | mod_perl Guide http://perl.apache.org/guide/ 
mailto:[EMAIL PROTECTED]  | http://perl.orghttp://stason.org/TULARC/
http://singlesheaven.com| http://perlmonth.com http://sourcegarden.org
--




Re: Can't locate object method "OPEN" via package "Apache"

2000-03-30 Thread Sam Carleton

darren chamberlain wrote:

> Try using CORE::open to be sure that the default open is being called.

tried it, I am getting the same error, any more ideas?

Sam




RE: Segmentation Fault: RedHat 6.[01] / Apache 1.3.12 / mod_perl 1.22 / perl 5.005_03 / IE 5

2000-03-30 Thread Geoffrey Young
Title: Segmentation Fault: RedHat 6.[01] / Apache 1.3.12 / mod_perl 1.22 / perl 5.005_03 / IE 5



PerlFreshRestart causes a great many problems, most for 
indeterminate reasons, but its behavior is at least 
documented
 
see http://perl.apache.org/guide/troubleshooting.html#Evil_things_might_happen_when_us
 
--Geoff

  -Original Message-From: Robert Jenks 
  [mailto:[EMAIL PROTECTED]]Sent: Thursday, March 30, 2000 2:13 
  PMTo: 'Geoffrey Young'Subject: RE: Segmentation Fault: 
  RedHat 6.[01] / Apache 1.3.12 / mod_perl 1.22 / perl 5.005_03 / IE 
  5
  I 
  removed PerlFreshRestart and it seems to be working fine now.  
  Fortunately I don't need this option, so this won't be a problem, however it 
  is curious that it was causing segfaults.
   
  Thanks for the help...
  -Robert
  
-Original Message-From: Geoffrey Young 
[mailto:[EMAIL PROTECTED]]Sent: Thursday, March 30, 2000 11:46 
AMTo: 'Robert Jenks'; modperl (E-mail)Subject: RE: 
Segmentation Fault: RedHat 6.[01] / Apache 1.3.12 / mod_perl 1.22 / perl 
5.005_03 / IE 5
I'm not really the expert in this, but you might 
want to try removing PerlFreshRestart and Apache::StatINC from your config 
and see if that helps...
 
HTH
 
--Geoff

  -Original Message-From: Robert Jenks 
  [mailto:[EMAIL PROTECTED]]Sent: Thursday, March 30, 2000 
  11:03 AMTo: modperl (E-mail)Subject: Segmentation 
  Fault: RedHat 6.[01] / Apache 1.3.12 / mod_perl 1.22 / perl 5.005_03 / IE 
  5
  I'm having a very strange problem.  I'm 
  running a very large application under apache/mod_perl (100+ modules; 
  httpd children grow to 40+MB).  The application uses Apache::DBI 
  (DBD::Oracle) & CGI.pm, so I have it running as a handler and 
  everything works fine except... :)
  If the first request to httpd comes from IE5 to 
  the web root, the child httpd process will segfault.  However from 
  any other client I've tried ( Netscape Comm. and "telnet 0 80 GET /" it 
  works fine and doesn't segfault.  Even stranger, if I point IE5 at 
  "/perl-status?inc", and then at "/" it doesn't segfault (from that point 
  forward it doesn't segfault; even if it hits a new child 
httpd).
  I haven't been able to isolate the problem 
  because I haven't been able to get apache to give me a core file.  
  I've tried the "ulimit -c unlimited" without success.  Any hints, 
  RwhatFM, etc
  My build script is attached. (which includes 
  building mod_ssl, but this even happened before I added mod_ssl) 
  
  Thanks in advance... -- Robert 
  Jenks 
  -httpd.conf 
  ServerType standalone ServerRoot "/Suite/apache" PidFile /Suite/apache/logs/httpd.pid ScoreBoardFile /Suite/apache/logs/httpd.scoreboard ResourceConfig /dev/null AccessConfig /dev/null Timeout 
  300 KeepAlive On MaxKeepAliveRequests 100 KeepAliveTimeout 15 MinSpareServers 1 MaxSpareServers 3 StartServers 
  3 MaxClients 3 MaxRequestsPerChild 0 ExtendedStatus on Port 80 
  User nobody Group nobody ServerAdmin 
  [EMAIL PROTECTED] ServerName 
  server.mydomain.com DocumentRoot 
  /Suite/AppSites/practice      Options 
  FollowSymLinks     
  AllowOverride None       Options Indexes FollowSymLinks MultiViews 
      AllowOverride None 
      Order allow,deny 
      Allow from all 
   
  AccessFileName .htaccess      Order allow,deny     Deny from all  
  UseCanonicalName On 
       TypesConfig 
  /Suite/apache/conf/mime.types  
  DefaultType text/plain 
   
      MIMEMagicFile 
  /Suite/apache/conf/magic  
  HostnameLookups Off 
  ErrorLog /Suite/apache/logs/error_log 
  
  LogLevel warn 
  LogFormat "%h %l %u %t \"%r\" %>s %b 
  \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %b" common LogFormat "%{Referer}i -> %U" referer 
  LogFormat "%{User-agent}i" agent 
  CustomLog /Suite/apache/logs/access_log 
  common CustomLog 
  /Suite/apache/logs/referer_log referer CustomLog /Suite/apache/logs/agent_log agent 
  ServerSignature Off 
   
      BrowserMatch "Mozilla/2" 
  nokeepalive     
  BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 
  force-response-1.0     
  BrowserMatch "RealPlayer 4\.0" force-response-1.0     BrowserMatch "Java/1\.0" 
  force-response-1.0     
  BrowserMatch "JDK/1\.0" force-response-1.0  
  PerlInitHandler Apache::StatINC 
  PerlSetEnv ORACLE_HOME 
  /u01/app/oracle/product/8.1.5 PerlRequire conf/startup.pl PerlFreshRestart On      SetHandler perl-script 
      PerlHandler Apache::Suite::Practice 
      Options +ExecCGI       SetHandler default-handler       SetHandler default-handler       SetHandler default-handler       
  SetHandler server-status   
      Se

[admin] NO HTML posts please!

2000-03-30 Thread Stas Bekman


Folks, please refrain from posting in HTML. 

Some of us use email clients that post and read email in the old good text
mode. When I don't have enough time on my hands I delete such emails since
I cannot read them right away. Probably others too.

Please don't tell me to get more _sophisticated_ email client, my pine
does everything for me. HTML should NOT be used for posting emails.

Thank you!

__
Stas Bekman | JAm_pH--Just Another mod_perl Hacker
http://stason.org/  | mod_perl Guide http://perl.apache.org/guide/ 
mailto:[EMAIL PROTECTED]  | http://perl.orghttp://stason.org/TULARC/
http://singlesheaven.com| http://perlmonth.com http://sourcegarden.org
--




Re: [admin] NO HTML posts please!

2000-03-30 Thread Matt Sergeant

On Thu, 30 Mar 2000, Stas Bekman wrote:

> Please don't tell me to get more _sophisticated_ email client, my pine
> does everything for me. HTML should NOT be used for posting emails.

Not only that, the list of mail sizes on mod_perl went:

1k
3k
2k
4k
20k <- HTML

Yikes.

(although pine 4 and above does display HTML ok, it's not a good
idea. Turn it off...)

-- 


Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org http://xml.sergeant.org




Re: [admin] NO HTML posts please!

2000-03-30 Thread Sam Carleton

Stas Bekman wrote:

> Folks, please refrain from posting in HTML.
>
> Some of us use email clients that post and read email in the old good text
> mode. When I don't have enough time on my hands I delete such emails since
> I cannot read them right away. Probably others too.
>
> Please don't tell me to get more _sophisticated_ email client, my pine
> does everything for me. HTML should NOT be used for posting emails.

And then there are those of us that do have sophisticated email clients that
simply don't care for HTML posting.  I agree 100%, keep it simple, keep it
TEXT!

Sam




Re: [admin] NO HTML posts please!

2000-03-30 Thread Chip Turner

Stas Bekman <[EMAIL PROTECTED]> writes:

I agree 100%.  HTML belongs in web browsers.  If you happen to have a
web browser in your mail reader, fine, but don't force others to have
one as well :)

Chip

> Folks, please refrain from posting in HTML. 
> 
> Some of us use email clients that post and read email in the old good text
> mode. When I don't have enough time on my hands I delete such emails since
> I cannot read them right away. Probably others too.
> 
> Please don't tell me to get more _sophisticated_ email client, my pine
> does everything for me. HTML should NOT be used for posting emails.

-- 
Chip Turner   [EMAIL PROTECTED]
  ZFx, Inc.  www.zfx.com
  PGP key available at wwwkeys.us.pgp.net



Re: Problem Compiling with Perl 5.6.0

2000-03-30 Thread Doug MacEachern

On Thu, 30 Mar 2000, Steve Hay wrote:

> Thanks for this!
> 
> I tried it with the latest mod_perl cvs: mine now compiles perfectly too
> (_never_ seen that before!!!), and there's now only 1 unresolved external
> symbol instead of 7.  Looks like it could be nearly there - I'll try another
> one some time.

lemme guess, Perl_rsignal?  somehow i managed not to commit this
yesterday, it's in cvs now.  i don't have a win32 system to test on at the
moment, so any feeback from you, Randy K and others helps a great deal,
thanks.

--- src/modules/perl/mod_perl.c 2000/03/30 00:20:34 1.109
+++ src/modules/perl/mod_perl.c 2000/03/30 19:32:22
@@ -1099,6 +1099,7 @@
cfg->pnotes = Nullhv;
 }
 
+#ifndef WIN32
 sigs = (perl_request_sigsave **)cfg->sigsave->elts;
 for (i=0; i < cfg->sigsave->nelts; i++) {
MP_TRACE_g(fprintf(stderr, 
@@ -1108,6 +1109,7 @@
   (unsigned long)sigs[i]->h));
rsignal(sigs[i]->signo, sigs[i]->h);
 }
+#endif
 }
 
 void mod_perl_end_cleanup(void *data)




Re: [admin] NO HTML posts please!

2000-03-30 Thread J. Horner

On Thu, 30 Mar 2000, Sam Carleton wrote:

> Stas Bekman wrote:
> 
> > Folks, please refrain from posting in HTML.
> >
> > Some of us use email clients that post and read email in the old good text
> > mode. When I don't have enough time on my hands I delete such emails since
> > I cannot read them right away. Probably others too.
> >
> > Please don't tell me to get more _sophisticated_ email client, my pine
> > does everything for me. HTML should NOT be used for posting emails.
> 
> And then there are those of us that do have sophisticated email clients that
> simply don't care for HTML posting.  I agree 100%, keep it simple, keep it
> TEXT!
> 
> Sam
> 

And then there are those of us who use pine who think HTML in email is
overkill.  If your words don't convey your message, what makes you think
that blinking text or bold text conveys it better?

J. J. Horner
Linux, Apache, Perl, Unix, Stronghold
[EMAIL PROTECTED] http://www.knoxlug.org
System has been up: 8 days.




Re: Modperl 1.22 and Perl 5.6.0

2000-03-30 Thread Doug MacEachern

On Wed, 29 Mar 2000, Jeffrey W. Baker wrote:

> > configure Perl with  -Dusemymalloc
> 
> Wait, doesn't usemymalloc mean to use the system's native malloc?  This
> from INSTALL:
> 
> "To build without perl's malloc, you can use the Configure command
> 
> sh Configure -Uusemymalloc"

yeah, -Uusemymalloc means to use native malloc, notice i suggested
-Dusemymalloc, which means to use Perl's malloc.
 
> On Linux 2.2, Perl uses its own malloc by default.  To use the native
> malloc, specify -Dusemymalloc.  It might be amusing to compare the two, as
> Linux has a very fast malloc implementation.

-U == undefine usemymalloc (use system malloc)
-D == define   usemymalloc (use Perl's malloc)

i've benchmarked the two, it makes a HUGE difference under solaris, Perl's
malloc kicks the sh*t out of solaris system malloc.  Perl's malloc is not
as much of a win under linux, i don't have the numbers handy though.






Re: [admin] NO HTML posts please!

2000-03-30 Thread Angel R. Rivera

how about avoiding the me toos...

At 02:04 PM 3/30/00 -0500, J. Horner wrote:
>On Thu, 30 Mar 2000, Sam Carleton wrote:
>
> > Stas Bekman wrote:
> >
> > > Folks, please refrain from posting in HTML.
> > >
> > > Some of us use email clients that post and read email in the old good 
> text
> > > mode. When I don't have enough time on my hands I delete such emails 
> since
> > > I cannot read them right away. Probably others too.
> > >
> > > Please don't tell me to get more _sophisticated_ email client, my pine
> > > does everything for me. HTML should NOT be used for posting emails.
> >
> > And then there are those of us that do have sophisticated email clients 
> that
> > simply don't care for HTML posting.  I agree 100%, keep it simple, keep it
> > TEXT!
> >
> > Sam
> >
>
>And then there are those of us who use pine who think HTML in email is
>overkill.  If your words don't convey your message, what makes you think
>that blinking text or bold text conveys it better?
>
>J. J. Horner
>Linux, Apache, Perl, Unix, Stronghold
>[EMAIL PROTECTED] http://www.knoxlug.org
>System has been up: 8 days.


Angel R. Rivera, [EMAIL PROTECTED]
--
Website:  http://www.wolf.com
Lists:   http://www.wolf.com/lists/
--
"The Quality of a person's life is in direct proportion to their commitment
   to excellence, regardless of their chosen field of endeavor."

 Vincent T. Lombardi




Re: [Patch] Apache::DB on Win32

2000-03-30 Thread Doug MacEachern

thanks Gerald, applied for 0.07.

On Wed, 29 Mar 2000, Gerald Richter wrote:

> Hi Doug,
> 
> the following patch allows Apache::DB to be used on Win32 Systems:
> 
> In DB.xs wrap the SIGINT call at the last line inside a conditional, like:
> 
> #ifndef WIN32
> if (ApacheSIGINT) (*ApacheSIGINT)(SIGINT);
> #endif
> 
> 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 925151
> WWW:http://www.ecos.de  Fax:  +49 6133 925152
> -
> 




Re: getting mod_perl working

2000-03-30 Thread Doug MacEachern

try 1.22 instead of 1.21

On Wed, 29 Mar 2000, Quadrilateral I was wrote:

> I've been trying to get ePerl installed on a redhat system, and I seem to 
> have narrowed it down to a problem with mod_perl and/or apache. Whenever I 
> add a PerlModule statement to httpd.conf and try to restart httpd, it won't 
> run. Doesn't give me any error messages--it just refuses to work. I've 
> tried it with both 'PerlModule Apache::Status' and 'PerlModule 
> Apache::ePerl', and I've also tried it on two different systems--both 
> running apache 1.3.9 and mod_perl 1.21, freshly installed. Any idea what I 
> could be doing wrong?
> 
> 
> Joel Young  .  . . .::.: * .  . .We're all mad here.
> <[EMAIL PROTECTED]>   *   **  '  'I'm mad.
>  '   You're mad.
> 




Re: Error in Installation

2000-03-30 Thread Doug MacEachern

On Wed, 29 Mar 2000, Ramesh Vadlapatla wrote:
> ** A test compilation with your Makefile configuration
> ** failed.  The below error output from the compilation
> ** test will give you an idea what is failing. Note that
> ** Apache requires an ANSI C Compiler, such as gcc. 

can you compile apache without mod_perl?  did you use the same compiler to
build both Perl and Apache?




Re: [make test warns] mod_perl/mod_ssl

2000-03-30 Thread Doug MacEachern

> httpd.conf should have:
> 
> 
> SSLDisable
> SSLSessionCache none
> 

ok, applied, thanks!




Re: [admin] NO HTML posts please!

2000-03-30 Thread Randal L. Schwartz

> "Angel" == Angel R Rivera <[EMAIL PROTECTED]> writes:

Angel> how about avoiding the me toos...

Yeah, and the people that post "upside down", with the answer
*before* the question!

Definitely.  Let's avoid those.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!



Re: Can't locate object method "OPEN" via package "Apache"

2000-03-30 Thread Doug MacEachern

On Thu, 30 Mar 2000, Sam Carleton wrote:

> I am trying to get the Apache::Magick module from the O'Reilly book
> "Writing Apache Modules with Perl and C" to work.  The error I am
> running into is:
> 
> Can't locate object method "OPEN" via package "Apache" (line 80)
> 
> The looks real simply:
> 
> open(STDOUT, ">&=" . fileno($fh));

try adding:

untie *STDOUT;

before the open(...)




Re: [admin] NO HTML posts please!

2000-03-30 Thread Tom Christiansen

>how about avoiding the me toos...

[44 lines of crud we've already seen before]

Hm... something wrong's with that message...

% msgchk `mhpath cur`
Quote follows response, Jeopardy style #2
Overquoted: 30 lines quoted out of 41: 73%
Non-canonical signature separator: 
`--'
Signature too long: 7 lines

More than just *some*thing: that's four different violations.  

print "BAD!\n" for 1..4;

--tom

#!/usr/bin/perl -w
# msgchk - check mail and news messages for netiquette violations
# [EMAIL PROTECTED]

use strict;

my $Msg = get_message();

missing_headers();
bogus_address();
allcap_subject();
annoying_subject();

mimes();

lines_too_long();
control_characters();

miswrapped();
jeopardy_quoted();
overquoted();

good_signature();

exit(0);

###

sub AUTOLOAD {
use vars '$AUTOLOAD';
my $field;
($field = uc($AUTOLOAD)) =~ s/.*:://;
if (!defined wantarray) {
require Carp;
Carp::confess("Undefined function call: $AUTOLOAD");
} 
$Msg->$field();
} 

sub bogus_address {
my $address = from();

if ($address !~ /\@\w.*\.\w/) {
print "From address must contain an at sign, etc.\n";
return;
} 

if ($address =~ /(remove|spam)/i) {
print "Munged return address suspected, found `$1' in from.\n";
} 

ck822($address);# inscrutable

my($host) = $address =~ /\@([a-zA-Z0-9_.-]+)/;
dns_check($host);   # very slow!
}

sub control_characters {
my $lineno = 0;
my $MAX_CONTROL = 5;

for (lines()) { 
$lineno++;
if (/(?=[^\s\b])([\000-\037])/) {
printf "Control character (char %#o) appears at line %d of body.\n", 
ord $1, $lineno;
}

if (/([\202-\237])/) {
printf "Evil and rude MS-ASCII character (char %#o) appears at line %d of 
body.\n", 
ord $1, $lineno;
} 
last if --$MAX_CONTROL < 0;
}

} 

sub lines_too_long {
my $MAX_LINE_LEN = 80;
my $line_count = scalar @{ [ lines() ] };
my ($long_lines, $longest_line_data, $longest_line_number) = (0,'',0);
my $lineno = 0;
for (lines()) {
$lineno++;
next if /^[>+-]/;  # skip quotes and patch diffs
if (length() > $MAX_LINE_LEN) {
$long_lines++;
if (length() > length($longest_line_data)) {
$longest_line_data = $_;
$longest_line_number = $lineno;
} 
} 
} 
if ($long_lines) {
printf "%d of %d lines exceed maxlen %d, ",
   $long_lines, $line_count, $MAX_LINE_LEN;
printf "longest is #%d at %d bytes\n",
$longest_line_number, length($longest_line_data);
} 
}

sub missing_headers {
if (subject() !~ /\S/) {
print "Missing required subject header.\n";
} 
if (newsgroups() && subject() =~ /^\s*Re:/i && !references()) {
print "Followup posting missing required references header.\n";
} 
}

sub allcap_subject {
my $subject = subject();
$subject =~ s/^(\s*Re:\s*)+//i;
if ($subject !~ /[a-z]/) {
print "No lower-case letters in subject header.\n";
} 
}

sub miswrapped {
my($bq1, $bq2);
for (paragraphs()) {
next unless /\A(^\S.*){2,}\Z/ms;  # no indented code

if (!$bq1 && /^>\S.*\n\s*[a-zA-Z]/) { 
print "Incorrectly wrapped quoted text.\n";
$bq1++;
}

next if $bq2;

my $count = 0;
while (/^[^>].{60,}\n[^>].{1,20}\n(?=[^>].{60,}\n)/gm) {
$count++;
} 

if ($count > 1) {
print "Incorrectly wrapped regular text.\n";
$bq2++;
### print "OOPS count = $count:\n$_\n\n";
} 
} 
}

sub jeopardy_quoted {
local $_ = body();
$_ = unquote_wrap($_);

$_ = strip_signature($_);
$_ = strip_attribution($_);

# check quotation at bottom but nowhere else
# XXX: these can go superlong superlong!  i've added
#  some more anchors and constraints to try to avoid this,
#  but I still mistrust it

if (/ ((^\s*>.*){2,}) \s* \Z/mx   
&& 
!/ (\n>.*?)+ (\n[^>].*?)+ (\n>.*?)+ /x ) 
{
print "Quote follows response, Jeopardy style #1\n";
} 

# completely at bottom 
elsif (/^.* wr(?:ote|ites):\n(>.*\n)+\s*\Z/m) {
print "Quote follows response, Jeopardy style #2\n";
} 

# another way of saying the same
elsif (/^(?:>+\s*)?-[_+]\s*Original Message\s*-[_+]\s.*\Z/ms) {
print "Quote follows response, Jeopardy style #3\n";
}

# another way of saying the same
elsif (/^(?:>+\s*)?[_-]+\s*Reply Separator\s*[_-]+\s.*\Z/ms) {
print "Quote follows response, Jeopardy style #4\n";
}

}

sub overquoted {

# cfoq: check fascistly overquoted by [EMAIL PROTECTED]
#   (wants perl 5.0 or better; developed under 5.002)

my

Can't upgrade that kind of scalar ...

2000-03-30 Thread Doug MacEachern

fyi...

Index: Changes
===
RCS file: /home/cvs/modperl/Changes,v
retrieving revision 1.445
diff -u -u -r1.445 Changes
--- Changes 2000/03/30 00:44:39 1.445
+++ Changes 2000/03/30 19:35:12
@@ -10,6 +10,11 @@
 
 =item 1.22_01-dev
 
+reset the stack pointer after calling perl_require_module() in
+perl_call_handler().  this fix will most likely cure the reports of
+"Can't upgrade that kind of scalar at ..."
+[Ben Cottrell <[EMAIL PROTECTED]>]
+
 workaround use of Perl api functions that are no longer public with
 Perl 5.6.0 + win32, thanks to Randy Kobes for spotting
 
Index: src/modules/perl/mod_perl.c
===
RCS file: /home/cvs/modperl/src/modules/perl/mod_perl.c,v
retrieving revision 1.110
diff -u -u -r1.110 mod_perl.c
--- src/modules/perl/mod_perl.c 2000/03/30 19:34:13 1.110
+++ src/modules/perl/mod_perl.c 2000/03/30 19:35:25
@@ -1557,6 +1557,7 @@
if(stash) /* check again */
is_method = perl_handler_ismethod(stash, method);
 #endif
+   SPAGAIN; /* reset stack pointer after require() */
}

if(!is_method && !defined_sub) {




[RFC] holding a mod_perl conference

2000-03-30 Thread Stas Bekman

Ok, a while ago Baiju Thakkar asked me about the feasibility of
creating our own mod_perl conference. It took me a while to relate on
this issue, but I didn't wasted time and over the last ApacheCon I've
talked to the Camelot folks who had a great success organizing the
ApacheCon and they have agreed to help us to organize our own
conference.

First of all, why holding yet another conference, the answer is
simple, we want mod_perl to be in the center of the event and not a
side project. Think about Perl Conference -- mod_perl is just a little 
part of the Apache track. Think about ApacheCon -- mod_perl is again
just a drop in a ocean. 

Well, there are many issues to solve, the most important is that we
will not be able to hold a mod_perl conference if we want to bring
enough people to make it a real event including sponsors, expo booths,
social events and etc.

Therefore I've suggested to hold a "Server Side Web App Dev using
Scripting Languages" conference (you think of a shorter and nicer name
:) So we want to invite speakers from all "mainstream" camps that use
scripting languages for the web development.

The candidates I've been thinking about are php, python, perlex,
fastcgi. Camelot thought that java would fit in, I'm not sure about
this, but it can bring more people and sponsors. Other mainstream
scripting languages/technologies we might think about.

Why people would go to this yet another conference? It's simple --
think about IT managers. In order to make sure they get the latest
advances of the webdev technology they send their people to the Perl
and Apache conferences. Isn't it a waste? (Both conference a great but 
read on) Now we create a single conference that can cover all the
aspects of the web development in one place.

Once we decide that the conference is a feasible one and profitable
enough for Camelot to do this with us, we will need a few folks from
each camp to be on the committee to decide on the speakers and help
organizing the conference.

My initial idea of the conference is quite simple: Having a track of
all-in-one for people who are new to the webdevelopment or want to
become an OSS convert, as they are tired to hunt ghosts in the
programs coded in ASP/CF/whatever proprietary language that has been
picked by their bosses. So we give them a whole track, so they can
test each of the OpenSource technologies and decide what's their pick.

The rest are full tracks dedicated for each technology, so if I want
to learn mod_perl I'd spend all the days listening to mod_perl
speakers so when the conference is over I'll go back with a bag full
of tricks and a very good push to get me going when I'll start coding
myself. Having a dedicated track will allow to provide all the
information that generally being skipped due to the lack of time.

Thoughts?

__
Stas Bekman | JAm_pH--Just Another mod_perl Hacker
http://stason.org/  | mod_perl Guide http://perl.apache.org/guide/ 
mailto:[EMAIL PROTECTED]  | http://perl.orghttp://stason.org/TULARC/
http://singlesheaven.com| http://perlmonth.com http://sourcegarden.org
--




[RFC - follow up] holding a mod_perl conference

2000-03-30 Thread Stas Bekman

Well, this is a follow up by the Camelot folks (Hi Stewart and Jeff) 
So please comment on this one too, thanks!!!

Regarding the scriptwebdev conference, I mentioned
this to Terry and Jeff again and they would like to
see an outline/plan for how this event might work. 
For example, what would the tracks be exactly? Who are
some of the major vendors that we could target for
booths/sponsorships? What media/magazines could we
target specifically?  What competitive events should
we schedule against or worry about? Could this event
stand on its own or should it be a module/add-on to
the ApacheCon show?  While I realize we already
discussed some of these issues in Orlando, it would be
nice to have an official proposal from you that
addressed some of these things on paper.  Please note
that planning a conference can be extremely time
consuming/complicated (the devil is in the details)
and we need as much ammunition as possible in order to
consider doing this.

Thanks,

-stewq  


--- Stas Bekman <[EMAIL PROTECTED]> wrote:
> Hi, Stewart
> 
> Did you receive my email regarding the new
> conference? Trying the other
> account in case you have the email problems again. 
> 
> Thanks!
> 
>
__
> Stas Bekman | JAm_pH--Just
> Another mod_perl Hacker
> http://stason.org/  | mod_perl Guide
> http://perl.apache.org/guide/ 
> mailto:[EMAIL PROTECTED]  | http://perl.org   
> http://stason.org/TULARC/
> http://singlesheaven.com| http://perlmonth.com
> http://sourcegarden.org
>
--
> 
> 

__
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com





Re: More segfault problems

2000-03-30 Thread Doug MacEachern

On Wed, 29 Mar 2000, Shevek wrote:
> I can't find any documentation for what RULE_EXPAT does, the only
> occurrence at all is in Apache src/Configure, where it seels to compile in
> the expat lite library.

RULE_EXPAT=no disables the expat lite library.  there have been reports of
it clashing with symbols in XML::Parser





Re: Problem Compiling with Perl 5.6.0

2000-03-30 Thread G.W. Haywood

Hi there,

On Thu, 30 Mar 2000, Steve Hay wrote:

> Since I had no reply to my previous problem (re-directing STDOUT in
> system() calls), 

This is probably because you're talking about NT.  Don't take it
personally.

> I thought I would try using Perl 5.6.0 instead of > 5.005_03

Brave chap.

> (probably a good idea anyway)

No, I don't think so, not on NT, not yet.  Come to think of it, NT
probably wasn't the best idea you ever had either.

> Unfortunately, now I can't get (the Apache side of) mod_perl to
> compile.

You aren't alone.  You really are on the bleeding edge with that lot.
My advice would be ro try Linux, and stick with Perl 5.005_03 and
mod_perl 1.21/Apache 1.3.11 (or .12) for a few weeks.

73,
Ged.
PS: Horrible mail problems here just now, reply only to mod_perl List.








Re: [RFC] holding a mod_perl conference

2000-03-30 Thread J. Horner

On Thu, 30 Mar 2000, Stas Bekman wrote:

> First of all, why holding yet another conference, the answer is
> simple, we want mod_perl to be in the center of the event and not a
> side project. Think about Perl Conference -- mod_perl is just a little 
> part of the Apache track. Think about ApacheCon -- mod_perl is again
> just a drop in a ocean. 
>
 
> 
> The rest are full tracks dedicated for each technology, so if I want
> to learn mod_perl I'd spend all the days listening to mod_perl
> speakers so when the conference is over I'll go back with a bag full
> of tricks and a very good push to get me going when I'll start coding
> myself. Having a dedicated track will allow to provide all the
> information that generally being skipped due to the lack of time.
> 

I like the idea of mod_perl being the center of attention.  There are
aspects of mod_perl in which I am very weak.  I'm wondering if this will
fit the bill, though.

In this scenario, we will have a conference with only partial interest in
mod_perl.  With all of these other technologies, we will be able to bring
in funding and support from some big names (possibly Sun, Allaire, etc),
but we still only have a small piece of the pie.  We will have, in effect,
a cluster of conferences.  Also, we will need space for each and every
faction attending (a mod_perl conference room, a Cold Fusion conference
room, a Java area, etc).

Is this feasible?  Will this solve the problem?  I don't imagine a large
amount of cooperation from competing vendors.

Rebuttal?

J. J. Horner
Linux, Apache, Perl, Unix, Stronghold
[EMAIL PROTECTED] http://www.knoxlug.org
System has been up: 8 days.




Re: [admin] NO HTML posts please!

2000-03-30 Thread David Block



On 30 Mar 2000, Randal L. Schwartz wrote:

> > "Angel" == Angel R Rivera <[EMAIL PROTECTED]> writes:
> 
> Angel> how about avoiding the me toos...
> 
> Yeah, and the people that post "upside down", with the answer
> *before* the question!
> 
> Definitely.  Let's avoid those.
> 
> -- 
> Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
> <[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
> See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
> 




Re: [admin] [OT] NO HTML posts please!

2000-03-30 Thread kevin montuori

>>> Tom Christiansen writes:

  >> how about avoiding the me toos...
  tc> [44 lines of crud we've already seen before]

  [ 588 lines of pointless crud snipped. ]

  tc> Hm... something wrong's with that message...

  hmm, what's wrong with yours?

  perl -077l12ne 'print "no mod_perl content" 
unless /mod_perl/' `mhpath curr`
  
  cheers,  
  k.

-- 

kevin montuori




Re: performance mongers: since when is using CGI.pm or Apache::Registrydishonorable?

2000-03-30 Thread Doug MacEachern

geez.  i don't recall "Apache::Registry vs. pure PerlHandler" or
"Apache::Request vs. CGI.pm" ever being so harsh.

but they have been compared, for good reason.

Apache::Registry maps a request to a file and generates a subroutine to
run the code contained in that file.  if you use a 'PerlHandler
My::handler' instead of Apache::Registry, you have a direct mapping from
request to subroutine, without the steps inbetween.  these steps include:

stat the $r->filename
check that it exists and is executable
generate a Perl package name based on $r->uri
chdir basename $r->filename
compare last modified time
if modified or not compiled, compile the subroutine
chdir $old_cwd

if you cut out those steps, you cut out some overhead, plain and simple.
do you NEED to cut out that overhead?  i don't know, your requirements
determine that.

as for CGI.pm vs. Apache::Request.
last i checked 'use CGI qw(-compile => ':all') adds 1Mb size to the
server.  CGI.pm pulls lots of stunts under the covers to provide both a
method and function interface, etc.  Apache::Request is a very thin xs
layer on top of a C library and only adds a few k size to the server.
this C code is much faster and lighter than the Perl equivalent used in
CGI.pm or similar (e.g. CGI_Lite).  again, this difference might not
matter much to you, depending on your requirements.




Re: [RFC] holding a mod_perl conference

2000-03-30 Thread Cliff Rayman

if you bring in all sorts of other technologies,
how is this different than being part of apacheCon
or Perl Conference?

at least when I go to those (if i have time), almost
everything else at the conference has some interest for
me.  i have only a modicum of interest in python, cold fusion
and the like.

either make a mod_perl ONLY conference or stay attached to ApacheCon
or the Perl Conference.

cliff rayman
genwax.com

"J. Horner" wrote:

> On Thu, 30 Mar 2000, Stas Bekman wrote:
>
> > First of all, why holding yet another conference, the answer is
> > simple, we want mod_perl to be in the center of the event and not a
> > side project. Think about Perl Conference -- mod_perl is just a little
> > part of the Apache track. Think about ApacheCon -- mod_perl is again
> > just a drop in a ocean.
> >
> 
> >
> > The rest are full tracks dedicated for each technology, so if I want
> > to learn mod_perl I'd spend all the days listening to mod_perl
> > speakers so when the conference is over I'll go back with a bag full
> > of tricks and a very good push to get me going when I'll start coding
> > myself. Having a dedicated track will allow to provide all the
> > information that generally being skipped due to the lack of time.
> >
>
> I like the idea of mod_perl being the center of attention.  There are
> aspects of mod_perl in which I am very weak.  I'm wondering if this will
> fit the bill, though.
>
> In this scenario, we will have a conference with only partial interest in
> mod_perl.  With all of these other technologies, we will be able to bring
> in funding and support from some big names (possibly Sun, Allaire, etc),
> but we still only have a small piece of the pie.  We will have, in effect,
> a cluster of conferences.  Also, we will need space for each and every
> faction attending (a mod_perl conference room, a Cold Fusion conference
> room, a Java area, etc).
>
> Is this feasible?  Will this solve the problem?  I don't imagine a large
> amount of cooperation from competing vendors.
>
> Rebuttal?
>
> J. J. Horner
> Linux, Apache, Perl, Unix, Stronghold
> [EMAIL PROTECTED] http://www.knoxlug.org
> System has been up: 8 days.




[OT] I apologize

2000-03-30 Thread J. Horner

I apologize for the "me too" message.

I didn't expect a Spanish Inquisition. . . . 

J. J. Horner
Linux, Apache, Perl, Unix, Stronghold
[EMAIL PROTECTED] http://www.knoxlug.org
System has been up: 8 days.




Re: [admin] NO HTML posts please!

2000-03-30 Thread Doug MacEachern

esrever ni snoitseuq gnirewsna diova esaelp dna
 
> On 30 Mar 2000, Randal L. Schwartz wrote:
> 
> > > "Angel" == Angel R Rivera <[EMAIL PROTECTED]> writes:
> > 
> > Angel> how about avoiding the me toos...
> > 
> > Yeah, and the people that post "upside down", with the answer
> > *before* the question!
> > 
> > Definitely.  Let's avoid those.




Re: [OT] I apologize

2000-03-30 Thread Angel R. Rivera

You and me both!!! Guess the list is slow today... :)

At 02:49 PM 3/30/00 -0500, J. Horner wrote:
>I apologize for the "me too" message.
>
>I didn't expect a Spanish Inquisition. . . .


Angel R. Rivera, [EMAIL PROTECTED]
--
Website:  http://www.wolf.com
Lists:   http://www.wolf.com/lists/
--
"The Quality of a person's life is in direct proportion to their commitment
   to excellence, regardless of their chosen field of endeavor."

 Vincent T. Lombardi




Re: [admin] NO HTML posts please!

2000-03-30 Thread Randal L. Schwartz

> "Doug" == Doug MacEachern <[EMAIL PROTECTED]> writes:

Doug> esrever ni snoitseuq gnirewsna diova esaelp dna

($_ = < http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!



Re: [OT slightly] mod_perl developers (do they exist?)

2000-03-30 Thread Bakki Kudva

> If I understand correctly the handouts and possible audio/video records
> belong to the host of the conference. Therefore you should talk to them
> about this issue. It can be ORA, Camelot or any other conference
> organizer.

In that case they would have little incentive to release this material as
they are in the business of conducting training and tutorials.

> Another possibility is to organize a training session which will be hosted
> by you for example and then you will be able to make the recording with
> the only permission of the speakers.
>
> Of course if your intention is to make money by selling the recordings,
> you will have to pay a certain percentage to the "artists".

This is not my line of business and so I wasn't thinking of this as a
for-profit venture. It was more of a community service project in my mind.
However a nominal charge to recover production costs, (specially if CD-ROMs
are pressed) speaker's fees etc might be ok. The whole point was to make a
tutorial available to "the rest of us" and promote further use of mod_perl.
I wasn't personally planning on profiting from this other than the learning
experience at the 'feet of the gurus' :)

> BTW, I think that if you are serious about doing this project, I believe
> that the only way to do that is in the video format. It's hard to imagine
> the slide and see where the speaker points to with his laser on the audio
> recording. Audio format is fine for keynotes, but not for tutorials.

I used to feel the same way until I saw the SUN webcasts and Bruce Eckel's
"Thinking in Java" course. The slides/audio presentation works very well
over low bandwidth connections and would be cheaper to setup than a
streaming video server. Did you check out the links I had in my original
post? Just imaging that you are in a presentation in a darkened room where
you can't see the speaker :-)

bakki

Bakki Kudva
Navaco
(Electronic Document Management Solutions)
phone: (814) 833-2592
fax:  (603) 947-5747
http://www.navaco.com/




Re: [RFC - follow up] holding a mod_perl conference

2000-03-30 Thread John Armstrong

Awesome idea. Some thoughts :

Good sponsors could be companies that are currently using mod_perl.
Perhaps a recruiting / job fair area etc might be nice. Spa.com would
probably want to participate in this sort of capacity. Given the
current high demand for mod_perl folks, having a display of just how
MANY people are using it would serve a dual purpose, converting 
people to mod_perl ( 'Look, LOTS of people want to hire these people 
for much money. Wow, I should learn it' ) and allowing the companies
using the technology direct access to the people doing it.

Sorry for the sparse reply, I just think this is a cool idea and want
to help as much as I can. Everyone here in engineering is pretty
excited about the idea.

John Armstrong
VP, Technology
spa.com

>
> >Well, this is a follow up by the Camelot folks (Hi Stewart and Jeff)
> >So please comment on this one too, thanks!!!
> >
> >Regarding the scriptwebdev conference, I mentioned
> >this to Terry and Jeff again and they would like to
> >see an outline/plan for how this event might work.
> >For example, what would the tracks be exactly? Who are
> >some of the major vendors that we could target for
> >booths/sponsorships? What media/magazines could we
> >target specifically?  What competitive events should
> >we schedule against or worry about? Could this event
> >stand on its own or should it be a module/add-on to
> >the ApacheCon show?  While I realize we already
> >discussed some of these issues in Orlando, it would be
> >nice to have an official proposal from you that
> >addressed some of these things on paper.  Please note
> >that planning a conference can be extremely time
> >consuming/complicated (the devil is in the details)
> >and we need as much ammunition as possible in order to
> >consider doing this.
> >
> >Thanks,
> >
> >-stewq
> >
> >



Re: Apache::GzipChain and Netscape 4.7 doesnt work with huge files??

2000-03-30 Thread Honza Pazdziora

On Mon, Mar 27, 2000 at 05:05:47PM +0200, Janning Vygen wrote:

> of the page. calling "view page source" only shows half of the content. 
> 
> It does work with some other and smaller files. With huge files (about 50k and
> lots of table rows and data) its broken.
> 
> does anybody else notice this strange behaviour of netscape 4.7???

I'm unable to reproduce it here. What happens if you just take the
content, gzip it off-line and put it on server as html.gz. Will NN
gunzip is OK? It you do a telnet yourserver 80 and request that file,
do the headers differ?

-- 

 Honza Pazdziora | [EMAIL PROTECTED] | http://www.fi.muni.cz/~adelton/
   .project: Perl, DBI, Oracle, MySQL, auth. WWW servers, MTB, Spain.




Re: [OT] I apologize

2000-03-30 Thread Andrew Sweger

On Mar 30, 2000 @ 2:49pm, J. Horner wrote:

> I didn't expect a Spanish Inquisition. . . . 

(Okay, no one else said it, so...)

NOBODY expects the Spanish Inquisition!

-- 
 Andrew Sweger <[EMAIL PROTECTED]>   |  N2H2, Incorporated
 Systems Architect   |  900 Fourth Avenue, Suite 3400
 Advanced Technologies Division  |  Seattle WA 98164-1059
 v=206.336.2947  f=206.336.1541  |  http://www.n2h2.com/




Re: [RFC] holding a mod_perl conference

2000-03-30 Thread bthak



On Thu, 30 Mar 2000, Cliff Rayman wrote:

> if you bring in all sorts of other technologies,
> how is this different than being part of apacheCon
> or Perl Conference?
> 
> at least when I go to those (if i have time), almost
> everything else at the conference has some interest for
> me.  i have only a modicum of interest in python, cold fusion
> and the like.
> 
> either make a mod_perl ONLY conference or stay attached to ApacheCon
> or the Perl Conference.
> 

I agree with Cliff. The idea was for a mod_perl ONLY confernece. Now
the question is - is it possible, in demand, and/or profitable ?

Baiju Thakkar




Re: [new module] proposal Apache::DebugHeaders

2000-03-30 Thread Ask Bjoern Hansen

On Thu, 30 Mar 2000, Geoffrey Young wrote:

> Hi all...
> 
> I finished an alpha of DebugHeaders (now potentially called DebugInfo) -
> here's the description.  

I still think it would fit much better as patches to Apache::DumpHeaders.
:)

They are doing pretty much the same thing.


 - ask

-- 
ask bjoern hansen - 
more than 70M impressions per day, 




RE: :ShareLite with 5.6

2000-03-30 Thread Paul G. Weiss

I tried it (on Solaris) and indeed IPC::ShareLite does 
indeed pass on tests, however IPC::SharedCache (which is
a pure-Perl module that uses IPC::ShareList does not 
pass its tests:

Running make test
PERL_DL_NONLAZY=1 /usrl1/home/pweiss/perl-56/bin/perl -Iblib/arch -Iblib/lib
-I/usrl1/home/pweiss/perl-56/lib/5.6.0/sun4-solaris
-I/usrl1/home/pweiss/perl-56/lib/5.6.0 test.pl
1..9
ok 1
ok 2
IPC::SharedCache: Unable to get shared cache block 9 : No such file or
directory at blib/lib/IPC/SharedCache.pm line 1040
 
IPC::SharedCache::_get_share_object('IPC::SharedCache=HASH(0xfea30)', 9)
called at blib/lib/IPC/SharedCache.pm line 517
IPC::SharedCache::FETCH('IPC::SharedCache=HASH(0xfea30)',
'some_key') called at test.pl line 35
*** Error code 255
make: Fatal error: Command failed for target `test_dynamic'
  /usr/ccs/bin/make test -- NOT OK

-Original Message-
From: jason kirtland [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 28, 2000 1:59 PM
To: Paul G. Weiss; [EMAIL PROTECTED]
Subject: RE: :ShareLite with 5.6


The following has cleared up most module problems for me-

Build Perl 5.6 like so:

  Configure -Dbincompat5005 -Accflags=-DPERL_POLLUTE

And then for modules:

  perl Makefile.PL POLLUTE=1

On Linux, IPC::ShareLite passes all tests using the above.

-=j

> -Original Message-
> From: Paul G. Weiss [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 28, 2000 4:18 AM
> To: [EMAIL PROTECTED]
> Subject: IPC::ShareLite with 5.6
> 
> 
> I have been unsuccessful in building IPC::ShareLite,
> which is used by HTML::Template under 5.6.  Two problems:
> 
> (1) It won't build at all w/o adding 
>   #define PERL_POLLUTE 
> 
> before the 
>  
>   #include "EXTERN.h"
>   #include "perl.h"
>   #include "XSUB.h"
> 
> in ShareLite.xs.
> 
> (2) After building it, test fails:
> 
> 1..8
> ok 1
> ok 2
> ok 3
> Bad realloc() ignored at
> /usrl1/home/pweiss/perl-56/lib/site_perl/5.6.0/sun4-solari
s/IPC/ShareLite.pm
> line 111.
> Segmentation Fault (core dumped)
> 
> 
> This also occurs if I build the extension under 5.00503 
> and run in under
> 5.6.  
> 
> Can anyone confirm this problem and suggest a workaround?
> 
> -Paul
> 



Re: [new module] proposal Apache::DebugHeaders

2000-03-30 Thread Geoffrey Young

Hi all...

I finished an alpha of DebugHeaders (now potentially called DebugInfo) -
here's the description.  

As I've said in the past, I'm terrible with names - barring any adverse
feedback, I'll upload it to CPAN under 
Apache-DebugInfo_0.01 sometime today or tomorrow...

--Geoff



=head1 NAME

Apache::DebugInfo - log various bits of request data 

=head1 SYNOPSIS

  There are two ways to use this module...

  1) using Apache::DebugInfo to control debugging automatically

httpd.conf:

  PerlInitHandler Apache::DebugInfo
  PerlSetVar  DebugInfo On

  PerlSetVar  DebugHeadersIn On
  PerlSetVar  DebugHeadersOut On
  PerlSetVar  DebugNotes On
  PerlSetVar  DebugPNotes On
  PerlSetVar  DebugPID On

  2) using Apache::DebugInfo on the fly

in handler or script:

  use Apache::DebugInfo;

  my $r = shift;

  my $debug_object = Apache::DebugInfo->new($r);
 
  # dump $r->headers_in right now
  $debug_object->headers_in;

  # log $r->headers_out after the response goes to the client
  $debug_object->headers_in('PerlCleanupHandler');

  # log all the $r->pnotes at Fixup and at Cleanup
  $debug_object->pnotes('PerlCleanupHandler','PerlFixupHandler');

=head1 DESCRIPTION

  Apache::DebugInfo offers the ablilty to monitor various bits of
  request data.  

  You can enable Apache::DebugInfo as a PerlInitHandler, in which
  case it chooses what request phase to display the appropriate
  data.  The bits of data can be controlled by setting various
  variables to On:

DebugInfo- enable Apache::DebugLog
   
DebugPID- calls pid() during request init
DebugHeadersIn  - calls headers_in() during request init

DebugHeadersOut - calls headers_out() during request cleanup
DebugNotes  - calls notes() during request cleanup
DebugPNotes - calls pnotes() during request cleanup

  Alternatively, you can control debugging activity on the fly by
  calling the methods directly.

  All data is displayed in your error_log (well, whatever you have
  STDERR pointed to, actually).

=head1 METHODS

  Apache::DebugInfo provides an object oriented interface to allow you
  to call the various methods from either a module, handler, or an
  Apache::Registry script.

  Constructor:
new($r) - create a new Apache::DebugInfo object
  requires a valid Apache request object

  Methods:
All methods can be called without any arguments, in which case
the associated data is logged immediately.  Optionally, each
can be called with a list (either explicitly or as an array) 
of Perl*Handlers, which will log the data during the appropriate
phase.  

headers_in()  - display all of the incoming HTTP headers
 
headers_out() - display all of the outgoing HTTP headers

notes()   - display all the strings set by $r->notes

pnotes()  - display all the variables set by $r->pnotes

pid() - display the process PID

=head1 NOTES

  Verbose debugging is enabled by setting the variable
  $Apache::DebugInfo::DEBUG=1 to or greater.

  This is alpha software, and as such has not been tested on multiple
  platforms or environments.  It requires PERL_INIT=1, PERL_CLEANUP=1,
  PERL_LOG_API=1, PERL_STACKED_HANDLERS=1, and maybe other hooks to 
  function properly.

=head1 FEATURES/BUGS

  Calling Apache::DebugInfo methods with 'PerlHandler' as an argument
  has been disabled - for some reason you get your headers and script
  printed to the browser.  I'd love to know how this happens, but at 
  any rate, I thought I'd save the unaware from potential pitfalls.

  Phase misspellings, like 'PelrInitHandler' pass through without
  warning, in case you were wondering where your output went...

=head1 SEE ALSO

  perl(1), mod_perl(1), Apache(3), Apache::Table(3)

=head1 AUTHOR

  Geoffrey Young <[EMAIL PROTECTED]>

=head1 COPYRIGHT

  Copyright 2000 Geoffrey Young - all rights reserved.

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

=cut



RE: [new module] proposal Apache::DebugHeaders

2000-03-30 Thread Geoffrey Young

Hey, I'm not trying to redo anyone's work or step on toes...

I looked at DumpHeaders and thought that my stuff didn't quite fit in
becuase:
  1) it's longer - DumpHeaders is short and sweet
  2) it's my attempt at trying to make something OO and extensible
  3) it has functionality that DumpHeaders doesn't (and doesn't 'allow' for
by name)
  4) it allows you to track stuff throughout the request cycle (for modules
that change them)

Here's the code (minus documentation - if it isn't appropriate it isn't.
Let me know what you think - I'm open to anything...


BTW, this is still alpha, so be kind :)

package Apache::DebugInfo;

#-
#
# usage: various - see the perldoc below
#
#-

use 5.004;
use mod_perl 1.21;
use Apache::Constants qw( OK DECLINED SERVER_ERROR);
use Apache::Log;
use strict;

$Apache::DebugInfo::VERSION = '0.01';

# set debug level
#  0 - messages at info or debug log levels
#  1 - verbose output at info or debug log levels
$Apache::DebugInfo::DEBUG = 0;

sub handler {
#-
# this is kinda clunky, but we have to build in some intelligence
# about where the various methods will do the most good
# for those who don't get the apache request cycle
#
# do some preliminary stuff...
#-
  
  my $r   = shift;
  my $log = $r->server->log;

  return OK unless $r->dir_config('DebugInfo') =~ m/On/i;

  my (@inits, @cleanups);

  push @inits, "headers_in" 
if $r->dir_config('DebugHeadersIn') =~ m/On/i;
  push @inits, "headers_out" 
if $r->dir_config('DebugHeadersOut') =~ m/On/i;
  push @cleanups, "notes" 
if $r->dir_config('DebugNotes') =~ m/On/i;
  push @cleanups, "pnotes"
if $r->dir_config('DebugPNotes') =~ m/On/i;
  push @cleanups, "pid" 
if $r->dir_config('DebugPID') =~ m/On/i;

  $log->info("Using Apache::DebugInfo") if $Apache::DebugLog::DEBUG;

#-
# push the various debug routines onto the stack
#-

  foreach my $phase (@inits) {
my $rc = push_on_stack($r, $phase, 'PerlInitHandler' );
return SERVER_ERROR if $rc;
  }

  foreach my $phase (@cleanups) {
my $rc = push_on_stack($r, $phase, 'PerlCleanupHandler');
return SERVER_ERROR if $rc;
  }

#-
# wrap up...
#-

  $log->info("Exiting Apache::DebugInfo") if $Apache::DebugLog::DEBUG;

  return OK;
}

sub new {
#-
# create a new Apache::DebugInfo object
#-
  
  my ($class, $r) = @_;

  my %self = {};

  my $log   = $r->server->log;
  $self{request}= $r;
  $self{log}= $log;

  bless(\%self, $class);
 
  $log->info("\ta new Apache::DebugInfo object was generated") 
if $Apache::DebugInfo::DEBUG;

  return \%self;
}

sub push_on_stack {

  my ($r, $debug, @phases) = @_;
  
  foreach my $phase (@phases) {
# disable direct PerlHandler calls - it spits Registry scripts
# to the browser...
next if $phase =~ m/PerlHandler/;

$r->push_handlers($phase => sub {
  my $object = Apache::DebugInfo->new($r);
  $object->$debug();
});
$r->server->log->info("\t$phase debugging enabled for \$r->$debug")
  if $Apache::DebugInfo::DEBUG;
   }
   return;
}

sub headers_in {
#-
# do some preliminary stuff...
#-
  
  my $self  = shift;

  my @phases= @_;

  my $r = $self->{request};
  my $log   = $self->{log};

  my $uri   = $r->uri;

  $log->info("Using Apache::DebugInfo::headers_in")
 if $Apache::DebugInfo::DEBUG;

#-
# if there are arguments, push the routine onto the handler stack
#-

  if (@phases) {
push_on_stack($r, 'headers_in', @phases);
return 1;
  }

#-
# otherwise, just print $r->headers_in in a pretty format
#-

  my $headers_in = $r->headers_in;

  print STDERR "Debug headers_in for $uri during " .
$r->notes('PERL_CUR_HOOK') . "\n";

  $headers_in->do(sub {
my ($field, $value) = @_;
if ($field =~ m/Cookie/) {
  my @values = split /; /, $value;
  foreach my $cookie (@values) {
pri

Installation

2000-03-30 Thread Annette



I have been trying to install mod_perl for the last 
couple of weeks and I still have not been successful. I am new to Linux and have 
installed RedHat 6. I used the Custom set-up and installed mod_perl during the 
installation. I entered the command 'perl -v' and it tells me that I have perl 
loaded but not mod_perl. Does anyone know what I have to do to enable mod_perl, 
tell if I have it enabled, or where I can read about the installation under 
RedHat 6. I have tried installing it using src files, followed the directions 
line by line and still nothing. Is this the right mailing list to ask this 
question? Where should I go if not? Apache is up and running just fine. Any 
input would be appreciated.
 
Ann.


Re: Installation

2000-03-30 Thread Ed Loehr

> Annette wrote:
> 
> I have been trying to install mod_perl for the last couple of weeks and
> I still have not been successful. I am new to Linux and have installed
> RedHat 6. I used the Custom set-up and installed mod_perl during the
> installation. I entered the command 'perl -v' and it tells me that I
> have perl loaded but not mod_perl. Does anyone know what I have to do to
> enable mod_perl, tell if I have it enabled, or where I can read about
> the installation under RedHat 6. I have tried installing it using src
> files, followed the directions line by line and still nothing. Is this
> the right mailing list to ask this question? Where should I go if not?
> Apache is up and running just fine. Any input would be appreciated.

The essential can't-run-modperl-without-it guide:  

http://perl.apache.org/guide

Regards,
Ed Loehr



Installation

2000-03-30 Thread Annette



Thanks for such a quick response. I have been in 
the mod_perl guide before asking the question. I learned from other mailing 
lists to always look in as many documents to solve your problem before 
posting a question. Some people get irritated quickly when you ask before 
looking. I have followed the steps listed below and it seemed like I was not 
successful. How can you tell that mod_perl was loaded successfully? I am going 
to re-load RedHat linux 6 again but not load the server software. I will try the 
steps below to load apache and mod_perl. Thanks for the input.
 
Ann.
  
  % cd /usr/src  % lwp-download http://www.apache.org/dist/apache_x.x.x.tar.gz  
% lwp-download http://perl.apache.org/dist/mod_perl-x.xx.tar.gz  
% tar xzvf apache_x.x.x.tar.gz  % tar xzvf 
mod_perl-x.xx.tar.gz  % cd mod_perl-x.xx  % perl Makefile.PL 
APACHE_SRC=../apache_x.x.x/src \    DO_HTTPD=1 USE_APACI=1 
EVERYTHING=1  % make && make test && make 
install  % cd ../apache_x.x.x  % make 
install


Re: Installation

2000-03-30 Thread Jeff Beard

./httpd -l will list all the mods built in.

--Jeff

At 08:00 PM 3/30/00, Annette wrote:
>Thanks for such a quick response. I have been in the mod_perl guide before 
>asking the question. I learned from other mailing lists to always look in 
>as many documents to solve your problem before posting a question. Some 
>people get irritated quickly when you ask before looking. I have followed 
>the steps listed below and it seemed like I was not successful. How can 
>you tell that mod_perl was loaded successfully? I am going to re-load 
>RedHat linux 6 again but not load the server software. I will try the 
>steps below to load apache and mod_perl. Thanks for the input.
>
>Ann.
>
>   % cd /usr/src
>   % lwp-download 
> 
>http://www.apache.org/dist/apache_x.x.x.tar.gz
>   % lwp-download 
> 
>http://perl.apache.org/dist/mod_perl-x.xx.tar.gz
>   % tar xzvf apache_x.x.x.tar.gz
>   % tar xzvf mod_perl-x.xx.tar.gz
>   % cd mod_perl-x.xx
>   % perl Makefile.PL APACHE_SRC=../apache_x.x.x/src \
> DO_HTTPD=1 USE_APACI=1 EVERYTHING=1
>   % make && make test && make install
>   % cd ../apache_x.x.x
>   % make install



Jeff Beard
___
Web:www.cyberxape.com
Phone:  303.443.9339
Location:   Boulder, CO, USA





adding Server-Side Includes to default files

2000-03-30 Thread Sam Carleton

I would like to have server-side includes to be parsed on DirectoryIndex
files.  I have followed the example in "Writing Apache Modules in Perl
and C" and have my Apache::ESSI and this is what is in my perl.conf:


SetHandler perl-script
PerlHandler Appache::ESSI
PerlSetVar ESSIDefs conf/essi.defs

AddType text/html .ehtml

What type of directive to I need to put into perl.conf so that the code
gets called on a directory index file?

Sam




Re: [RFC] holding a mod_perl conference

2000-03-30 Thread Ken Williams

[EMAIL PROTECTED] wrote:
>On Thu, 30 Mar 2000, Cliff Rayman wrote:
>> if you bring in all sorts of other technologies,
>> how is this different than being part of apacheCon
>> or Perl Conference?
>> 
>> at least when I go to those (if i have time), almost
>> everything else at the conference has some interest for
>> me.  i have only a modicum of interest in python, cold fusion
>> and the like.
>> 
>> either make a mod_perl ONLY conference or stay attached to ApacheCon
>> or the Perl Conference.
>> 
>
>I agree with Cliff. The idea was for a mod_perl ONLY confernece. Now
>the question is - is it possible, in demand, and/or profitable ?

The YAPC conference at Carnegie Mellon was certainly quite a nice conference. 
No booths, etc., but just people getting together to present things and talk
Perl.  What about something like that?


  ------
  Ken Williams Last Bastion of Euclidity
  [EMAIL PROTECTED]The Math Forum





Re: adding Server-Side Includes to default files

2000-03-30 Thread Sam Carleton

Sam Carleton wrote:

> I would like to have server-side includes to be parsed on DirectoryIndex
> files.  I have followed the example in "Writing Apache Modules in Perl
> and C" and have my Apache::ESSI and this is what is in my perl.conf:
>
> 
> SetHandler perl-script
> PerlHandler Appache::ESSI
> PerlSetVar ESSIDefs conf/essi.defs
> 
> AddType text/html .ehtml
>
> What type of directive to I need to put into perl.conf so that the code
> gets called on a directory index file?

After some more playing around with it, the problem is not exactly what I
said in the above.  I have the above directive in the perl.conf that is
include into http.conf via ResourceConfig before the def of any web sites.
Now, at the bottom of the http.conf I have a virtual site defined on a
different IP address.  It is on this virtual site that the server side
includes work correctly.  On the main web site the server side includes do
NOT work.  Any thoughts?  I would like to leave all aspects of perl conf in
the the perl.conf.

Sam




Perl 5.6 and mod_perl

2000-03-30 Thread Jeff Stuart

Has anyone tried to use mod_perl with perl 5.6 yet?  If so, how did it go?
Oh, are we still at 1.21 for mod_perl?  If so, when's the next release?  I
hear that there are some important memory leak fixes in there.

--
Jeff Stuart
[EMAIL PROTECTED]





Re: Perl 5.6 and mod_perl

2000-03-30 Thread Rodney Broom \(OE\)

- Original Message -
From: "Jeff Stuart" <[EMAIL PROTECTED]>


> Has anyone tried to use mod_perl with perl 5.6 yet?

Yes, all day.


>  If so, how did it go?

U guess. Lots of weird little errors that I can't quite resolve. I can get
Apache installed, but if I build with mod_perl, I can't get cgi or indexing
to work. They just spit out segment fault errors.

I've tried installing from the mod_perl build (1.21 and 1.22), and from CPAN
shell. I've tried with Apache 1.3.9 and 1.3.12, same thing. If I build
without mod_perl, Apache behaves just fine. I'm going to try building Apache
with mod_perl as an extra module; if that doesn't work, I'm going to
downgrade my Perl back to 5.005.

If I'm just being silly and missing something, please hollar at me!

Rodney





Re: [PATCH 5.6.0] local $SIG{FOO} restoration

2000-03-30 Thread Doug MacEachern

On Wed, 29 Mar 2000, Hugo wrote:
 
> I believe that this (or take2) might cause a problem for code like:
> 
>   sub handler { print "sig handled" }
>   my $handlesub = "handler";
> 
>   [... something reads $handlesub in numeric context ...]
> 
>   $SIG{ALRM} = $handlesub;

i suppose the handler should not be restored if it was Perl's, something
along the lines of (on top of take2 patch):

--- mg.c~   Tue Mar 28 23:44:09 2000
+++ mg.cThu Mar 30 11:50:05 2000
@@ -966,7 +966,7 @@
/* cache state so we don't fetch it again */
if(sigstate == SIG_IGN)
sv_setpv(sv,"IGNORE");
-   else if (sigstate)
+   else if (sigstate && sigstate != PL_sighandlerp)
sv_setiv(sv,(IV)sigstate);
else
sv_setsv(sv,&PL_sv_undef);





Re: [PATCH 5.6.0] local $SIG{FOO} restoration

2000-03-30 Thread Tom Christiansen

>i suppose the handler should not be restored if it was Perl's, something
>along the lines of (on top of take2 patch):

Exactly! this kind of thing is common in programs that do sigmasks
or tty mode masks.  The typical mistake is

set noecho
do something
unset noecho

or

block sigfoo
do something
unblock sigfoo

In both cases the bug is the same: you shouldn't undo something that
was already undone to start with. 

--tom