Hi Guys, Im having quite a big problem (in my eyes), I will try to explain it the best i can. I use CGI:SSI (autotie => 'STDOUT'); as the site im working with has a quite big HTML database with some SSI's in the HTML Code. The Reason i use CGI:SSI is becuase the browser will not process the scripts output for SSI with outit. The SSI im calling is another CGI script however this script is not able to read the cookies? This is where i am stuck. I use a standard sub to read all my cookies.. so i know its working. here it is just encase..
sub getcookie{ use Crypt::RC4; my $passphrase = "*****************"; my $cookiename = uc(shift); if($cookiename eq ""){ return 0 } my $usercookie = $query->cookie($cookiename); my %hashreturn; if($usercookie eq ''){ return 0 } $usercookie = RC4( $passphrase, $usercookie ); if ($usercookie){ my @tempcookie = split(':',$usercookie); foreach my $cookieinfo (@tempcookie){ $cookieinfo =~ /^(.*?)=(.*)/; my $value1 = $1; my $value2 = $2; $hashreturn{$value1} = $value2; } } return (1,%hashreturn); }
I have also tried printing the ENV but there is no cookie in there. I guess the simple question is can SSI calls to other CGI scripts access cookies. just incase you need to know the SSI call im doing is:
<!--#include virtual="http://www.*************.co.uk/cgi-bin/MDCompone +ntdisplay.pl?do=clientadvert&t=457&e=457&jobid=61" -->

In reply to CGI:SSI cookies by MrForsythExeter

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.