Apache2::Upload and End of file found error

2006-12-05 Thread cfaust-dougot
Hi,
 
I'm trying to use Apache2::Upload as shown in the examples and the only thing I 
get is End of file found in the error log.
 
I've found quite a few messages on the subject, but I'm not using Mason and I'm 
using libapreq2.0.7.1.
 
I've tried the fh and slurp methods and both are the same.
 
Code I've been playing with
 
 my $req = Apache2::Request-new($r);
 my $upload = $req-upload('new_image');
 my $size = $upload-size;
 my $uploaded_file = $upload-fh;
 #$upload-slurp($uploaded_file);
 #$upload-link($uploaded_photo_name) or
#  die sprintf link from '%s' failed: $!, $upload-tempname;
 
Server Info
Apache/2.0.55 (Ubuntu) PHP/5.1.6 mod_apreq2-20051231/2.5.7 mod_perl/2.0.2 
Perl/v5.8.8 configured
 
TIA


Fedora Core 6, SOAP::Lite and mod_perl -- does this work?

2006-12-05 Thread Tom Cross

According to some bugs in bugzilla.redhat.com, it looks like there is an
issue with mod_perl on fc5,6, rhel3, and rhel4.  I'm wondering if this
is the case, or if I'm doing something wrong.  Is this a mod_perl issue?
I tried the fedora mod_perl (2.0.2) and I built a 2.0.3 mod_perl package
and neither one worked.

Fresh install of Fedora Core 6.
Install mod_perl, perl-SOAP-Lite Fedora packages.

Setup SOAP::Lite according to documentation by adding this to Apache's
conf:

Location /soap
SetHandler perl-script
PerlHandler Apache::SOAP
PerlSetVar dispatch_to /home/soap, MIME::Lite
PerlSetVar options compress_threshold = 1
/Location

Attempt to connect to simple Hello World SOAP server in /home/soap/
and I receive this message in /var/log/httpd/error_log:


[Tue Dec 05 13:33:48 2006] [error] [client 204.107.148.116] Can't locate
object 
method dir_config via package Apache2::RequestRec
at /usr/lib/perl5/vendor_perl/5.8.8/SOAP/Transport/HTTP.pm line 653.\n


##

Simple Server in /home/soap/Server.pm:

#!/usr/bin/perl -w

package Server;

sub testme ($$)
{
my ($class, $teststring) = @_;

return $teststring .  from the Server;
}

1;

###

My test client:

#!/usr/bin/perl -w

use SOAP::Lite;

my $kendeco_soap = SOAP::Lite
- uri('urn:Server')
- proxy('http://kearney.kendeco.com/soap')
- on_fault(sub { my($soap, $res) = @_;
die ref $res ? $res-faultstring :
$soap-transport-status, \n;
});
$kendeco_soap-transport-timeout(150);


$res = $kendeco_soap-testme (This is a test);
$r = $res-result;

print R: $r\n;



Thanks for any/all feedback!!

-- 
Tom Cross   Voice: 320-253-6483 Ext 207  FAX: 320-253-6956
IS ManagerE-mail: [EMAIL PROTECTED]
Kendeco Tool Crib   http://www.kendeco.com



Re: Fedora Core 6, SOAP::Lite and mod_perl -- does this work?

2006-12-05 Thread Philip M. Gollucci

Tom Cross wrote:

According to some bugs in bugzilla.redhat.com, it looks like there is an
issue with mod_perl on fc5,6, rhel3, and rhel4.  I'm wondering if this
is the case, or if I'm doing something wrong.  Is this a mod_perl issue?
I tried the fedora mod_perl (2.0.2) and I built a 2.0.3 mod_perl package
and neither one worked.

Fresh install of Fedora Core 6.
Install mod_perl, perl-SOAP-Lite Fedora packages.

Setup SOAP::Lite according to documentation by adding this to Apache's
conf:

Location /soap
SetHandler perl-script
PerlHandler Apache::SOAP
PerlSetVar dispatch_to /home/soap, MIME::Lite
PerlSetVar options compress_threshold = 1
/Location

