Re: Setting new POST_MAX or MAX_BODY

2006-09-12 Thread Boysenberry Payne

I tracked the error down to a different area than I thought.
It happens when I call $apr->param as follows:

sub utilize {

  my $self = shift; 
  my $apr = APR::Request::Apache2->handle( $self->{req} ) || return;
  return unless( int @{[ $apr->param ]} > 0 );
  warn "test";
  my $data;
  foreach my $name ( $apr->param ) {
$self->{param_cnt}->{$name} = int @{[ $apr->param( $name ) ]};
my $cnt = $self->{param_cnt}->{$name};
if ( $cnt == 1 ) {
 $data->{$name} = uri_unescape( $apr->param( $name ) );
} elsif ( $cnt > 1 ) {
 $data->{$name} = [ $apr->param( $name ) ];
}
  }
  $self->{data} = $data;
  return 1;
}

The problem I have is I don't know I want the max_body set high until  
I check to
see if the upload param is set, i.e.  I check for upload variable  
then if set call:


my $req = Apache2::Request->new( $r, POST_MAX => "5",  
MAX_BODY => "5" );


I must be going about this the wrong way.  Any suggestions what the  
"right way" is?


Thanks,
Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com



Setting new POST_MAX or MAX_BODY

2006-09-12 Thread Boysenberry Payne
I'm trying to raise my post maximum and keep getting this error:[error] [client 127.0.0.1] (20014)Internal error: Content-Length header (959543540) exceeds configured max_body limit (67108864)How do I set max body higher?  So far I have:sub handler {	my $r = shift;	my $req = Apache2::Request->new( $r, POST_MAX => "5", MAX_BODY => "5" );}1;What am I doing wrong? Thanks, Boysenberry  boysenberrys.com | habitatlife.com | selfgnosis.com  

Re: Make test failed

2006-07-08 Thread Boysenberry Payne
I'm in the progress of updating it all (except gcc version 3.2.3, is  
that bad?)


On my dev box I've been using Apache/2.0.55, should I upgrade to 2.2 or  
is that
too new?  It seems that the 2.0 is as 58 should I update both my  
development

and my production to that?  I know you know best.


How did you get past the version check of this ?


Until last night my production server was managed by my host.
So I'm not sure how they installed anything.  While I was installing
libapreq cpan failed so I tried it at the command line, and still
got the errors, so I'm not sure I could get passed the version check.

As I was updating my perl modules via cpan I noticed a lot of
test failures.  Not that I've installed perl v5.8.8 they're gone.

Thanks for the help,
Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com

On Jul 8, 2006, at 3:35 AM, Philip M. Gollucci wrote:


Boysenberry Payne wrote:

I'm trying to build libapreq2-2.07 on Red Hat Linux 3.2.3-42,
Apache/2.0.46, perl v5.8.0 built for i386-linux-thread-multi,
2.0.48 is a minium version. Please read the CHANGES file. I strongly  
suggest upgrading

_ALL_ that software its ancient.

How did you get past the version check of this ?

Also, if you are using gcc 4.x you'll need to add -fno-strict-aliases
which will be in 2.08 and I'm rolling 2.08-RC3 right this second.

--  
--- 
-

Philip M. Gollucci ([EMAIL PROTECTED]) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F

"In all that I've done wrong I know I must have done something right to
deserve a hug every morning and butterfly kisses at night."






Make test failed

2006-07-07 Thread Boysenberry Payne
I'm trying to build libapreq2-2.07 on Red Hat Linux 3.2.3-42,  
Apache/2.0.46, perl v5.8.0 built for i386-linux-thread-multi,  
mod_perl/2.0.1
Getting the following error on make test using: perl Makefile.PL  
--with-apache2-apxs=/usr/local/apache2/bin/apxs  --enable-perl-glue


error:
/usr/bin/perl -MTest::Harness -e 'runtests(@ARGV)' version.t cookie.t  
params.t parsers.t error.t util.t

