Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_php thread: Cannot send session cache limiter?


Message #1 by Chan Ahn <chan_ahn@e...> on Thu, 15 Mar 2001 15:57:20 -0800 (PST)
sorry chan I miss-read your code and thought you tried to register the
session variable after you sent the header, please disregard my last
post
----- Original Message -----
From: "joel" <Jwickard@l...>
To: "professional php" <pro_php@p...>
Sent: Thursday, March 15, 2001 9:45 PM
Subject: [pro_php] Re: Cannot send session cache limiter?


> You have to register your session variables at the beginning of the
> document, before you include any HTML headers.
> ----- Original Message -----
> From: "Chan Ahn" <chan_ahn@e...>
> To: "professional php" <pro_php@p...>
> Sent: Thursday, March 15, 2001 3:57 PM
> Subject: [pro_php] Cannot send session cache limiter?
>
>
> > Hi,
> >
> > Could someone explain to me why I get the following error while
> registering
> > a variable to the current session?
> >
> > Warning: Cannot send session cache limiter - headers already sent
> (output
> > started at E:\Inetpub\kulakali\default.php:2) in
> > E:\Inetpub\kulakali\default.php on line 20
> >
> > Warning: open(/tmp\sess_3e3da2359e5c01f99312cf0509d37c2a, O_RDWR)
> failed: m
> > (2) in E:\Inetpub\kulakali\default.php on line 20
> >
> > Line 20 is "session_register("cartItem")".
> >
> > The following is the part of the php file that generate the
warnings.
> >
> > <!-- #BeginEditable "beforeHTML" -->
> > <?PHP
> > if(!isset($sec)){
> >         print("There is an error. Please contact your
administrator");
> > }
> > else {
> >      //attempt to connect to db only if it is not connected
> >      if(!isset($db)){
> >        if(!$db = mysql_connect("localhost","root")){
> >          print("<h1>Unable to connect to the databse</h1><br>please
> contact
> > your administrator\n");
> >        }
> >        else{
> >          mysql_select_db("kulakali", $db);
> >          session_register("cartItem");
> >        }
> >      }
> > }
> > ?>
> > <!-- #EndEditable -->
> > <html><!-- #BeginTemplate "/Templates/default.dwt" --><head>
> > <!-- #BeginEditable "doctitle" -->
> > <title>kulakali - buy cd now!</title>
> > <!-- #EndEditable -->
> > <meta http-equiv="Content-Type" content="text/html;
> charset=iso-8859-1">
> > <link rel="stylesheet" href="default.css" type="text/css">
> > <!-- #BeginEditable "customhead" -->
> > <!-- #EndEditable -->
> > </head>
> >
> > Thank you very much in advance,
> >
> > Chan
> >
> >
> >
> >
> >
> >
> > _______________________________________________________
> > Send a cool gift with your E-Card
> > http://www.bluemountain.com/giftcenter/
> >
> >
> >
jwickard@l...
> $subst('Email.Unsub')
>
>
$subst('Email.Unsub')


  Return to Index