LPM: Note from not-subscribed address
Rich Bowen
rbowen at rcbowen.com
Mon Aug 19 11:23:59 CDT 2002
From: "Billy Marlin" <res0bhnu at verizon.net>
To: <lexington-pm-list at pm.org>
Subject: Need some perl help
Date: Tue, 14 Aug 2001 10:10:54 -0700
Ok well what I am going to give you might not be enough for anyone to =
establish on what the problem is but here goes.
I am working with 3 websites which all use the same exact principle and =
scripts. The latest website I just finished and copied all the perl =
files over for the shopping cart. I went in and changed all the =
required files to point to the right area. This shopping cart uses =
about 15 different files hence the reason for me not posting exactly =
what is going on.
Anyways I got everything working except for one item. After the =
shopping cart is loaded and the person is going to check out. They go =
to the link that says you are entering a ssl section. Up to this point =
the program has a cookie base on the time the order was made and this =
stays the same until you enter the ssl area. I have been printing out =
the cookie every page change and found this was when it gets lost. Soon =
as you come into the Secure area which works on the other the other 2 =
websites which are exactly the same. The cookie vanishes! I have it =
redirect to the homepage if there is not a cookie. Now from the home =
page I click to go to my shopping cart and BAM it pulls up the info =
using the cookie which now exists.
My current problems are due to a lot of limitations. I do not have =
access to my error log file which really hurts. I also do not know the =
complete configuration of the server. I requested it be the same as the =
other 2 we are using and like I said all the other scripts I am using =
work fine.
Is there something that anyone can advise me to do to solve what is the =
problem here. I know I have not given a lot of specifics but this is =
all I have without going into a lot of detail. If you need more let me =
know. =20
Billy Marlin
Here is how the cookies are handled
################################## Function =
##################################
#
# Function: getCookie
#
# Description:
# Look for a cookie. If one is not set, set one based on the current =
time.
#
# Notes:
#
#########################################################################=
#####
sub getCookie
{
# Does a cookie exist?
my($cartkey) =3D cookie(-name=3D>&cart::CART_COOKIE);
# If a cookie exists, an administrator is logged in
if (!$cartkey)
{
# Cookie doesn't exist
# Set a cookie based on the current time in seconds since the Epoch
$cartkey =3D time;
# Prepare the cookie to go in the header
my($cookie) =3D cookie(-name=3D>&cart::CART_COOKIE, =
-value=3D>$cartkey);
# Set the cookie in the header
print header(-cookie=3D>$cookie);
&webpage::headerPrinted();
}
=20
return $cartkey;
} # getCookie
More information about the Lexington-pm
mailing list