versionFAILED tests 2, 4-6
Failed 4/6 tests, 33.33% okay
cookie.ok
params.ok
parserslt-parsers: parser_header.c:118: split_header_line:  
Assertion `vlen >= dlen' failed.

parsersdubious
Test returned status 0 (wstat 6, 0x6)
DIED. FAILED tests 9-542
Failed 534/542 tests, 1.48% okay
error..ok
util...ok 1/89/home/perl/libapreq2-2.07/library/t/.libs/lt-util:  
relocation error: /home/perl/libapreq2-2.07/library/t/.libs/lt-util:  
undefined symbol: apreq_charset_divine

util...dubious
Test returned status 127 (wstat 32512, 0x7f00)
DIED. FAILED tests 25, 32-89
Failed 59/89 tests, 33.71% okay
Failed Test Stat Wstat Total Fail  Failed  List of Failed
 
---

parsers.t  0 6   542 1068 197.05%  9-542
util.t   127 3251289  116 130.34%  25 32-89
version.t  64  66.67%  2 4-6
Failed 3/6 test scripts, 50.00% okay. 597/747 subtests failed, 20.08%  
okay.

make[2]: *** [test] Error 127
make[2]: Leaving directory `/home/perl/libapreq2-2.07/library/t'
make[1]: *** [test] Error 2
make[1]: Leaving directory `/home/perl/libapreq2-2.07/library'
make: *** [library_test] Error 2

Anyone know what I need to fix to get it working?

Thanks,
Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com



On using Apache2::Request->upload correctly...

2006-04-12 Thread Boysenberry Payne

Hi All,

I remember reading about how to handle when a client cancels an upload
via proxy connections, I just don't remember what or where.

I'm using:

my $req = Apache2::Request->new( $r ); # via handler
my $upload = $req->upload( "uploadFile" ) or return $self->error( "No 
Upload File Found..." );
my $file = $upload->filename or return $self->error( "No File Name 
Found..." );

my $fh = $upload->fh;
my $size = $upload->size or return $self->error( "Empty File Size..." );

When a client presses cancel in their browser, I get the following 
error after a bit of time


[Tue Mar 21 16:14:08 2006] [error] [client 192.168.0.1] (70007)The 
timeout specified has expired: ap_get_brigade failed during prefetch, 
referer: http://192.168.0.1/h2adm.pl


How can I get it to cancel the request internally when the client 
cancels in the browser?

Our mod_perl server is behind another server that proxies to it.

Also is there any good reading someone can point me at to figure out 
how to do file upload
feedback, e.g. letting someone know how much of their file is uploaded, 
bandwidth, error

feedback, etc...


Thanks,
Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com



Re: make error

2006-02-23 Thread Boysenberry Payne
it looks like its trying to mod_apreq from your build dir with a non 
installed  /usr/local/apache2/lib/libapreq2.2.dylib ( you haven't 
installed it there yet )


my guess is that you set a prefix ( or didn't set one when you should 
have)


I used:

./configure --with-apache2-apxs=/usr/local/apache2/bin/apxs 
--enable-perl-glue



I took out:
--with-expat=/usr/local/apr

Because, there was nothing at /usr/local/apr.  What should I use?

When I did:
find /usr/local -name "apr"
nothing showed up.

I have Apache2 installed in /usr/local/apache2 with the following 
./configure settings:
--with-mpm=prefork --enable-mods-shared=all --enable-proxy 
--enable-rewrite --enable-ssl


and MP2 with:
MP_APXS=/usr/local/apache2/bin/apxs MP_USE_GTOP=1 MP_COMPAT_1X=0

I installed expat-2.0 into the default directory which the README says 
is:

libexpat into /usr/local/lib
expat.h into /usr/local/include
xmlwf into /usr/local/bin



thats probably because you're building against the new expat.  i think 
you need to build apreq  against the expat that apache built against 
(which is in /usr/local/etc) - i'm not sure,but you might get a 
library conflict otherwise.

How do I build apreq against the expat apache built against?
Should I rebuild apache and MP2 now that I've installed the newer expat 
then?




Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com

On Feb 23, 2006, at 6:38 PM, Jonathan Vanasco wrote:



On Feb 23, 2006, at 7:08 PM, Boysenberry Payne wrote:


I downloaded Expat-2.0, which got rid of the first error.


thats probably because you're building against the new expat.  i think 
you need to build apreq  against the expat that apache built against 
(which is in /usr/local/etc) - i'm not sure,but you might get a 
library conflict otherwise.



When I do make test I get the following error:
waiting 60 seconds for server to start: .Syntax error on line 168 of 
/Users/boysie/src/libapreq2-2.07/module/t/conf/httpd.conf:
Cannot load 
/Users/boysie/src/libapreq2-2.07/module/apache2/.libs/mod_apreq2.so 
into server: dyld: /usr/local/apache2/bin/httpd can't open library: 
/usr/local/apache2/lib/libapreq2.2.dylib  (No such file or directory, 
errno = 2)\n


it looks like its trying to mod_apreq from your build dir with a non 
installed  /usr/local/apache2/lib/libapreq2.2.dylib ( you haven't 
installed it there yet )


my guess is that you set a prefix ( or didn't set one when you should 
have)







Re: make error

2006-02-23 Thread Boysenberry Payne
Did you invoke /usr/local/apache2/bin/envvars to set up your 
environment?


No I didn't.  I didn't even know about it.


Otherwise I'm a little confused if ld considers this an input or a 
target

binding error.  Also, why -lexpat, is that an apreq binding we consume?
If so, it seems apu-config should have -L/usr/local/apache/lib for you.
We should be consuming that.


I'm not sure how to understand this.  I'm not really familiar with 
bindings, etc.

I'd love to learn, but am wet behind the ears...

Thanks,
Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com

On Feb 23, 2006, at 5:00 PM, William A. Rowe, Jr. wrote:


Boysenberry Payne wrote:

Sorry I'm trying to build libapreq2-2.07
:-0
Thanks,
Boysenberry
boysenberrys.com | habitatlife.com | selfgnosis.com
On Feb 23, 2006, at 4:44 PM, Boysenberry Payne wrote:

I'm getting:
ld: can't locate file for: -lexpat


/usr/local/apache2/lib/libexpat.dylib

Did you invoke /usr/local/apache2/bin/envvars to set up your 
environment?


Otherwise I'm a little confused if ld considers this an input or a 
target

binding error.  Also, why -lexpat, is that an apreq binding we consume?
If so, it seems apu-config should have -L/usr/local/apache/lib for you.
We should be consuming that.

Bill






Re: make error

2006-02-23 Thread Boysenberry Payne

cd LIBAPREQ2.0.7
	./configure --with-expat=/usr/local/apr  
--with-apache2-apxs=/usr/local/apache2/bin/apxs --enable-perl-glue

make
make test
make install


I downloaded Expat-2.0, which got rid of the first error.
Then after I added "--enable-perl-glue" I realized I needed to install 
MP2 first.

Once that was installed I received the following error:

Can't locate ExtUtils/XSBuilder/ParseSource.pm in @INC (@INC contains: 
/System/Library/Perl/5.8.1/darwin-thread-multi-2level 
/System/Library/Perl/5.8.1 
/Library/Perl/5.8.1/darwin-thread-multi-2level /Library/Perl/5.8.1 
/Library/Perl /Network/Library/Perl/5.8.1/darwin-thread-multi-2level 
/Network/Library/Perl/5.8.1 /Network/Library/Perl .) at Makefile.PL 
line 22.

BEGIN failed--compilation aborted at Makefile.PL line 22.

Then I ran cpan and downloaded ExtUtils::XSBuilder

make now runs fine.

When I do make test I get the following error:
waiting 60 seconds for server to start: .Syntax error on line 168 of 
/Users/boysie/src/libapreq2-2.07/module/t/conf/httpd.conf:
Cannot load 
/Users/boysie/src/libapreq2-2.07/module/apache2/.libs/mod_apreq2.so 
into server: dyld: /usr/local/apache2/bin/httpd can't open library: 
/usr/local/apache2/lib/libapreq2.2.dylib  (No such file or directory, 
errno = 2)\n


Any ideas?

Thanks,
Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com

On Feb 23, 2006, at 4:52 PM, Jonathan Vanasco wrote:



cd LIBAPREQ2.0.7
	./configure --with-expat=/usr/local/apr  
--with-apache2-apxs=/usr/local/apache2/bin/apxs --enable-perl-glue

make
make test
make install

note: if you're running any of  the perl xml stuff on osx, you'll also 
need to download and install expat from sourceforge separately.  
getting perl modules to install on osx using the apache expat is damn 
frustrating.  having 2 sep. libs is ugly, but it works.


On Feb 23, 2006, at 5:44 PM, Boysenberry Payne wrote:


I'm getting:
ld: can't locate file for: -lexpat

While trying to build on OS X 10.3.9 / Apache 2.0.55

When I 'find /usr -name "*expat*" I get:

/usr/include/php/ext/xml/expat
/usr/include/php/ext/xml/expat/expat.h
/usr/local/apache2/include/expat.h
/usr/local/apache2/lib/libexpat.0.1.0.dylib
/usr/local/apache2/lib/libexpat.0.dylib
/usr/local/apache2/lib/libexpat.a
/usr/local/apache2/lib/libexpat.dylib
/usr/local/apache2/lib/libexpat.la
/usr/local/share/doc/libxml2-2.6.23/html/tutorial/includexpath.c
/usr/share/doc/libxml2-2.6.16/html/tutorial/includexpath.c
/usr/X11R6/include/expat.h
/usr/X11R6/lib/libexpat.1.0.dylib
/usr/X11R6/lib/libexpat.1.dylib
/usr/X11R6/lib/libexpat.a
/usr/X11R6/lib/libexpat.dylib

Am I missing expat, or is something conflicted?

Thanks,
Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com









Re: make error

2006-02-23 Thread Boysenberry Payne

Sorry I'm trying to build libapreq2-2.07

:-0

Thanks,
Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com

On Feb 23, 2006, at 4:44 PM, Boysenberry Payne wrote:


I'm getting:
ld: can't locate file for: -lexpat

While trying to build on OS X 10.3.9 / Apache 2.0.55

When I 'find /usr -name "*expat*" I get:

/usr/include/php/ext/xml/expat
/usr/include/php/ext/xml/expat/expat.h
/usr/local/apache2/include/expat.h
/usr/local/apache2/lib/libexpat.0.1.0.dylib
/usr/local/apache2/lib/libexpat.0.dylib
/usr/local/apache2/lib/libexpat.a
/usr/local/apache2/lib/libexpat.dylib
/usr/local/apache2/lib/libexpat.la
/usr/local/share/doc/libxml2-2.6.23/html/tutorial/includexpath.c
/usr/share/doc/libxml2-2.6.16/html/tutorial/includexpath.c
/usr/X11R6/include/expat.h
/usr/X11R6/lib/libexpat.1.0.dylib
/usr/X11R6/lib/libexpat.1.dylib
/usr/X11R6/lib/libexpat.a
/usr/X11R6/lib/libexpat.dylib

Am I missing expat, or is something conflicted?

Thanks,

Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com








Re: How to use Apache2::Upload

2005-11-11 Thread Boysenberry Payne
What is $pool in:

APR::Request::Custom->handle($pool, 
$query_string,
$cookie_header,
$parser,
$read_limit,
$brigade)

and how do I get each of the values for this?

Should I use:

APR::Request->handle( ... );

or the above?

Right now I'm doing the following:

sub handle {

$r = shift;

# uploads	
$req = Apache2::Request->new( $r );
$upload = $req->upload( "upload_field_name" );

# cookies
$jar = Apache2::Cookie::Jar->new( $r );
$cookies = $self->{jar}->cookies();
$table = Apache2::Cookie->fetch( $r );
}

is there a better way, that I'm not getting?

Thank you,
Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com

On Nov 11, 2005, at 5:48 PM, Philip M. Gollucci wrote:

Boysenberry Payne wrote:
Also, are there equivalents to:
$CGI::DISABLE_UPLOADS
and
$CGI::POST_MAX
???
http://httpd.apache.org/apreq/docs/libapreq2/group__apreq__xs__apr__request.html

Look for
$req->disable_uploads()

and

$req->read_limit($set)

Respectively.

HTH



-- 
--
"Love is not the one you can picture yourself marrying,
but the one you can't picture the rest of your life without."

"It takes a minute to have a crush on someone, an hour to like someone,
and a day to love someone, but it takes a lifetime to forget someone..."

Philip M. Gollucci ([EMAIL PROTECTED]) 301.254.5198
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com




Re: How to use Apache2::Upload

2005-11-11 Thread Boysenberry Payne
Also, are there equivalents to:

$CGI::DISABLE_UPLOADS
and
$CGI::POST_MAX
???

Thanks,
Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com

On Nov 11, 2005, at 3:56 PM, Boysenberry Payne wrote:

In the Apache2::Upload doc it gives the following example:

use Apache2::Upload;
$req = Apache2::Request->new($r);
$upload = $req->upload("foo");

If I'm using this inside of a mod_perl handler do I need to do
$req = Apache2::Request->new($r);
where $r is my request handle?
Or am I getting confused?

So would the following be correct?

sub handler {

my $r = shift;
my $req = Apache2::Request->new( $r );
my $upload = $req->upload( "foo" );
my $fh = $upload->fh;
}

In the above would $fh be appropriate to use with Net::FTP->put( $fh )?

Thanks,
Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com


How to use Apache2::Upload

2005-11-11 Thread Boysenberry Payne
In the Apache2::Upload doc it gives the following example:

use Apache2::Upload;
$req = Apache2::Request->new($r);
$upload = $req->upload("foo");

If I'm using this inside of a mod_perl handler do I need to do
$req = Apache2::Request->new($r);
where $r is my request handle?
Or am I getting confused?

So would the following be correct?

sub handler {

my $r = shift;
my $req = Apache2::Request->new( $r );
my $upload = $req->upload( "foo" );
my $fh = $upload->fh;
}

In the above would $fh be appropriate to use with Net::FTP->put( $fh )?

Thanks,
Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com


Re: Help understanding the following error

2005-11-02 Thread Boysenberry Payne

That was it, thanks

Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com

On Nov 1, 2005, at 9:11 PM, Philip M. Gollucci wrote:


Boysenberry Payne wrote:
I received the following error on my server and was trying to figure  
out how to correct it:
/usr/local/apache2/bin/httpd: relocation error:  
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/APR/ 
Request/Apache2/Apache2.so: undefined symbol: apreq_handle_apache2

My first guess is that you don't have

Load Module apreq_module modules/mod_apreq2.so

in your httpd.conf note the '2'



 --
END

What doesn't kill us can only make us stronger.
Nothing is impossible.

Philip M. Gollucci ([EMAIL PROTECTED]) 301.254.5198
Consultant / http://p6m7g8.net/Resume/
Senior Developer / Liquidity Services, Inc.
  http://www.liquidityservicesinc.com
   http://www.liquidation.com
   http://www.uksurplus.com
   http://www.govliquidation.com
   http://www.gowholesale.com






Help understanding the following error

2005-11-01 Thread Boysenberry Payne
I received the following error on my server and was trying to figure  
out how to correct it:


/usr/local/apache2/bin/httpd: relocation error:  
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/APR/ 
Request/Apache2/Apache2.so: undefined symbol: apreq_handle_apache2


What does it mean?
How do I get rid of it?

Thanks,
Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com



Re: towards a 2.07 release

2005-10-03 Thread Boysenberry Payne

I received the following errors during make test on
OS X 10.3.9 / MP2 / Apache 2.0.54 / Perl 5.8.7

waiting 60 seconds for server to start: ...Syntax error on line 176 of 
/Users/boysie/src/tmp/module/t/conf/httpd.conf:
Cannot load /Users/boysie/src/tmp/module/apache2/.libs/mod_apreq2.so 
into server: dyld: /opt/local/apache2/bin/httpd version mismatch for 
library: /opt/local/lib/libapreq2.2.dylib (compatibility version of 
user: 8.0.0 greater than library's version: 4.0.0)\n

..
waiting 60 seconds for server to start: not ok
[  error] giving up after 61 secs. If you think that your system
is slow or overloaded try again with a longer timeout value.
by setting the environment variable APACHE_TEST_STARTUP_TIMEOUT
to a high value (e.g. 360) and repeat the last command.

[  error] server failed to start! (t/logs/error_log wasn't created, 
start the server in the debug mode)

make[1]: *** [run_tests] Error 1
make: *** [module_test] Error 2


Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com

On Oct 2, 2005, at 9:59 PM, Joe Schaefer wrote:



Note this is our first non-dev candidate, so please give it the
extra scrutiny it deserves. Release Candidate #1 -

http://people.apache.org/~joes/libapreq2-2.07-rc1.tar.gz

Thanks!
--
Joe Schaefer