-------------8<---------- Start Bug Report ------------8<---------- 1. Problem Description:
Today, I'm getting registry errors on my friend's virtual host using ModPerl::Registry on mod_perl 2.0.2: [Thu Oct 27 14:59:44 2005] [error] Global symbol "$class" requires explicit package name at /usr/share/perl5/HTTP/Request.pm line 16.\nCompilation failed in require at /usr/share/perl5/LWP/UserAgent.pm line 12.\nBEGIN failed--compilation aborted at /usr/share/perl5/LWP/UserAgent.pm line 12.\nCompilation failed in require at /home/rambler/san-fan.com/CGI/PayPal_IPN.pl line 4.\nBEGIN failed--compilation aborted at /home/rambler/san-fan.com/CGI/PayPal_IPN.pl line 4.\n PayPal_IPN.pl is posted at the bottom of this message... does anybody have any idea what could be causing this??? This never happened with mod_perl 1.99... And "$class" is wrapped inside a "my()" in HTTP::Request...!!!: my($class, $method, $uri, $header, $content) = @_; Thanks, Tyler 2. Used Components and their Configuration: *** mod_perl version 2.000002 *** using /opt/apache2/perl5lib/i486-linux-gnu-thread-multi/Apache2/BuildConfig.pm *** Makefile.PL options: MP_APR_LIB => aprext MP_AP_PREFIX => /opt/apache2 MP_COMPAT_1X => 0 MP_DEBUG => 1 MP_GENERATE_XS => 1 MP_LIBNAME => mod_perl MP_MAINTAINER => 1 MP_TRACE => 1 MP_USE_DSO => 1 MP_USE_STATIC => 0 *** The httpd binary was not found *** (apr|apu)-config linking info -L/opt/apache2/lib -laprutil-0 -lgdbm -ldb-4.2 -lexpat -L/opt/apache2/lib -lapr-0 -lrt -lm -lcrypt -lnsl -lpthread -ldl *** /usr/bin/perl -V Summary of my perl5 (revision 5 version 8 subversion 7) configuration: Platform: osname=linux, osvers=2.6.14-rc4, archname=i486-linux-gnu-thread-multi uname='linux ninsei 2.6.14-rc4 #1 smp preempt tue oct 11 20:35:48 pdt 2005 i686 gnulinux ' config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN -Dcccdlflags=-fPIC -Darchname=i486-linux-gnu -Dprefix=/usr -Dprivlib=/usr/share/perl/5.8 -Darchlib=/usr/lib/perl/5.8 -Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5 -Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl/5.8.7 -Dsitearch=/usr/local/lib/perl/5.8.7 -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1 -Dsiteman3dir=/usr/local/man/man3 -Dman1ext=1 -Dman3ext=3perl -Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Uusesfio -Uusenm -Duseshrplib -Dlibperl=libperl.so.5.8.7 -Dd_dosuid -des' hint=recommended, useposix=true, d_sigaction=define usethreads=define use5005threads=undef useithreads=define usemultiplicity=define useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O2', cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include' ccversion='', gccversion='4.0.2 (Debian 4.0.2-2)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='cc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt perllibs=-ldl -lm -lpthread -lc -lcrypt libc=/lib/libc-2.3.5.so, so=so, useshrplib=true, libperl=libperl.so.5.8.7 gnulibc_version='2.3.5' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL_IMPLICIT_CONTEXT Built under linux Compiled at Oct 17 2005 15:55:55 %ENV: PERL_LWP_USE_HTTP_10="1" @INC: /etc/perl /usr/local/lib/perl/5.8.7 /usr/local/share/perl/5.8.7 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl . *** Packages of interest status: Apache2 : - Apache2::Request : - CGI : 3.10 ExtUtils::MakeMaker: 6.17 LWP : 5.803 mod_perl : - mod_perl2 : 2.000002 3. This is the core dump trace: (if you get a core dump): [CORE TRACE COMES HERE] This report was generated by bin/mp2bug on Thu Oct 27 22:08:57 2005 GMT. -------------8<---------- End Bug Report --------------8<---------- Note: Complete the rest of the details and post this bug report to modperl <at> perl.apache.org. To subscribe to the list send an empty email to [EMAIL PROTECTED] #!c:/perl/bin/perl use strict; use DBI; use LWP::UserAgent; use Time::ParseDate; my $dbh = DBI->connect ('DBI:mysql:database=ryan;host=127.0.0.1;port=3306', '********', '********', { RaiseError => 1, AutoCommit => 1 } ) || die; # read post from PayPal system and add 'cmd' read (STDIN, my $query, $ENV{'CONTENT_LENGTH'}); $query .= '&cmd=_notify-validate'; # post back to PayPal system to validate my $ua = new LWP::UserAgent; my $req = new HTTP::Request 'POST','http://www.paypal.com/cgi-bin/webscr'; $req->content_type('application/x-www-form-urlencoded'); $req->content($query); my $res = $ua->request($req); # split posted variables into pairs my(@pairs) = split(/&/, $query); my $count = 0; my(%variable); foreach my $pair (@pairs) { my ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $variable{$name} = $value; $count++; } # store information if ($res->is_error) { die; # HTTP error } else { $variable{'remote_ip'} = 0; $variable{'add_date'} = time(); $variable{'verify_response'} = $res->content(); $variable{'other_variables'} = undef; ($variable{'payment_date'} = parsedate($variable{'payment_date'})) if ($variable{'payment_date'}); ($variable{'auction_closing_date'} = parsedate($variable{'auction_closing_date'})) if ($variable{'auction_closing_date'}); delete($variable{''}); my $sth = $dbh->prepare(" INSERT INTO paypal_ipn_log ( remote_ip, add_date, verify_response, other_variables, business, receiver_email, item_name, item_number, quantity, invoice, custom, memo, tax, option_name1, option_selection1, option_name2, option_selection2, num_cart_items, payment_status, pending_reason, reason_code, payment_date, txn_id, txn_type, payment_type, mc_gross, mc_fee, mc_currency, settle_amount, settle_currency, exchange_rate, payment_gross, payment_fee, for_auction, auction_buyer_id, auction_closing_date, auction_multi_item, first_name, last_name, address_street, address_city, address_state, address_zip, address_country, address_status, payer_email, payer_id, payer_status, notify_version, verify_sign ) VALUES ( ?,FROM_UNIXTIME(?),?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,FROM_UNIXTIME(?),?,?,?, ?,?,?,?,?,?,?,?,?,?,FROM_UNIXTIME(?),?,?,?,?,?,?,?,?,?,?,?,?,?,? )"); my(@ipn_data) = @variable { 'remote_ip', 'add_date', 'verify_response', 'other_variables', 'business', 'receiver_email', 'item_name', 'item_number', 'quantity', 'invoice', 'custom', 'memo', 'tax', 'option_name1', 'option_selection1', 'option_name2', 'option_selection2', 'num_cart_items', 'payment_status', 'pending_reason', 'reason_code', 'payment_date', 'txn_id', 'txn_type', 'payment_type', 'mc_gross', 'mc_fee', 'mc_currency', 'settle_amount', 'settle_currency', 'exchange_rate', 'payment_gross', 'payment_fee', 'for_auction', 'auction_buyer_id', 'auction_closing_date', 'auction_multi_item', 'first_name', 'last_name', 'address_street', 'address_city', 'address_state', 'address_zip', 'address_country', 'address_status', 'payer_email', 'payer_id', 'payer_status', 'notify_version', 'verify_sign' }; my $success = $sth->execute(@ipn_data) || 'failed'; }