Attempt to connect to simple Hello World SOAP server in /home/soap/
and I receive this message in /var/log/httpd/error_log:


[Tue Dec 05 13:33:48 2006] [error] [client 204.107.148.116] Can't locate
object 
method dir_config via package Apache2::RequestRec

at /usr/lib/perl5/vendor_perl/5.8.8/SOAP/Transport/HTTP.pm line 653.\n
Preload Apache2::RequestRec () in your startup.pl or in your httpd.conf 
via PerlModule.


Its probably something Apache::SOAP should be doing for you.  If this 
fixes it, you should submit a patch to Apache::SOAP.



--

Philip M. Gollucci ([EMAIL PROTECTED]) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/EC88A0BF 0DE5 C55C 6BF3 B235 2DAB  B89E 1324 9B4F EC88 A0BF

I never had a dream come true
'Til the day that I found you.
Even though I pretend that I've moved on
You'll always be my baby.
I never found the words to say
You're the one I think about each day
And I know no matter where life takes me to
A part of me will always be...
A part of me will always be with you.


Re: Fedora Core 6, SOAP::Lite and mod_perl -- does this work?

2006-12-05 Thread Tom Cross
On Tue, 2006-12-05 at 12:41 -0800, Philip M. Gollucci wrote:

 Preload Apache2::RequestRec () in your startup.pl or in your httpd.conf 
 via PerlModule.
 
 Its probably something Apache::SOAP should be doing for you.  If this 
 fixes it, you should submit a patch to Apache::SOAP.

Ok, I tried that.  Then I even setup the perl-status thing that shows my
current status.  perl-status shows that Apache2::RequestRec is one of
the modules currently loaded and it even knows about dir_config!

But it still doesn't work.  I'm baffled.

Thanks for the quick reply!

-- 
Tom Cross   Voice: 320-253-6483 Ext 207  FAX: 320-253-6956
IS ManagerE-mail: [EMAIL PROTECTED]
Kendeco Tool Crib   http://www.kendeco.com



Re: Fedora Core 6, SOAP::Lite and mod_perl -- does this work?

2006-12-05 Thread Philip M. Gollucci

Tom Cross wrote:

Ok, I tried that.  Then I even setup the perl-status thing that shows my
current status.  perl-status shows that Apache2::RequestRec is one of
the modules currently loaded and it even knows about dir_config!

diff lib/SOAP/Transport/HTTP.pm lib/SOAP/Transport/HTTP.pm.new
--- lib/SOAP/Transport/HTTP.pm  Tue Dec  5 13:24:13 2006
+++ lib/SOAP/Transport/HTTP.pm.new  Tue Dec  5 13:24:06 2006
@@ -648,8 +648,13 @@

 }

