RE: Apache::DB ported to mp2

2004-04-08 Thread Craig Dayton
Hi Frank,

Thanks for the Update.

In compiling with 'VS .Net 2003', the error shown below is generated.


-Craig


E:\Perl\cpan\build\Apache-DB-0.07>nmake

Microsoft (R) Program Maintenance Utility Version 7.10.3077
Copyright (C) Microsoft Corporation.  All rights reserved.

cl -c-nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE
-DNO_ST
RICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS
-DUSE_PERLIO
-DPERL_MSVCRT_READFIX -MD -Zi -DNDEBUG -O1-DVERSION=\"0.07\"
-DXS_VERSION=\
"0.07\"  "-IE:\Perl\lib\CORE"   DB.c
DB.c
DB.xs(55) : error C2065: 'SIGINT' : undeclared identifier
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.

-Original Message-
From: Frank Wiles [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 07, 2004 11:42
To: [EMAIL PROTECTED]
Subject: Apache::DB ported to mp2



  Hi Everyone, 

  I've ported Apache::DB to work with mp1 and mp2.  I've done some 
  initial testing, but would appreciate anyone interested to give 
  it a whirl.  Let me know if you run into any problems. 

  Note that I haven't ported Apache::DProf or Apache::SmallProf
  yet, but plan on doing those in the next few weeks as time
  permits. 

  You can grab it at: 

  http://cpan.org/authors/id/F/FW/FWILES/Apache-DB-0.07.tar.gz

  Once I've done a bit more testing and get the other modules ported
  it will be released on CPAN for general consumption. 

 -
   Frank Wiles <[EMAIL PROTECTED]>
   http://frank.wiles.org
 -


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



mod_perl and JavaScript

2004-04-08 Thread Kemin Zhou
This is almost certainly caused by a bug in your perl code.  You are
probably unintentionally creating a closure.  If you post some code
here, we can help you spot the problem.
- Perrin
Earlier I posted a problem with HPPTD and mod_perl.
Thanks for Perrin's respons.  

Now I have the problem solved.
The bug is the classical problem with named subroutin inside another subroutine.
This is one shortcoming of mod_perl.  PHP would not have such a problem.

I was using the CGI object as a global variable

my $q = new CGI

do something 

my $request = $q->param('request');
if ($request eq 'updateTable') {
updateDBTable();
}
sub updateDBTable {
my $form_variable = $q->param('variable_name');
}
==
This code would have no problem at all if run as CGI script.
It it will be very bad under mod_perl.
So don't write this.  There are many solutions to this.
One of them is to pass $q as argument of the subroutine.  This is the one I used.


The problem looks as if a caching problem.  Because after the second run, the 
subroutine and the main program the $q-> will point to different forms.

Kemin



**
Proprietary or confidential information belonging to Ferring Holding SA or to one of 
its affiliated companies may be contained in the message. If you are not the addressee 
indicated in this message (or responsible for the delivery of the message to such 
person), please do not copy or deliver this message to anyone. In such case, please 
destroy this message and notify the sender by reply e-mail. Please advise the sender 
immediately if you or your employer do not consent to e-mail for messages of this 
kind. Opinions, conclusions and other information in this message represent the 
opinion of the sender and do not necessarily represent or reflect the views and 
opinions of Ferring.
**
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [mp2] rflush failed test w/ Mandrake 9.2

2004-04-08 Thread Gary C. New
I upgraded from Mandrake's stock 9.2 perl rpms to the stock 10.0 perl 
rpms (perl-5.8.3-5mdk) and it works like a charm.  The perl upgrade 
wasn't as painful as I thought it might be.  I upgraded perl, perl-base, 
and perl-devel and the only dependence I had to worry about was 
mandrake-doc-common.

I appreciate everyones advice.  Consider this issue resolved.

Respectfully,

Gary

Stas Bekman wrote:
Hi Gary,

You may have seen my post on the mod_perl list about rflush failed 
test with MP2.  


Wasn't it resolved already? I thought you reported success.

I'm using Mandrake 9.2 and I heard that you use Mandrake with your 
mod_perl install.  Could you give me a brief synopsis of your 
mod_perl-2.0 setup on Mandrake?

I'm trying to build MP2 against Mandrake's stock perl-5.8.1 rpm and my 


I remember seeing 5.8.1 RC4, right? You really need to have a release 
version and not a development one. RC is not good. The fact that the 
distro decides that it's good for their own needs, doesn't necessarily 
mean it's good for the rest of the projects. I suggest that you either 
move to a higher version or build your own.

own custom Apache2.  Everything seems to complete fine except the 
rflush test fails every time.  This is the ONLY test that fails.  I've 
tried updating against MODPERL_1_99_13 and HEAD with no success.  
5005threads are undefined and ithreads are defined with the stock perl 
rpm.

The rflush test seems to fail at the very last line when it tries to 
compare the expected and received variables.  Is there any way to 
check these variables' output?


Certainly, just run it in the verbose mode:

t/TEST -v api/rflush

and post it here. Please repost the whole bugreport info, as I don't 
have it around.

I would appreciate any suggestions you may have.


Let's see what the verbose output gives first.

FWIW, I don't use stock Mandrake perl for testing and in any case I'm 
running Mandrake 10 with perl-5.8.3-5mdk, so it won't help you much. I 
can post my custom build of perl 5.8.1's info (but this is *not* RC4) 
after you tell me which one do you use, in the bugreport. There are so 
many ways to build perl.

__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: Getting started with mod_perl

2004-04-08 Thread Stas Bekman
Gedanken wrote:
On Thu, 8 Apr 2004, Stas Bekman wrote:

 My mod_perl 2 tutorial is on Monday July 26, 1:45pm to 5:15pm. Feel free to 
 stop by and learn so you can do more than just mention it.
 
forgive my ignornace, but where?
Randal was talking about OSCON.
http://conferences.oreillynet.com/os2004/
I usually also give this tutorial when I travel and happen to be around some 
perl mongers groups. But I need to write a new one since many things have 
changed over the period of the last year.

__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: Getting started with mod_perl

2004-04-08 Thread Gedanken
On Thu, 8 Apr 2004, Stas Bekman wrote:

 My mod_perl 2 tutorial is on Monday July 26, 1:45pm to 5:15pm. Feel free to 
 stop by and learn so you can do more than just mention it.
 
forgive my ignornace, but where?


-- 
gedanken


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Re: Getting started with mod_perl

2004-04-08 Thread Stas Bekman
Randal L. Schwartz wrote:

So, I'll have to change my spin a bit... can someone give me the
latest pointers to "here's mp2 for you mp1 experts" notes or slides?
http://perl.apache.org/docs/2.0/user/

__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: Getting started with mod_perl

2004-04-08 Thread Stas Bekman
Randal L. Schwartz wrote:
"Stas" == Stas Bekman <[EMAIL PROTECTED]> writes:


Stas> While mod_perl2 is almost there it is still in beta and some of the
Stas> API is still changing. So if you want to stick with a stable API use
Stas> mod_perl1 for now.
Yeah, I was wondering about that.
Hopefully by the conference time the API will be frozen and may be even 2.0 
released. It depends on how much help we can get on various fronts of 
polishing things and completing the missing things.

In particular, I've been drafted to give a "mod perl" talk on the
Apache track at OSCON.  My notes are all mod-perl1.  Will I be boo'ed
off the stage if I mention mod_perl2 only in passing?
My mod_perl 2 tutorial is on Monday July 26, 1:45pm to 5:15pm. Feel free to 
stop by and learn so you can do more than just mention it.

__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: Getting started with mod_perl

2004-04-08 Thread Frank Wiles
On 08 Apr 2004 11:53:09 -0700
[EMAIL PROTECTED] (Randal L. Schwartz) wrote:

> > "Frank" == Frank Wiles <[EMAIL PROTECTED]> writes:
> 
> Frank>   Considering most (if not all) of the talks last year at OSCON
> were Frank>   about 2.0 or switching to 2.0, a mostly 1.0 talk might
> be welcomed Frank>   by people who are new to mod_perl or not looking
> to switch in the Frank>   near future. 
> 
> Ahh, the talks I couldn't attend because I was busy manning my exhibit
> hall booth, trying desparately to pay my bills for the year. :)
> 
> So, I'll have to change my spin a bit... can someone give me the
> latest pointers to "here's mp2 for you mp1 experts" notes or slides?

  This link has been invaluable to me in moving from mp1 to mp2, it's
  probably the best place to start: 

  http://perl.apache.org/docs/2.0/user/porting/compat.html

 -
   Frank Wiles <[EMAIL PROTECTED]>
   http://frank.wiles.org
 -


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Re: Getting started with mod_perl

