From rbowen at rcbowen.com Mon Aug 19 11:22:24 2002 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:06:12 2004 Subject: LPM: Anyone still out there? Message-ID: I was wondering about two things. First, I was wondering if there was still anyone on the list who has any interest in actually having a Perl Mongers group. And, if so, what they would like that group to look like. Secondly, I was wondering if there would be any interest in a local IRC channel for Perl things? I've set up #perl on irc.lplug.org, and I'll hang out there for the next few days to see if anyone drops by. -- Nothing is perfekt. Certainly not me. Success to failure. Just a matter of degrees. From rbowen at rcbowen.com Mon Aug 19 11:23:59 2002 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:06:12 2004 Subject: LPM: Note from not-subscribed address Message-ID: From: "Billy Marlin" To: 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 From gcasillo at ket.org Mon Aug 19 12:51:00 2002 From: gcasillo at ket.org (Gregg Casillo) Date: Thu Aug 5 00:06:12 2004 Subject: LPM: Note from not-subscribed address References: Message-ID: <3D613004.4050601@ket.org> I've done something similar to this recently including the use of non-secure and secure web servers to process orders. Could it be that you're setting your cookie with a domain that has the hostname in it? A cookie whose domain is "www.foobar.com" cannot be read by another web server at "secure.foobar.com" or "pub.foobar.com". If this is the case, try setting your cookie using only the domain name so that different hosts (e.g. one that runs your non-secure web server and another that runs your secure server) can read the cookie. So in the above example, you want to set your cookie domain with ".foobar.com". This means both servers at "www.foobar.com" and "secure.foobar.com" can read the cookie. Perhaps this explains why your secure server is balking and redirecting to your non-secure homepage where the cookie can be read and your shopping cart is flush once again. Hope I'm reading you right and this helps, Gregg Casillo Kentucky Educational Television gcasillo@ket.org Rich Bowen wrote: > From: "Billy Marlin" > To: > 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 > > > From hempy at ket.org Mon Aug 19 16:52:50 2002 From: hempy at ket.org (David Hempy) Date: Thu Aug 5 00:06:12 2004 Subject: LPM: Note from not-subscribed address In-Reply-To: Message-ID: <5.1.0.14.0.20020819163421.01b49cb0@mail.ket.org> Any time I run into a problem where I'm not sure how the browser and the server are interacting, I fire up a little shareware program called HTTP Tracer. It is the ultimate debugger, as it is not a part of the client or the server...you see *exactly* what is sent between the two. Download it for free from http://www.concentric.net/~Sstmail. Register it for $25 and it will pay for itself every time you use it. Hope this helps, -dave At 12:23 PM 8/19/2002 -0400, you wrote: >From: "Billy Marlin" >To: >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 -- David Hempy Internet Database Administrator Kentucky Educational Television (859)258-7164 - (800)333-9764 From rbowen at rcbowen.com Wed Aug 21 20:56:30 2002 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:06:12 2004 Subject: LPM: Re: Note from not-subscribed address Message-ID: From: "Billy Marlin" To: Subject: Re: LPM: Note from not-subscribed address Date: Sun, 19 Aug 2001 14:40:24 -0700 Well it took a lot of time and a lot of aggrevation figuring this one out. The biggest downfall was that these sites are all hosted by valueweb and on three different servers. All I did was mirror the other sites and the cookie was the only thing that did not work. However what I ended up doing which corrected the problem was the inclusion of the path! Before the script did not specify the path and operated the exact same way and worked. For some strange reason I had to specify the path and now it works. Billy Marlin ----- Original Message ----- From: "Gregg Casillo" To: Sent: Monday, August 19, 2002 10:51 AM Subject: Re: LPM: Note from not-subscribed address > I've done something similar to this recently including the use of > non-secure and secure web servers to process orders. Could it be that > you're setting your cookie with a domain that has the hostname in it? A > cookie whose domain is "www.foobar.com" cannot be read by another web > server at "secure.foobar.com" or "pub.foobar.com". > > If this is the case, try setting your cookie using only the domain name > so that different hosts (e.g. one that runs your non-secure web server > and another that runs your secure server) can read the cookie. So in the > above example, you want to set your cookie domain with ".foobar.com". > This means both servers at "www.foobar.com" and "secure.foobar.com" can > read the cookie. > > Perhaps this explains why your secure server is balking and redirecting > to your non-secure homepage where the cookie can be read and your > shopping cart is flush once again. > > Hope I'm reading you right and this helps, > Gregg Casillo > Kentucky Educational Television > gcasillo@ket.org > > > Rich Bowen wrote: > > From: "Billy Marlin" > > To: > > 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 > > > > > > > > From jgibson at lexmark.com Thu Aug 22 07:48:01 2002 From: jgibson at lexmark.com (John Gibson) Date: Thu Aug 5 00:06:12 2004 Subject: LPM: Net::FTP question Message-ID: <20020822124801.GA12694@chucky.lpdev.prtdev.lexmark.com> Hello all, I am having a problem with a program that mirrors an ftp site. I am using the Net::FTP module but I keep running into these timeout situations. Does any one know how to recover from these timeouts. It keeps dieing on me and I do not get a chance to resume the get of that file. If there was a way I could short circuit the timeout so that it did not die and just returned with a error code that would suffice. Thanks in advance for any help. Error message: DEBUG: (main::125) Checking for SRPMS/kernel-2.4.18-10.src.rpm Getting /users/gibson/tmp/mirror/SRPMS/kernel-2.4.18-10.src.rpm from /7.3/en/os/SRPMS/kernel-2.4.18-10.src.rpm on host 216.148.218.204 Attempting to start download of /7.3/en/os/SRPMS/kernel-2.4.18-10.src.rpm(Attempt->1) Timeout at /usr/lib/perl5/vendor_perl/5.6.1/Net/FTP.pm line 470 -- John Gibson jgibson@lexmark.com Pinky, are you pondering what I am pondering? I think so Brain, poit, but where do you stick the feather and call it macaroni?