+use Apache2::RequestRec ();
+
 sub configure {
   my $self = shift-new;
+use Data::Dumper;
+print STDERR Dumper $_[0];
+
   my $config = shift-dir_config;
   foreach (%$config) {
 $config-{$_} =~ /=/





/me thinks


--

Philip M. Gollucci ([EMAIL PROTECTED]) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/EC88A0BF 0DE5 C55C 6BF3 B235 2DAB  B89E 1324 9B4F EC88 A0BF

I never had a dream come true
'Til the day that I found you.
Even though I pretend that I've moved on
You'll always be my baby.
I never found the words to say
You're the one I think about each day
And I know no matter where life takes me to
A part of me will always be...
A part of me will always be with you.


Apache::VMonitor doesn't install (can't find Apache::Scoreboard): suggested patch

2006-12-05 Thread David Scott
I *finally* managed to get this to work.  The problem is in 
Apache::Scoreboard, in Scoreboard.xs: apparently 
ap_exists_scoreboard_image() can return the value 0 even when everything 
is OK, causing the existence test to fail and Apache::Scoreboard not to 
load.


The following patch to Scoreboard.xs seems to do the trick:

342c342
 if (ap_exists_scoreboard_image()) {
---
 if ( image != NULL ) {

I hope this makes life easier for other people.  Apache::VMonitor really 
is a nice tool.


d

Phillip wrote:


Hey guys,

I've installed Apache 2.2.3 and mod_perl 2.0.3 + libapreq2, apparently
all successfully (my application runs pretty well).  Now I want to
install Apache::VMonitor and can't.

I've running on Debian sarge and have Apache 1.3.33 installed as 

well in

/usr/sbin/apache.

Where are your two apxs binaries (full path) ?
$ echo $PATH
$ which apxs





Re: Apache::VMonitor doesn't install (can't find Apache::Scoreboard): suggested patch

2006-12-05 Thread Malcolm J Harwood
On Tuesday 05 December 2006 20:33, David Scott wrote:

 I *finally* managed to get this to work.  The problem is in
 Apache::Scoreboard, in Scoreboard.xs: apparently
 ap_exists_scoreboard_image() can return the value 0 even when everything
 is OK,

Can I ask how you found that out? I've been trying to find a cause for the 
issue mentioned below, without much luck (but also without much time).

 causing the existence test to fail and Apache::Scoreboard not to 
 load.

Which version of Apache are you using? There's a known issue with 
Apache::VMonitor not loading if you try to load it too soon (eg. from a 
PostConfigRequire) with more recent versions of Apache. (It's mentioned in 
the Apache::VMonitor docs). It could be the same issue.

 The following patch to Scoreboard.xs seems to do the trick:

 342c342
  if (ap_exists_scoreboard_image()) {
 ---

   if ( image != NULL ) {

 I hope this makes life easier for other people.  Apache::VMonitor really
 is a nice tool.

Thanks. I'll test the change locally and upload a new version as soon as I get 
chance.


svn commit: r482563 - /perl/modperl/trunk/src/modules/perl/

2006-12-05 Thread pgollucci
Author: pgollucci
Date: Tue Dec  5 02:01:08 2006
New Revision: 482563

URL: http://svn.apache.org/viewvc?view=revrev=482563
Log:
o Move MP_PERL_VERSION* from modperl_util.h to modperl_common_util.h
o add MP_PERL_BRANCH to replace 5_6_x and related
o Replace all occurences of PERL_REVISION, PERL_VERSION, PERL_SUBVERSION
  with calls to the macros.



Modified:
perl/modperl/trunk/src/modules/perl/mod_perl.c
perl/modperl/trunk/src/modules/perl/modperl_cmd.c
perl/modperl/trunk/src/modules/perl/modperl_common_util.c
perl/modperl/trunk/src/modules/perl/modperl_common_util.h
perl/modperl/trunk/src/modules/perl/modperl_interp.c
perl/modperl/trunk/src/modules/perl/modperl_interp.h
perl/modperl/trunk/src/modules/perl/modperl_io.h
perl/modperl/trunk/src/modules/perl/modperl_perl.c
perl/modperl/trunk/src/modules/perl/modperl_perl.h
perl/modperl/trunk/src/modules/perl/modperl_perl_includes.h
perl/modperl/trunk/src/modules/perl/modperl_perl_pp.h
perl/modperl/trunk/src/modules/perl/modperl_svptr_table.c
perl/modperl/trunk/src/modules/perl/modperl_util.h

Modified: perl/modperl/trunk/src/modules/perl/mod_perl.c
URL: 
http://svn.apache.org/viewvc/perl/modperl/trunk/src/modules/perl/mod_perl.c?view=diffrev=482563r1=482562r2=482563
==
--- perl/modperl/trunk/src/modules/perl/mod_perl.c (original)
+++ perl/modperl/trunk/src/modules/perl/mod_perl.c Tue Dec  5 02:01:08 2006
@@ -165,8 +165,7 @@
 dTHXa(perl);
 
 /* 5.7.3+ has a built-in special ${^TAINT}, backport it to 5.6.0+ */
-#if PERL_REVISION == 5  \
-(PERL_VERSION == 6 || (PERL_VERSION == 7  PERL_SUBVERSION  3))
+#if MP_PERL_VERSION_AT_MOST(5, 7, 2)
 {
 GV *gv = gv_fetchpv(\024AINT, GV_ADDMULTI, SVt_IV);
 sv_setiv(GvSV(gv), PL_tainting);
@@ -266,7 +265,7 @@
 PL_endav = Nullav;
 
 /* This was fixed in 5.9.0/5.8.1 (17775), but won't compile after 19122 */
-#if PERL_REVISION == 5  PERL_VERSION == 8  PERL_SUBVERSION == 0  \
+#if MP_PERL_VERSION(5, 8, 0)  \
 defined(USE_REENTRANT_API)  defined(HAS_CRYPT_R)  defined(__GLIBC__)
 /* workaround perl5.8.0/glibc bug */
 PL_reentrant_buffer-_crypt_struct.current_saltbits = 0;
@@ -585,13 +584,9 @@
 static apr_status_t modperl_sys_term(void *data)
 {
 /* PERL_SYS_TERM() needs 'my_perl' as of 5.9.5 */
-#ifdef USE_ITHREADS
-# if PERL_REVISION == 5  \
-  ((PERL_VERSION == 9  PERL_SUBVERSION  4) || \
-   PERL_VERSION  9)
+#if MP_PERL_VERSION_AT_LEAST(5, 9, 5)  defined(USE_ITHREADS)
 modperl_cleanup_data_t *cdata = (modperl_cleanup_data_t *)data;
 PerlInterpreter *my_perl = cdata == NULL ? NULL : (PerlInterpreter 
*)cdata-data;
-# endif
 #endif
 MP_init_status = 0;
 MP_threads_started = 0;
@@ -712,10 +707,10 @@
 }
 #endif
 
-#if PERL_REVISION == 5  PERL_VERSION  9
-#define MP_PERL_VERSION_STAMP Perl/v%vd
-#else
+#if MP_PERL_VERSION_AT_LEAST(5, 9, 0)
 #define MP_PERL_VERSION_STAMP Perl/% SVf
+#else
+#define MP_PERL_VERSION_STAMP Perl/v%vd
 #endif
 
 ap_add_version_component(pconf, MP_VERSION_STRING);

Modified: perl/modperl/trunk/src/modules/perl/modperl_cmd.c
URL: 
http://svn.apache.org/viewvc/perl/modperl/trunk/src/modules/perl/modperl_cmd.c?view=diffrev=482563r1=482562r2=482563
==
--- perl/modperl/trunk/src/modules/perl/modperl_cmd.c (original)
+++ perl/modperl/trunk/src/modules/perl/modperl_cmd.c Tue Dec  5 02:01:08 2006
@@ -564,7 +564,7 @@
 GV *gv = gv_fetchpv(0, TRUE, SVt_PV);
 ENTER;SAVETMPS;
 save_scalar(gv); /* local $0 */
-#if PERL_REVISION == 5  PERL_VERSION = 9
+#if MP_PERL_VERSION_AT_LEAST(5, 9, 0)
 TAINT_NOT; /* XXX: temp workaround, see my p5p post */
 #endif
 sv_setref_pv(server, Apache2::ServerRec, (void*)s);

Modified: perl/modperl/trunk/src/modules/perl/modperl_common_util.c
URL: 
http://svn.apache.org/viewvc/perl/modperl/trunk/src/modules/perl/modperl_common_util.c?view=diffrev=482563r1=482562r2=482563
==
--- perl/modperl/trunk/src/modules/perl/modperl_common_util.c (original)
+++ perl/modperl/trunk/src/modules/perl/modperl_common_util.c Tue Dec  5 
02:01:08 2006
@@ -23,9 +23,8 @@
 
 #include modperl_common_util.h
 
-
 /* Prefetch magic requires perl 5.8 */
-#if ((PERL_REVISION == 5)  (PERL_VERSION = 8))
+#if MP_PERL_VERSION_AT_LEAST(5, 8, 0)
 
 /* A custom MGVTBL with mg_copy slot filled in allows us to FETCH a
  * table entry immediately during iteration.  For multivalued keys
@@ -68,7 +67,7 @@
 sv_setref_pv(rsv, classname, p);
 
 /* Prefetch magic requires perl 5.8 */
-#if ((PERL_REVISION == 5)  (PERL_VERSION = 8))
+#if MP_PERL_VERSION_AT_LEAST(5, 8, 0)
 
 sv_magicext(hv, NULL, PERL_MAGIC_ext, NULL, Nullch, -1);
 SvMAGIC(hv)-mg_virtual = (MGVTBL *)modperl_table_magic_prefetch;

Modified: 

svn commit: r482619 - /perl/modperl/trunk/lib/Apache2/PerlSections.pm

2006-12-05 Thread pgollucci
Author: pgollucci
Date: Tue Dec  5 04:20:28 2006
New Revision: 482619

URL: http://svn.apache.org/viewvc?view=revrev=482619
Log:
fix a typo

Modified:
perl/modperl/trunk/lib/Apache2/PerlSections.pm

Modified: perl/modperl/trunk/lib/Apache2/PerlSections.pm
URL: 
http://svn.apache.org/viewvc/perl/modperl/trunk/lib/Apache2/PerlSections.pm?view=diffrev=482619r1=482618r2=482619
==
--- perl/modperl/trunk/lib/Apache2/PerlSections.pm (original)
+++ perl/modperl/trunk/lib/Apache2/PerlSections.pm Tue Dec  5 04:20:28 2006
@@ -95,7 +95,7 @@
 #We don't want to pick up stashes...
 next if ($key =~ /::$/);
 local (*ENTRY) = $val;
-if (defined $val  defined *ENTRY{SCALAR} defined $ENTRY) {
+if (defined $val  defined *ENTRY{SCALAR}  defined $ENTRY) {
 push @{$self-{symbols}}, [$key, $ENTRY];
 }
 if (defined $val  defined *ENTRY{ARRAY}) {




svn commit: r482625 - in /perl/modperl/trunk: Changes lib/Apache2/PerlSections.pm

2006-12-05 Thread pgollucci
Author: pgollucci
Date: Tue Dec  5 04:34:57 2006
New Revision: 482625

URL: http://svn.apache.org/viewvc?view=revrev=482625
Log:
Prevent direct use of _deprecated_ Apache2::ReadConfig in
Perl sections with httpd Alias directives from 
incorrectly generating
'The Alias directive in x at line y will probably never match'
messages.

This silences the related 5 test suite warnings:
[warn] The Alias directive in mod_perl at line 1 will probably never match 
because it overlaps an earlier Alias.

Reported by: Stas Bekman [EMAIL PROTECTED]


Modified:
perl/modperl/trunk/Changes
perl/modperl/trunk/lib/Apache2/PerlSections.pm

Modified: perl/modperl/trunk/Changes
URL: 
http://svn.apache.org/viewvc/perl/modperl/trunk/Changes?view=diffrev=482625r1=482624r2=482625
==
--- perl/modperl/trunk/Changes (original)
+++ perl/modperl/trunk/Changes Tue Dec  5 04:34:57 2006
@@ -12,6 +12,13 @@
 
 =item 2.0.4-dev
 
+Prevent direct use of _deprecated_ Apache2::ReadConfig in
+Perl sections with httpd Alias directives from 
+incorrectly generating
+'The Alias directive in x at line y will probably never match'
+messages.
+[Philip M. Gollucci [EMAIL PROTECTED]]
+
 Prevent Apache2::PerSections::symdump() from returning invalid
 httpd.conf snippets like 'Alias undef'
 [Philip M. Gollucci [EMAIL PROTECTED]]

Modified: perl/modperl/trunk/lib/Apache2/PerlSections.pm
URL: 
http://svn.apache.org/viewvc/perl/modperl/trunk/lib/Apache2/PerlSections.pm?view=diffrev=482625r1=482624r2=482625
==
--- perl/modperl/trunk/lib/Apache2/PerlSections.pm (original)
+++ perl/modperl/trunk/lib/Apache2/PerlSections.pm Tue Dec  5 04:34:57 2006
@@ -79,6 +79,8 @@
 Apache2::Const::OK;
 }
 
+my %directives_seen_hack;
+
 sub symdump {
 my ($self) = @_;
 
@@ -99,7 +101,10 @@
 push @{$self-{symbols}}, [$key, $ENTRY];
 }
 if (defined $val  defined *ENTRY{ARRAY}) {
-push @{$self-{symbols}}, [$key, [EMAIL PROTECTED];
+unless (exists $directives_seen_hack{$key$val}) {
+$directives_seen_hack{$key$val} = 1;
+push @{$self-{symbols}}, [$key, [EMAIL PROTECTED];
+}
 }
 if (defined $val  defined *ENTRY{HASH}  $key !~ /::/) {
 push @{$self-{symbols}}, [$key, \%ENTRY];




svn commit: r482951 - /perl/Apache-SizeLimit/trunk/Changes

2006-12-05 Thread pgollucci
Author: pgollucci
Date: Tue Dec  5 23:51:58 2006
New Revision: 482951

URL: http://svn.apache.org/viewvc?view=revrev=482951
Log:
add missing bug fix to changes entry

Modified:
perl/Apache-SizeLimit/trunk/Changes

Modified: perl/Apache-SizeLimit/trunk/Changes
URL: 
http://svn.apache.org/viewvc/perl/Apache-SizeLimit/trunk/Changes?view=diffrev=482951r1=482950r2=482951
==
--- perl/Apache-SizeLimit/trunk/Changes (original)
+++ perl/Apache-SizeLimit/trunk/Changes Tue Dec  5 23:51:58 2006
@@ -8,7 +8,12 @@
 
 =item 0.91-dev
 
+Fix Can't call method child_terminate on an undefined value
+By add_cleanup_handler() pass $r to _exit_if_to_big() via shift
+[David Wheeler [EMAIL PROTECTED]]
+
 Added a SUPPORT section to the docs.
+[Dave Rolsky [EMAIL PROTECTED]]
 
 =item 0.9 2006-07-12
 




svn commit: r482955 - /perl/Apache-SizeLimit/trunk/Changes

2006-12-05 Thread pgollucci
Author: pgollucci
Date: Tue Dec  5 23:56:49 2006
New Revision: 482955

URL: http://svn.apache.org/viewvc?view=revrev=482955
Log:
note the Hybridization 

Modified:
perl/Apache-SizeLimit/trunk/Changes

Modified: perl/Apache-SizeLimit/trunk/Changes
URL: 
http://svn.apache.org/viewvc/perl/Apache-SizeLimit/trunk/Changes?view=diffrev=482955r1=482954r2=482955
==
--- perl/Apache-SizeLimit/trunk/Changes (original)
+++ perl/Apache-SizeLimit/trunk/Changes Tue Dec  5 23:56:49 2006
@@ -8,6 +8,16 @@
 
 =item 0.91-dev
 
+  *** HEADS UP - SHARED CODE BASE - HEADS UP  ***
+  Apache-SizeLimit has been hybrized.  
+  It has been split into 3 packages.  
+1) Apache::SizeLimit  - User API for httpd 1.3.x / mod_perl 1.x
+2) Apache2::SizeLimit - User API for httpd 2.x / mod_perl 2.x
+
+3) Apache::SizeLimit::Core - Interal Shared Functionality
+ _NEVER_ use this module directly.
+[Philip M. Gollucci [EMAIL PROTECTED]]
+
 Fix Can't call method child_terminate on an undefined value
 By add_cleanup_handler() pass $r to _exit_if_to_big() via shift
 [David Wheeler [EMAIL PROTECTED]]