[freeside] 1.4.0 post-install search error, during compilation of cust_main.cgi
ivan
ivan at 420.am
Tue Mar 11 18:11:35 PST 2003
Use 1.4.1 with Mason.
On Fri, Mar 07, 2003 at 03:44:54PM -0600, Freeside User wrote:
> Setup:
>
> Apache/1.3.27 (Unix) mod_perl/1.27 mod_ssl/2.8.12 OpenSSL/0.9.6e -
> HTML-Mason-1.05, freeside-1.4.0, perl v5.6.1
> RH 6.2, kernel 2.4.19
>
> freeside-1.4.0 install went great (no obvious errors) and I appear to be
> able to set up accounts (as far as I can tell). When attempting to
> search via customer number (regarless of input), I consistently get the
> following error. Nothing is reported in the apache error log, and I'm
> uncertain as to where the error is originating.
>
> Some questions I'll answer before they're asked:
> * freeside-queued is running as a freeside user, but not as uid freeside
> * /usr/local/etc/freeside is owned by freeside.root, perms 0755
> * my DocRoot is /opt/freeside/web/masondocs
> * I have the following in my httpd.conf -
>
> PerlModule HTML::Mason
> <Directory /opt/freeside/web/masondocs>
> <Files ~ (\.cgi)>
> AddHandler perl-script .cgi
> PerlHandler HTML::Mason
> </Files>
> <Perl>
> require "/opt/freeside/httpd/conf/handler.pl";
> </Perl>
> </Directory>
>
> * And the following defined in handler.pl -
>
> my $interp = new HTML::Mason::Interp (parser=>$parser,
>
> comp_root=>'/opt/freeside/web/masondocs', data_dir=>'/usr/local/etc/freeside/mason-data',
>
> * I'm also using the following in handler.pl -
> use HTML::Mason::ApacheHandler (args_method=>'mod_perl');
>
> Any assistance is greatly appreciated. Your questions are welcome.
>
> Thanks very much for your time.
>
> -- error below --
>
> error in file: /usr/local/etc/freeside/mason-data/obj/search/cust_main.cgi
> line 113:
> "my" variable $sth masks earlier
> declaration in same scope
> line 184:
> Global symbol "$query" requires
> explicit package name
> line 185:
> Global symbol "$query" requires
> explicit package name
> line 185:
> Global symbol "$query" requires
> explicit package name
> line 186:
> Global symbol "$query" requires
> explicit package name
> line 480:
> "my" variable $custnum masks earlier
> declaration in same scope
> context:
> ...
>
> 109:
> SELECT cust_pkg.custnum,COUNT(*) as
> count
> 110:
> FROM cust_pkg,cust_main
> 111:
> WHERE cust_pkg.custnum =
> cust_main.custnum
> 112:
> GROUP BY cust_pkg.custnum";
> 113:
> my $sth = dbh->prepare($query) or
> die dbh->errstr. " preparing
> $query";
> 114:
> $sth->execute or die "Error
> executing \"$query\": ".
> $sth->errstr;
> 115:
> }
> 116:
>
> 117:
> if (
> $cgi->param('showcancelledcustomers') eq '0' #see if it was set by me
> ...
>
> 180:
> @just_cust_main =
> qsearch('cust_main', \%search, '',
> 181:
> "$ncancelled $orderby $limit" );
> 182:
> }
> 183:
> if ( driver_name eq 'mysql' ) {
> 184:
> $query = "DROP TABLE
> temp1_$$,temp2_$$;";
> 185:
> my $sth = dbh->prepare($query) or
> die dbh->errstr. " preparing
> $query";
> 186:
> $sth->execute or die "Error
> executing \"$query\": ".
> $sth->errstr;
> 187:
> }
> 188:
> @cust_main = @just_cust_main;
> 189:
>
> 190:
> # foreach my $cust_main (
> @just_cust_main ) {
> ...
>
> 476:
>
> 477:
> my $custnum =
> $cgi->param('custnum_text');
> 478:
> $custnum =~ s/\D//g;
> 479:
> $custnum =~ /^(\d{1,23})$/ or eidiot
> "Illegal customer number\n";
> 480:
> my $custnum = $1;
> 481:
>
> 482:
> [ qsearchs('cust_main', { 'custnum'
> => $custnum } ) ];
> 483:
> }
> 484:
>
> ...
>
> code stack:
> /usr/local/lib/perl5/site_perl/5.6.1/HTML/Mason/Interp.pm:387
> /usr/local/lib/perl5/site_perl/5.6.1/HTML/Mason/Request.pm:117
>
--
_ivan
More information about the freeside-users
mailing list