2004-04-08 Thread Randal L. Schwartz
> "Frank" == Frank Wiles <[EMAIL PROTECTED]> writes:

Frank>   Considering most (if not all) of the talks last year at OSCON were
Frank>   about 2.0 or switching to 2.0, a mostly 1.0 talk might be welcomed
Frank>   by people who are new to mod_perl or not looking to switch in the
Frank>   near future. 

Ahh, the talks I couldn't attend because I was busy manning my exhibit
hall booth, trying desparately to pay my bills for the year. :)

So, I'll have to change my spin a bit... can someone give me the
latest pointers to "here's mp2 for you mp1 experts" notes or slides?

-- 
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!

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Re: Getting started with mod_perl

2004-04-08 Thread Frank Wiles
On 08 Apr 2004 11:35:50 -0700
[EMAIL PROTECTED] (Randal L. Schwartz) wrote:

> > "Stas" == Stas Bekman <[EMAIL PROTECTED]> writes:
> 
> Stas> While mod_perl2 is almost there it is still in beta and some of
> the Stas> API is still changing. So if you want to stick with a stable
> API use Stas> mod_perl1 for now.
> 
> Yeah, I was wondering about that.
> 
> In particular, I've been drafted to give a "mod perl" talk on the
> Apache track at OSCON.  My notes are all mod-perl1.  Will I be boo'ed
> off the stage if I mention mod_perl2 only in passing?

  I think as long as you specify up front that it's mostly about mp1
  I don't think anyone would boo you. :)  However, you might not get as
  big of a turn out from those of us who have switched or are in the
  process of switching to 2.0.  

  Considering most (if not all) of the talks last year at OSCON were
  about 2.0 or switching to 2.0, a mostly 1.0 talk might be welcomed
  by people who are new to mod_perl or not looking to switch in the
  near future. 

 -
   Frank Wiles <[EMAIL PROTECTED]>
   http://frank.wiles.org
 -


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



