Thanx guys, Ive moved my account to prohosting now
I tried my code there and the same thing is still happening
i.e. cookie created by not able to read it back
After I had created the cookie I edited my script so that it now only requested the cookie instead of creating it( the cookie is already there and it should therefore by sent to the script by the user agent)
I searched for the cookie with
my $cookie_in = $query->cookie("MY_NAME");
but still nothing
when I tried Andy's code I got the following....
pkit_id=user_id&nirvana7&hash&965e21f712b38aa13586765230ccc75a
pkit_session_id=c0fcc76283804096c4c56ca15e9eb4af
THis is the code he used to retrieve his cookie
my $rcvd_cookies = $ENV{'HTTP_COOKIE'};
my @cookies = split /;/, $rcvd_cookies;
foreach my $cookie (@cookies)
{
print $cookie,"\n";
}
Therefore the raw data of this return, has the two lines above seperated by a semicolon
Im now initialising the cookie with....
my $cookie_out = $query->cookie(
-name=>"MY_NAME",
-value=>"Barry Griffin",
-expires=>'+24h',
-path=>'/cgi-bin/~nirvana7',
-domain=>'rain.prohosting.com',
-secure=>0
);
The cookie content is
MY_NAME
Barry%20Griffin
rain.prohosting.com/cgi-bin/~nirvana7
0
1510090368
29437992
743584160
29437790
*
MY Script is located at:
http://rain.prohosting.com/~nirvana7/cgi-bin/dumb1.cgi
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.