Main Page | Report this Page
Computers Forum Index  »  Computer Languages (Perl - Modules)  »  Problem with mod_perl lib...
Page 1 of 1    

Problem with mod_perl lib...

Author Message
Studbolt...
Posted: Thu Sep 17, 2009 2:39 pm
Guest
Hi all. I've been beating my head against a dynlib problem for a
couple of days, and I finally figured I'd bother somebody else with
it. If I call the following piece of code using http://localhost/cgi-bin/test.cgi:
-------------------------------------------
#!/usr/bin/perl

use Apache2::Upload;

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

# three methods to get at the upload's contents ... slurp, fh, io

$upload->slurp($slurp_data);

read $upload->fh, $fh_data, $size;
ok $slurp_data eq $fh_data;

my $io = $upload->io;
print while <$io>;

-------------------------------------------
I get an error and the following in my Apache log:

[Thu Sep 17 07:37:02 2009] [error] [client ::1] dyld: lazy symbol
binding failed: Symbol not found: _modperl_xs_sv2request_rec
[Thu Sep 17 07:37:02 2009] [error] [client ::1] Referenced from: /
Library/Perl/5.8.8/darwin-thread-multi-2level/auto/APR/Request/Apache2/
Apache2.bundle
[Thu Sep 17 07:37:02 2009] [error] [client ::1] Expected in: dynamic
lookup
[Thu Sep 17 07:37:02 2009] [error] [client ::1]
[Thu Sep 17 07:37:02 2009] [error] [client ::1] dyld: Symbol not
found: _modperl_xs_sv2request_rec
[Thu Sep 17 07:37:02 2009] [error] [client ::1] Referenced from: /
Library/Perl/5.8.8/darwin-thread-multi-2level/auto/APR/Request/Apache2/
Apache2.bundle
[Thu Sep 17 07:37:02 2009] [error] [client ::1] Expected in: dynamic
lookup
[Thu Sep 17 07:37:02 2009] [error] [client ::1]
[Thu Sep 17 07:37:03 2009] [error] [client ::1] Premature end of
script headers: test.cgi


However, the module does appear to be loading into Apache okay:

sh-3.2# /usr/local/apache2/bin/httpd -M
Loaded Modules:
core_module (static)
authn_file_module (static)
authn_default_module (static)
authz_host_module (static)
authz_groupfile_module (static)
authz_user_module (static)
authz_default_module (static)
auth_basic_module (static)
include_module (static)
filter_module (static)
log_config_module (static)
env_module (static)
setenvif_module (static)
mpm_prefork_module (static)
http_module (static)
mime_module (static)
status_module (static)
autoindex_module (static)
asis_module (static)
cgi_module (static)
negotiation_module (static)
dir_module (static)
actions_module (static)
userdir_module (static)
alias_module (static)
so_module (static)
php5_module (shared)
perl_module (shared)
apreq_module (shared)
Syntax OK

And a make test in /usr/local/cpan/build/libapreq2-2.12 seems to run
without problems.

What am I missing?

Thanks in advance for any insights anybody might be able to provide!
Dave
 
 
Page 1 of 1    
All times are GMT
The time now is Sun Nov 22, 2009 1:54 pm