Mailing List Archive

help! i messed it up :-/
I had this working fine:

http://www.jbrisbin.net/support/solecom/current/index.ehtml

until I started playing with the options through the $ENV{} hash in
embpcgi.pl and trying to optReturnError back up to the wrapper script so I
could display a custom error page...if you open the Online Catalog nav link
and go to Ladies Casual and add a Parade item to your cart, you'll notice
that 1) the navigation bar collapses, which it didn't do when it worked
right, and the showcart.ehtml page doesn't show any records because there is
no $udat{_session_id)...$udat is written to as soon as you open a nav item,
so there *should* be a session...and in fact *was* till i screwed it up :-)

my embpcgi.pl looks like this:

#!/usr/bin/perl
##
# use my own personal perl libraries
#
use lib "/usr/www/jbrisbin/lib/perl5/site_perl/5.005";
use HTML::Embperl;

############################################################################
#######
#
# Embperl - Copyright (c) 1997-1999 Gerald Richter / ECOS
#
# You may distribute under the terms of either the GNU General Public
# License or the Artistic License, as specified in the Perl README file.
# For use with Apache httpd and mod_perl, see also Apache copyright.
#
# THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
############################################################################
#######

BEGIN {
$EMBPERL_OPTIONS = HTML::Embperl::optAllFormData +
HTML::Embperl::optRedirectStdout + HTML::Embperl::opReturnEr$
$EMBPERL_DEBUG = HTML::Embperl::dbgHeadersIn +
HTML::Embperl::dbgShowCleanup + HTML::Embperl::dbgImport;
$ENV{EMBPERL_SESSION_CLASSES} = "FileStore NullLocker";
$ENV{EMBPERL_SESSION_ARGS} =
"Directory=/usr/www/jbrisbin/httpd/cgi-bin/tmp";
$ENV{EMBPERL_DEBUG} = $EMBPERL_DEBUG;
$ENV{EMBPERL_OPTIONS} = $EMBPERL_OPTIONS;
};

$out = "";
@errors = [];
my $rc = HTML::Embperl::Execute({inputfile => $ENV{PATH_TRANSLATED},
errors => \@errors,
output => \$out});

if($rc ne 0) {
HTML::Embperl::Execute({inputfile =>
"/usr/www/jbrisbin/httpd/htdocs/support/solecom/current/error.ehtml",
param => \@errors,
output => \$out});
}

i've even tried moving things out of the BEGIN...not effect...

...the list of Ladies Casual products is an "Execute"ed file from the
index.ehtml file, and the actual Insert command and shopping cart view are
"Execute"ed pages from the order.ehtml page (additem.ehtml and
showcart.ehtml)...

any help you could give me on tracking this down would be great...i'm sure
it's just a misunderstanding on my part on how this works...just want to try
and find what it is! :-)

thanks!

Jon Brisbin
Re: help! i messed it up :-/ [ In reply to ]
> $ENV{EMBPERL_SESSION_CLASSES} = "FileStore NullLocker";
> $ENV{EMBPERL_SESSION_ARGS} =
> "Directory=/usr/www/jbrisbin/httpd/cgi-bin/tmp";
> $ENV{EMBPERL_DEBUG} = $EMBPERL_DEBUG;
> $ENV{EMBPERL_OPTIONS} = $EMBPERL_OPTIONS;
> };
>
> $out = "";
> @errors = [];
> my $rc = HTML::Embperl::Execute({inputfile => $ENV{PATH_TRANSLATED},
> errors => \@errors,
> output => \$out});
>

Execute doesn't take a look to all these environment varaibles. Either pass
your values directly to Execute (what I would recommend):

my $rc = HTML::Embperl::Execute({inputfile => $ENV{PATH_TRANSLATED},
errors => \@errors,
options => $EMBPERL_OPTIONS,
debug => $EMBPERL_DEBUG,
output => \$out});

or use HTML::Embperl::ScanEnvirnoment to read in the environment (see docs
for more info)

Gerald

P.S. I think that will solve the other issues you mailed as well, if not let
us know

-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925151
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------