ANN: Krang v1.015 Released

2004-04-08 Thread Sam Tregar
Krang v1.015 in now available.  Changes in this release:

  - Added support for Gentoo Linux, Fedora Core and FreeBSD.

  - Upgraded Apache and mod_perl to their latest releases.

  - Fixed numerous bugs and portability problems.

  - Improved documentation.

Detailed change-log here: http://krang.sf.net/docs/changelog.html

Krang is an Open Source web-publisher / content-management system
designed for large-scale magazine-style websites.  It is a 100% Perl
application using Apache/mod_perl and MySQL, as well as numerous CPAN
modules.

Krang provides a powerful and easy to use story and media editing
environment for magazine editors, as well as a complete template
development environment for web designers. On the back-end, Perl
programmers can customize Krang to control the data entered in the
story editor and add code to drive the templates to build output.
Krang can be enhanced with add-ons containing new skins and other new
features.  Krang easily handles large data sets and can manage
multiple websites in a single installation.

For more information about Krang, visit the Krang website:

  http://krang.sourceforge.net/

There you can download Krang, view screenshots, read documentation,
join our mailing-lists and access the CVS tree.

- the Krang team

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Re: Getting started with mod_perl

2004-04-08 Thread Randal L. Schwartz
> "Stas" == Stas Bekman <[EMAIL PROTECTED]> writes:

Stas> While mod_perl2 is almost there it is still in beta and some of the
Stas> API is still changing. So if you want to stick with a stable API use
Stas> mod_perl1 for now.

Yeah, I was wondering about that.

In particular, I've been drafted to give a "mod perl" talk on the
Apache track at OSCON.  My notes are all mod-perl1.  Will I be boo'ed
off the stage if I mention mod_perl2 only in passing?

-- 
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!

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Re: Getting started with mod_perl

2004-04-08 Thread Stas Bekman
Ken Burcham wrote:
Hi,

ModPerl2 and Apache2 are the latest and greatest (You can't run 
Apache1 with ModPerl2 or Apache2 with ModPerl1).  Note also 
mod_perl_1.99 is (going to be) mod_perl2.

Here's what I do:

wget http://perl.apache.org/dist/mod_perl-2.0-current.tar.gz

and

wget http://apache.mirrors.pair.com/httpd/httpd-2.0.48.tar.gz
BTW, Apache 2.0.49 is the latest version, not 2.0.48.

While mod_perl2 is almost there it is still in beta and some of the API is 
still changing. So if you want to stick with a stable API use mod_perl1 for now.

__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: mod_perl performance question

2004-04-08 Thread Stas Bekman
Perrin Harkins wrote:
On Thu, 2004-04-08 at 11:48, Pascal Felber wrote:

The server is a [EMAIL PROTECTED]
512MB, running linux 2.4.18-3, Apache 2.0.48, and mod_perl 1.99_08.


That came out more than a year ago.  You should be running the latest
(1.99_13 at the moment) if you're going to do this kind of stress
testing.
Neither you are giving us a proper problem report :( We can't even tell 
whether you are using the prefork or the worker MPM. If you are using the 
worker mpm that will explain your observation. Starting a new interpreter 
under server with many loaded modules at run time is *very* slow, due to perl 
(not mod_perl). If you are using prefork then you may get new processes 
spawned, but usually forks are very fast. So my guess is that you are using 
the worker mpm.

Please, please, remember to always submit a proper bug report if you want us 
to help you: http://perl.apache.org/bugs/

__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: Problem with modperl2/apache2/apreq2 upload

2004-04-08 Thread Joe Schaefer
"Ken Burcham" <[EMAIL PROTECTED]> writes:

[...]

> foreach my $key (keys %{$uploads})
> {
>warn "Uploader found $key";
> 
>my $upload = $uploads->{$key};
> 
>warn "Found $upload->filename";
> 
> }

[...]

> But nothing else as if my foreach finds nothing...  What am I 
> missing?  :) 

No clue at the moment-  foreach(keys %$uploads) should loop once
for the upload file.  I'll look into that problem also.

[...]

> warn "There was a problem uploading: $uploadfile" unless $upload-
> >link($uploadfile);
> 
> Am I on the right track with this?  It fails...  In another 
> thread (http://www.gossamer-
> threads.com/archive/mod_perl_C1/modperl_F7/File_uploads_using_Apa
> che:%3Brequest_in_mod_perl2_P101676), you mention 3 possibilities 
> as to why it could fail and it implicates a temp directory...  

Yes, your problem with link() is likely the temp dir location.
That problem is resolved in current cvs, and with the patch I 
posted on that thread.

> 
> I'm expecting it to write to that file.  The $upload_dir exists, 
> but the file obviously doesn't because I'm trying to upload it...  
> 
> Do I need to ->bb and then write it?  

No, link() will do it for you; use current cvs or apply the patch.

-- 
Joe Schaefer


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Re: Getting started with mod_perl

2004-04-08 Thread Ken Burcham



Hi,


