[ic] Switching from HIGH mode to RPC mode problem
Mike Heins
mike at perusion.com
Thu Aug 11 09:32:12 EDT 2005
Quoting Mark Bryant (mark at eros-shop.co.uk):
> [perl tables]
> my $myout = '';
> $myout = sprintf("<TD ALIGN=RIGHT class=contentbar1>£%.2f</td>",
> $Tag->subtotal({ noformat => 1 })*0.175);
> return $myout;
> [/perl]
>
> gives this in error.log when in RPC
>
> supercow.vwe.net EXs8HmVi:vwe.net - [11/August/2005:01:27:37 +0000] eros
> /cgi-bin/eros/ord/basket Safe: Can't locate object method "TIEHASH" via
> package "DBI::st" at /usr/lib/perl5/site_perl/5.6.1/i386-linux/DBI.pm line
> 1007.
You may think that is a very simple piece of code -- I don't. 8-)
The reason is that the subtotal() routine goes very far afield; it
opens what seems like every table in the catalog.
Try this and see if the last subtotal() call works:
[perl tables="products pricing all the tables you need"]
## Initialize the tables first
[/perl]
<!-- Make sure all tables are opened -->
<!-- [subtotal] -->
[perl]
$Tag->subtotal()
[/perl]
I am surprised it works in non-prefork mode, as that shouldn't make
any difference. You don't mention your database type -- Postgres? It
usually is more finicky.
--
Mike Heins
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.765.647.1295 tollfree 800-949-1889 <mike at perusion.com>
Friends don't let friends use Outlook. -- Bob Blaylock
More information about the interchange-users
mailing list