"End of file found" error with Apache2::UploadProgress
am 28.05.2008 18:29:02 von greg boyingtonHello List,
It appears as though there's some sort of bug in, or relating to,
Apache2::UploadProgress. I am running apache 2.2.8 on OS X with the
libapreq2-2.10 dev snapshot and HTML::Mason 1.39. When I enable the
Apache2::UploadProgress module, the first file that is uploaded causes
the mason component to abort with the error "End of file found."
Subsequent uploads handled by this httpd process are handled normally.
The error does not seem related to the browser; I have been testing
with various firefox 3 betas, including RC1, firefox 2.0.14, safari
3.1.1, opera 9.24, all on OS X, as well as firefox 2.0.14, opera 9.24,
and ie7 on Windows XP. Neither does the error seem to relate to file
size; I have being using files ranging in size from 5kb to 780mb.
Here are the relevant lines of my httpd.conf:
PerlResponseHandler ModPerl::Registry
PerlSetVar MasonArgsMethod mod_perl
PerlOptions +GlobalRequest
PerlModule Apache2::Reload
PerlModule Apache2::Resource
PerlChildInitHandler Apache2::Resource
PerlLoadModule Apache2::UploadProgress
PerlPostReadRequestHandler Apache2::UploadProgress
APREQ2_ReadLimit 1024M
And here is the output of httpd -V:
Server version: Apache/2.2.8 (Unix)
Server built: Mar 25 2008 13:49:52
Server's Module Magic Number: 20051115:11
Server loaded: APR 1.2.7, APR-Util 1.2.7
Compiled using: APR 1.2.7, APR-Util 1.2.7
Architecture: 32-bit
Server MPM: Prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_FLOCK_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=128
-D HTTPD_ROOT="/usr/local/apache2"
-D SUEXEC_BIN="/usr/local/apache2/bin/suexec"
-D DEFAULT_PIDLOG="logs/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="logs/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
And here is the mason component I've been using for testing:
% if ( $u ) {
Result:
File <% $u->filename() %> uploaded.
% }
<%init>
my $req = Apache2::Request->new($r);
my $u = $req->upload("file");
if ( $u ) {
$u->link('/tmp/test.file');
}
%init>
As you can see I'm not even invoking the upload progress bar in the
component; merely enabling the module in httpd.conf seems to be enough
to cause the problem. (When I do enable it, aside from this error, it
works beautifully. :) )
There has been chatter about this "End of file found" error on this
list before, specifically in
http://www.jsw4.net/info/listserv_archives/mod_perl/05-wk41/ msg00011.html
Joe Schaefer states that he "just patched apreq's trunk (which will be
part of 2.07 when released) so the 'End of file Found' problem
disappears." I assume this patch made its way into 2.2-10, and I
haven't found reference to this error elsewhere, so I'm a bit stumped.
If anyone can suggest further debugging strategies, or a workaround,
I would be very grateful.
Cheers,
Greg