ModPerl2 and Apache2 are the latest and greatest (You can't run 
Apache1 with ModPerl2 or Apache2 with ModPerl1).  Note also 
mod_perl_1.99 is (going to be) mod_perl2.


Here's what I do:

wget http://perl.apache.org/dist/mod_perl-2.0-current.tar.gz


and

wget http://apache.mirrors.pair.com/httpd/httpd-2.0.48.tar.gz


and while you're at it, grab the Apache::Request stuff:

wget http://search.cpan.org/CPAN/authors/id/J/JO/JOESUF/libapreq2-2.02_02-
dev.tar.gz


ken.



On 8 Apr 2004 at 10:44, Ian harisay wrote:


> Hi,
> 
> I am just getting started with mod_perl.  Can someone tell me what 
> versions of Apache and  mod_perl I should run together?
> 
> I am setting up a 1U server and a laptop.  I  have been debating RH9 or 
> Fedora.  Any opinions there?
> 
> Thanks for your input.
> 
> -Ian
> 
> 
> 
> -- 
> Report problems: http://perl.apache.org/bugs/
> Mail list info: http://perl.apache.org/maillist/modperl.html
> List etiquette: http://perl.apache.org/maillist/email-etiquette.html



-- 
Ken Burcham
Ken Burcham Consulting, Inc.
http://www.capemaystation.com




Re: Problem with modperl2/apache2/apreq2 upload

2004-04-08 Thread Ken Burcham
I tried as you suggested and here's what I have:

my $q = Apache::Request->new($r);

my $uploads = $q->upload;  

my @arrayups = $q->upload;

warn "There's an array of scalars: ". scalar @arrayups;
warn "and I have a table ref: ".$uploads;

foreach my $key (keys %{$uploads})
{
   warn "Uploader found $key";

   my $upload = $uploads->{$key};

 warn "Found $upload->filename";

}

and this is what I get:

There's an array of scalars: 24 at (eval 20) line 8.
and I have a table ref: Apache::Upload::Table=HASH(0x8222cdc) at 
(eval 20) line 9.

But nothing else as if my foreach finds nothing...  What am I 
missing?  :)  I'm looking at last example in the synopsis of:

http://search.cpan.org/~stas/mod_perl-1.99_13/docs/api/APR/Table.pod

also, when I finally do get it (by cheating and calling $q-
>upload('resourceurl') directly) I'm trying to link using this:

my $filename = $upload->filename;
#my $upload_filehandle = $upload->fh;
$filename =~ s/.*[\/\\](.*)/$1/;
warn "filename:". $filename;
my $upload_dir = $sysparms->{uploaddirectory};
my $uploadfile = "$upload_dir/$filename";

warn "There was a problem uploading: $uploadfile" unless $upload-
>link($uploadfile);

Am I on the right track with this?  It fails...  In another 
thread (http://www.gossamer-
threads.com/archive/mod_perl_C1/modperl_F7/File_uploads_using_Apa
che:%3Brequest_in_mod_perl2_P101676), you mention 3 possibilities 
as to why it could fail and it implicates a temp directory...  

I'm expecting it to write to that file.  The $upload_dir exists, 
but the file obviously doesn't because I'm trying to upload it...  

Do I need to ->bb and then write it?  

thanks!

ken.


On 8 Apr 2004 at 10:56, Joe Schaefer wrote:

> "Ken Burcham" <[EMAIL PROTECTED]> writes:
> 
> > Ok, I might be on to something...
> > 
> > I think the segfault is coming when I call 'upload' with a non-
> > upload field...  But since calling 'upload' without a name 
> > returns to me a list of variable names that include non-upload 
> > fields, iterating through guarantees me to segfault:
> > 
> > (NOTE: resourceurl is the only 'file' field on my form with 23 
> > other 'text' fields)
> > 
> > my $q = Apache::Request->new($r);
> > 
> > my @uploads = $q->upload;
> 
> OK, I see the problem now.  In list context $q->upload()
> is failing to filter out the non-upload keys.  It should 
> get fixed in the next release, but in the meantime try 
> using $q->upload() in scalar context. That will give you 
> an Apache::Upload::Table (@ISA=APR::Table) to work with.
> The table will only contain uploads, and since it's a 
> tied hash, you can iterate over it using keys() or each().
> 
> -- 
> Joe Schaefer
> 
> 
> -- 
> Report problems: http://perl.apache.org/bugs/
> Mail list info: http://perl.apache.org/maillist/modperl.html
> List etiquette: http://perl.apache.org/maillist/email-etiquette.html

-- 
Ken Burcham
Ken Burcham Consulting, Inc.
http://www.capemaystation.com



-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Getting started with mod_perl

2004-04-08 Thread Ian harisay
Hi,

I am just getting started with mod_perl.  Can someone tell me what 
versions of Apache and  mod_perl I should run together?

I am setting up a 1U server and a laptop.  I  have been debating RH9 or 
Fedora.  Any opinions there?

Thanks for your input.

-Ian



--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: Mod_perl not receiving changed made by JavaScript: bug

2004-04-08 Thread Perrin Harkins
On Thu, 2004-04-08 at 12:12, Kemin Zhou wrote:
> It looks there is some caching going on in the http server.
> 
> This problem goes away if the perl program is run under CGI. 

