[ic] Switching from HIGH mode to RPC mode problem

Mark Bryant mark at eros-shop.co.uk
Thu Aug 11 12:18:02 EDT 2005


At 14:32 11/08/2005, you wrote:
>Quoting Mark Bryant (mark at eros-shop.co.uk):
> > [perl tables]
> >   my $myout = '';
> >   $myout = sprintf("<TD ALIGN=RIGHT class=contentbar1>&#163;%.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.

Hi Mike,

Thanks for your time looking at this.

The DB I'm using is MySQL 3.23.49-3.

Just so that you're in the picture, I followed a suggestion from Jim Bower 
earlier today to use single quotes around the noformat part of that code 
line and the error disappeared for that particular [perl][/perl] block on 
the basket page when in RPC mode. I guess that's mission successful there :)

What's troubling me now is the new set of errors (see my last post) I see 
on the checkout page for more [perl][/perl] blocks. The error is different 
and I've not been able to google anything useful on that either :(

I still can't see why these blocks don't work outside of high traffic mode 
and I'm really beginning to wonder if I've really screwed everything up by 
making my own mods. I used to think I could write in/good basic Perl, 
clearly not!!

I'd gladly pay someone who's completely IC and Perl savvy to make the 
required changes to the IC system as I'm wasting lots of time not getting 
anywhere fast when I could be diverting my time into other productive things.

I've still got a few issues I need to work through (including multi 
taxation/VAT, the hiding of inactive products from search results, upgrade 
the MySQL server and getting things to run properly in RPC mode), so anyone 
who wants to me a reasonable offer to do this kind of work and save me the 
headache and wasted time, please get in contact (contact numbers/addresses 
are on my signature below) :)

Many thanks

Mark





Eros Shop
vwe internet ltd
PO BOX 1067
SLOUGH
SL1 7YA
UK

Shop - http://www.eros-shop.co.uk
EMail - info at eros-shop.co.uk
Tel - 0870 284 3369
Fax - 0870 284 4469




More information about the interchange-users mailing list