[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
newbie questions
- Subject: newbie questions
- Date: Wed, 27 Jun 2007 20:40:46 -0400
- From: "pubert na" <suppressed>
I've been trying to convert our app over to mod_perl. Everything went smoothly except the cookies. When I load the page, some frames load and other don't. Below is the Perl function which prints out the headers. It's called before any template is printed. If I comment out the cookie lines, and print out an empty header the frames load perfectly, albeit without any session support. I'm sure this is a big time newbie question, but I'd appreciate some help... I've been googling around for quite a while. Thanks in advance. --Pubert
my $bDidHeader;
my $_cookies={};
#########################################################################################################
sub printHeader {
#########################################################################################################
my $contentType = shift;
$contentType = 'text/plain; charset=utf-8' if(!$contentType);
my $cgi;
my $sessCookie;
if(!$bDidHeader) {
my $objVP = VirtualPlant::getInstance();
if(! $objVP) {
use CGI;
$cgi = new CGI;
$sessCookie = '';
} else {
$cgi = $objVP->Cgi;
$sessCookie = $cgi->cookie( CGISESSID => $objVP->Session()->id );
}
if($sessCookie) {
VirtualPlant::Util::setCookie($sessCookie);
print $cgi->header(
-cookie => values %{VirtualPlant::Util::getCookies()}
);
}
$bDidHeader = VirtualPlant::TRUE;
}
}
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.