This is almost certainly caused by a bug in your perl code.  You are
probably unintentionally creating a closure.  If you post some code
here, we can help you spot the problem.

- Perrin


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Re: mod_perl performance question

2004-04-08 Thread Perrin Harkins
On Thu, 2004-04-08 at 11:48, Pascal Felber wrote:
> The server is a [EMAIL PROTECTED]
> 512MB, running linux 2.4.18-3, Apache 2.0.48, and mod_perl 1.99_08.

That came out more than a year ago.  You should be running the latest
(1.99_13 at the moment) if you're going to do this kind of stress
testing.

> The response time of the server is roughly
> constant but we observe some pretty high spikes in the latency every 30
> seconds or so, as if the server was interrupted for a short period of
> time (approx. 300 ms). The delay of 300 ms seems very high for tasks
> like shared memory accesses or garbage collection

Perl doesn't do garbage collection like Java does.  There wouldn't be
any shared memory either, unless you are doing it in your own code. 
What you're describing sounds more like running out of memory and going
into swap or killing off all the apache processes at once and having to
spawn new ones.

You haven't given us much to go on here.  Can you post the relevant
sections of your conf file(s) (i.e. not the boilerplate stuff) and some
of your code?

- Perrin


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



mod_perl performance question

2004-04-08 Thread Pascal Felber
We have noticed some "strange" behavior when stress-testing one of our
perl modules and we haven't managed to find an explanation or workaround
in the mod_perl documentation. We have reproduced this problem with a
minimal module, installed as a PerlResponseHandler, that simply sends am
HTTP 302 redirection message to the client. The server is a [EMAIL PROTECTED]
512MB, running linux 2.4.18-3, Apache 2.0.48, and mod_perl 1.99_08. We
have run benchmarks using the `siege' application with an increasing
number of clients and we have measured the latency of every request.

I have put a graph online at http://www.eurecom.fr/~felber/mod_perl.gif
that illustrates the problem. The response time of the server is roughly
constant but we observe some pretty high spikes in the latency every 30
seconds or so, as if the server was interrupted for a short period of
time (approx. 300 ms). The delay of 300 ms seems very high for tasks
like shared memory accesses or garbage collection, given that our test
module does almost nothing. When running the same test using mod_alias
for redirections, there are no such spikes; so it really looks like they
are due to mod_perl rather than the OS, Apache, or the network. There
might be an obvious explanation but we have limited expertise with
mod_perl and we would very much appreciate some help from other users on
this list.

Thanks,
Pascal Felber


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Mod_perl not receiving changed made by JavaScript: bug

2004-04-08 Thread Kemin Zhou
I look at the bug report no where to find an entry for this bug.

I am using Apache 2, mod_perl2 with RedHat 9.0
Everything is working find.
Using Apache::Registry for CGI scripts.

I have toy form with a few fields, One field can register changed made 
to other fields.
This changed_field is dynamically generated.

One submit, the value of the changed_field is not properly submitted to 
the perl program
if using mod_perl. 

Either it says it is not changed or it will receive the changed state in 
previous submissions.

It looks there is some caching going on in the http server.

This problem goes away if the perl program is run under CGI. 

I am not sure you have seen this one before.  Or there may be a 
configuration error in my
httpd.conf.

Kemin

here is my JavaScript, it should work with any form


function addhandlers(f) {
  for (var i = 0; i < f.elements.length; i++) {
 var e = f.elements[i];
 e.onchange = function() {
if (this.form.changed.value == "")
   this.form.changed.value = this.name;
else
   this.form.changed.value += " " + this.name;
 }
  }
  f.onsubmit = submit();
}
addhandlers(document.updateForm);
document.write(document.updateForm.changed.value);

You can write a simple server-side perl script to receive information 
from the form.



**
Proprietary or confidential information belonging to Ferring Holding SA or to one of 
its affiliated companies may be contained in the message. If you are not the addressee 
indicated in this message (or responsible for the delivery of the message to such 
person), please do not copy or deliver this message to anyone. In such case, please 
destroy this message and notify the sender by reply e-mail. Please advise the sender 
immediately if you or your employer do not consent to e-mail for messages of this 
kind. Opinions, conclusions and other information in this message represent the 
opinion of the sender and do not necessarily represent or reflect the views and 
opinions of Ferring.
**
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


[JOB] Senior Developer in Washington, DC

2004-04-08 Thread Perrin Harkins
Most of you probably saw our posting on the jobs.perl.org, but in case
anyone missed it, here it is again.  My company, Plus Three
(http://plusthree.com/) is hiring in Washington, DC.  At some point in
the future we may be looking for someone in New York City as well.

We're a consulting company, doing a lot of work based on mod_perl.  Our
clients include the Democratic National Committee, Democratic GAIN, the
United Federation of Teachers, and John Kerry for President.

Here's some more info from our listing:

We need a senior Perl programmer to lead development in our Washington,
D.C. office.  We are building complex, high-traffic web sites using open
source software, including GNU/Linux, Apache, MySQL, PostgreSQL and
XML::Comma.

Required skills:
* Demonstrable programming ability and experience with Perl, including
OO design, effective use of the CPAN, and familiarity with modern web
development tools like mod_perl and templating systems. 

* A broad knowledge of Internet technology, and a desire to find things
out empirically rather than rely on conjecture (i.e. someone who is not
afraid to telnet to port 80).

* A desire to plan for the future with suitable programming
abstractions, automated test suites, and version control, and in general
to feel in control of your own destiny.

* Expressive verbal and written communications skills. Direct
interaction with clients will be involved.

You can send your resume to [EMAIL PROTECTED]

Thanks,
Perrin


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Re: Problem with modperl2/apache2/apreq2 upload

2004-04-08 Thread Joe Schaefer
"Ken Burcham" <[EMAIL PROTECTED]> writes:

> Ok, I might be on to something...
> 
> I think the segfault is coming when I call 'upload' with a non-
> upload field...  But since calling 'upload' without a name 
> returns to me a list of variable names that include non-upload 
> fields, iterating through guarantees me to segfault:
> 
> (NOTE: resourceurl is the only 'file' field on my form with 23 
> other 'text' fields)
> 
> my $q = Apache::Request->new($r);
> 
> my @uploads = $q->upload;

OK, I see the problem now.  In list context $q->upload()
is failing to filter out the non-upload keys.  It should 
get fixed in the next release, but in the meantime try 
using $q->upload() in scalar context. That will give you 
an Apache::Upload::Table (@ISA=APR::Table) to work with.
The table will only contain uploads, and since it's a 
tied hash, you can iterate over it using keys() or each().

-- 
Joe Schaefer


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Re: Problem with modperl2/apache2/apreq2 upload

2004-04-08 Thread Ken Burcham



Ok, I might be on to something...


I think the segfault is coming when I call 'upload' with a non-
upload field...  But since calling 'upload' without a name 
returns to me a list of variable names that include non-upload 
fields, iterating through guarantees me to segfault:


(NOTE: resourceurl is the only 'file' field on my form with 23 
other 'text' fields)

my $q = Apache::Request->new($r);


my @uploads = $q->upload;


if(@uploads)
{
  warn "Got an UPLOAD Array: ". scalar @uploads;
  $context->uploadsarray([EMAIL PROTECTED]);


  foreach my $uploadfilename (@uploads)
  {
#my $upload = $q->upload($uploadfilename); 
#SEGFAULTS!
if ($uploadfilename eq 'resourceurl')
{
  my 
$upload = $q->upload($uploadfilename); # DOESN'T SEFAULT!
      warn 
"UPLOADER FILENAME: ".$upload->filename;
      warn 
"UPLOADER found $uploadfilename ";


    }
else
    {
  warn 
"UPLOADER FOUND BOGUS PARM: $uploadfilename";
    }
  }
}






Here's the results:


Got an UPLOAD Array: 24 at /usr/lib/perl5/site_perl/5.8.0/GCX/Runtime/Input/Handler.pm line 89.
UPLOADER FOUND BOGUS PARM: sys_community at /usr/lib/perl5/site_perl/5.8.0/GCX/Runtime/Input/Handler.pm line 
104.
UPLOADER FOUND BOGUS PARM: sys_name at /usr/lib/perl5/site_perl/5.8.0/GCX/Runtime/Input/Handler.pm line 104.
UPLOADER FOUND BOGUS PARM: name at /usr/lib/perl5/site_perl/5.8.0/GCX/Runtime/Input/Handler.pm line 104.
UPLOADER FOUND BOGUS PARM: keywords at /usr/lib/perl5/site_perl/5.8.0/GCX/Runtime/Input/Handler.pm line 104.
UPLOADER FOUND BOGUS PARM: author at /usr/lib/perl5/site_perl/5.8.0/GCX/Runtime/Input/Handler.pm line 104.
UPLOADER FOUND BOGUS PARM: contact at /usr/lib/perl5/site_perl/5.8.0/GCX/Runtime/Input/Handler.pm line 104.
UPLOADER FOUND BOGUS PARM: title at /usr/lib/perl5/site_perl/5.8.0/GCX/Runtime/Input/Handler.pm line 104.
UPLOADER FOUND BOGUS PARM: summary at /usr/lib/perl5/site_perl/5.8.0/GCX/Runtime/Input/Handler.pm line 104.
UPLOADER FOUND BOGUS PARM: msgmoderator at /usr/lib/perl5/site_perl/5.8.0/GCX/Runtime/Input/Handler.pm line 
104.
UPLOADER FOUND BOGUS PARM: status at /usr/lib/perl5/site_perl/5.8.0/GCX/Runtime/Input/Handler.pm line 104.
UPLOADER FOUND BOGUS PARM: datecreated at /usr/lib/perl5/site_perl/5.8.0/GCX/Runtime/Input/Handler.pm line 
104.
UPLOADER FOUND BOGUS PARM: effectivedate at /usr/lib/perl5/site_perl/5.8.0/GCX/Runtime/Input/Handler.pm line 
104.
UPLOADER FOUND BOGUS PARM: expirationdate at /usr/lib/perl5/site_perl/5.8.0/GCX/Runtime/Input/Handler.pm line 
104.
UPLOADER FOUND BOGUS PARM: modby at /usr/lib/perl5/site_perl/5.8.0/GCX/Runtime/Input/Handler.pm line 104.
UPLOADER FILENAME: G:\projects\gcx\temp\navSub_bullet_grey.gif at /usr/lib/perl5/site_perl/5.8.0/GCX/Runtime/Input/Handler.pm 
line 99.
UPLOADER found resourceurl  at /usr/lib/perl5/site_perl/5.8.0/GCX/Runtime/Input/Handler.pm line 100.
UPLOADER FOUND BOGUS PARM: language-dropdown at /usr/lib/perl5/site_perl/5.8.0/GCX/Runtime/Input/Handler.pm 
line 104.
UPLOADER FOUND BOGUS PARM: quality at /usr/lib/perl5/site_perl/5.8.0/GCX/Runtime/Input/Handler.pm line 104.
UPLOADER FOUND BOGUS PARM: version at /usr/lib/perl5/site_perl/5.8.0/GCX/Runtime/Input/Handler.pm line 104.
UPLOADER FOUND BOGUS PARM: downloads at /usr/lib/perl5/site_perl/5.8.0/GCX/Runtime/Input/Handler.pm line 104.
UPLOADER FOUND BOGUS PARM: source at /usr/lib/perl5/site_perl/5.8.0/GCX/Runtime/Input/Handler.pm line 104.
UPLOADER FOUND BOGUS PARM: uploader at /usr/lib/perl5/site_perl/5.8.0/GCX/Runtime/Input/Handler.pm line 104.
UPLOADER FOUND BOGUS PARM: parentid at /usr/lib/perl5/site_perl/5.8.0/GCX/Runtime/Input/Handler.pm line 104.
UPLOADER FOUND BOGUS PARM: resourcetype-dropdown at /usr/lib/perl5/site_perl/5.8.0/GCX/Runtime/Input/Handler.pm 
line 104.
UPLOADER FOUND BOGUS PARM: sys_action at /usr/lib/perl5/site_perl/5.8.0/GCX/Runtime/Input/Handler.pm line 104.





Here's my segfault:


 child pid 6758 exit signal Segmentation fault (11)


And I rebuilt mod_perl2 with MP_DEBUG=1 but I don't see a core 
anywhere?  Where would I look? 

ken.




On 8 Apr 2004 at 10:18, Ken Burcham wrote:


> Joe: Thanks so much for taking the time to answer...
> 
> I'll look into the segfault backtrace next...
> 
> When I do this:
> 
>  my $q = Apache::Request->new($r);
>  my @uploads = $q->upload;
> 
>  warn 'Number of uploads: '. scalar @uploads;
> 
>  foreach my $uploadfilename (@$uploads)
>  {
> #my $upload = $q->upload($uploadfilename); #SEGFAULTS!
> warn "UPLOADER found " . $uploadfilename;
>  }
> 
> I get "Number of uploads: 24" which is the number of fields on my 
> multipart html form of which only one is a "file" type:
> 
> 
> name="resourceform" parent="resourceform">
> ...
> 
> 
> 
> length="" max="">
> 
> 
> 
> 
> length="" max="">
> 
> 
> 
> 
> max="">
> 
> 
> 
> 
> max="">
> 
> ...
> 
> 
> In my apache error log I see:
> 
> .

(Fwd) Re: Problem with modperl2/apache2/apreq2 upload

2004-04-08 Thread Ken Burcham
Joe: Thanks so much for taking the time to answer...

I'll look into the segfault backtrace next...

When I do this:

 my $q = Apache::Request->new($r);
 my @uploads = $q->upload;

 warn 'Number of uploads: '. scalar @uploads;

 foreach my $uploadfilename (@$uploads)
 {
#my $upload = $q->upload($uploadfilename); #SEGFAULTS!
warn "UPLOADER found " . $uploadfilename;
 }

I get "Number of uploads: 24" which is the number of fields on my 
multipart html form of which only one is a "file" type:


...

effective date



expiration date



moderated by



resource url


...


In my apache error log I see:

...
UPLOADER found effectivedate  at (eval 20) line 14.
UPLOADER found expirationdate  at (eval 20) line 14.
UPLOADER found modby  at (eval 20) line 14.
UPLOADER found resourceurl  at (eval 20) line 14.
...


So it looks to me like EVERY field gets dumped into the upload 
array...  Like I said, I'm probably doing something stupid...  

I'll look into the backtrace now...

THANKS so much!

ken.




On 8 Apr 2004 at 9:18, Joe Schaefer wrote:

> "Ken Burcham" <[EMAIL PROTECTED]> writes:
> 
> > > That's certainly supposed to work, assuming 'somefilename' is
> > > the name of the upload widget in your HTML form. Can you post 
> > > a backtrace for the segfault?
> > 
> > Sure... umm... how do I do that?  :)
> > 
> > I'm still pretty new to perl.  
> 
> Segfaults arise from buggy C code. For instructions on generating
> a backtrace, read
> 
>   http://perl.apache.org/docs/2.0/user/help/help.html#Resolving_Segmentation_Faults
> 
> > > 
> > > That is correct.  In apache1 the uploads formed a linked list
> > > internally, but that's no longer true in apreq2. In apreq2 
> > > $req->upload follows the same interface pattern as $req->param.
> > 
> > How do I get to just the upload items?  Or do I test via $upload-
> > >info/type?
> 
> 
>   No need to test anything: $req->upload() works just like 
> $req->param(), but it is restricted to uploads only.  For example
> 
>   my $upload_table_ref = $req->upload; # APR::Table ref of uploads
> 
>   foreach my $name (keys %$upload_table_ref) {
>  my @uploads = $req->upload($name); # Array of Apache::Upload
> # objects having name = $name
>  # do something with @uploads
>   }
> 
> -- 
> Joe Schaefer
> 
> 
> -- 
> Report problems: http://perl.apache.org/bugs/
> Mail list info: http://perl.apache.org/maillist/modperl.html
> List etiquette: http://perl.apache.org/maillist/email-etiquette.html


--- End of forwarded message - 
Ken Burcham
Ken Burcham Consulting, Inc.
http://www.capemaystation.com



-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Re: Problem with modperl2/apache2/apreq2 upload

2004-04-08 Thread Joe Schaefer
"Ken Burcham" <[EMAIL PROTECTED]> writes:

> > That's certainly supposed to work, assuming 'somefilename' is
> > the name of the upload widget in your HTML form. Can you post 
> > a backtrace for the segfault?
> 
> Sure... umm... how do I do that?  :)
> 
> I'm still pretty new to perl.  

Segfaults arise from buggy C code. For instructions on generating
a backtrace, read

  http://perl.apache.org/docs/2.0/user/help/help.html#Resolving_Segmentation_Faults

> > 
> > That is correct.  In apache1 the uploads formed a linked list
> > internally, but that's no longer true in apreq2. In apreq2 
> > $req->upload follows the same interface pattern as $req->param.
> 
> How do I get to just the upload items?  Or do I test via $upload-
> >info/type?


  No need to test anything: $req->upload() works just like 
$req->param(), but it is restricted to uploads only.  For example

  my $upload_table_ref = $req->upload; # APR::Table ref of uploads

  foreach my $name (keys %$upload_table_ref) {
 my @uploads = $req->upload($name); # Array of Apache::Upload
# objects having name = $name
 # do something with @uploads
  }

-- 
Joe Schaefer


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



[ANNOUNCE] Apache-AuthzSplitDomainUser-0.01

2004-04-08 Thread Shannon Eric Peevey
The uploaded file

   Apache-AuthzSplitDomainUser-0.01.tar.gz

has entered CPAN as

 file: $CPAN/authors/id/S/SP/SPEEVES/Apache-AuthzSplitDomainUser-0.01.tar.gz
 size: 4241 bytes
  md5: a5e1a63f212884e2885b3bd8ea65041b
This module basically pulls the authz handler from Apache::AuthenSmb, so that it can be used with other authentication mechanisms.  (In our case, Apache::AuthNetLDAP) It is the first release, so should be considered beta until more people have beat on it.  At this time, it simply checks the username, from $r->user, for a backslash, as found in DOMAIN\username.  It then allows you to either check the htgroup files with "username", or "DOMAIN\username", for correct authorization.

This namespace is not finalized, but has been applied for.  Thanks to Geoff Y. for the idea for a better name :)

--
Shannon Eric Peevey =>  "speeves"
Dyno-Mite! System Administrator =>  [EMAIL PROTECTED]
Central Web Support =>  (940) 369-8876
University of North Texas   =>  http://web2.unt.edu


--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [MP2+Embperl(cvs)] Strange mod_perl 'make test' glitch

2004-04-08 Thread Beau E. Cox
On Wednesday 07 April 2004 12:14 pm, Stas Bekman wrote:
>  I guess Apache::Test cannot parse httpd.conf continuation syntax.
> >>>
> >>> Probably. Patches to fix that are welcome, Beau.
> >>
> >> But if I fix that, I negate my current work-around ;)
> >
> > That's hiding the problem, not fixing it ;)
> 
>  Yes, so true. Guilty :(
> >>>
> >>> If it's too hard, don't worry, let me know and I'll fix it later.
> >>
> >> No, it's on my TODO list :)
>
> Actually, while I was fixing one problem I've fixed the other as well. I
> hope you didn't start working on this one yet. So continuous lines support
> is now in cvs as well.

Stas -

I tried erveything. Everything works. I couldn't break it.

 (<- those are stars) Good job, and thank you.

Aloha => Beau;



-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Re: [MP2+Embperl(cvs)] Strange mod_perl 'make test' glitch

2004-04-08 Thread Stas Bekman
Beau E. Cox wrote:
On Wednesday 07 April 2004 12:14 pm, Stas Bekman wrote:

I guess Apache::Test cannot parse httpd.conf continuation syntax.
Probably. Patches to fix that are welcome, Beau.
But if I fix that, I negate my current work-around ;)
That's hiding the problem, not fixing it ;)
Yes, so true. Guilty :(
If it's too hard, don't worry, let me know and I'll fix it later.
No, it's on my TODO list :)
Actually, while I was fixing one problem I've fixed the other as well. I
hope you didn't start working on this one yet. So continuous lines support
is now in cvs as well.


Stas -

I tried erveything. Everything works. I couldn't break it.

 (<- those are stars) Good job, and thank you.
Thanks for the confirmation, Beau!

--
__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html