Re: about wml and session

From: Date: Tue, 10 Jul 2001 09:41:10 +0000
Subject: Re: about wml and session
References: 1 2  Groups: php.windows 
Request: Send a blank email to php-windows+get-8221@lists.php.net to get a copy of this message
Hi Ruslan, I have tried to test it, but it does not work. When I put session_* before the header, it will add html header in front of my php automatically. So, my wml browser cannot access it. I have tried to replace default_mimetype = "text/html" to default_mimetype = "text/wap.vnd.wml" and I cut the header function. Finally, I get the same error message.Can you help me to solve it? Thanks! Gary Ruslan Ohitin wrote: > Hello gary, > > Try to put session_* functions before any output (echo, etc): > > session_start(); > session_register("temp"); > > header("Content-type: text/vnd.wap.wml"); > echo ("<?xml version=\"1.0\" ?>\n"); > echo ("<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" > \"ôHT‡Ül > ‘êX 'äúhttp://www.wapforum.org/DTD/wml_1.1.xml\">"); > > g> Hi all, > g> I am trying to use session in my wml. So, I add the following > g> statement in my php. > g> header("Content-type: text/vnd.wap.wml"); > g> echo ("<?xml version=\"1.0\" ?>\n"); > g> echo ("<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" > g> > g> \"http://www.wapforum.org/DTD/wml_1.1.xml\">"); > g> session_start(); > g> session_register("temp"); > g> But it's not sucessful and I get the following error message. Should I > g> set some parameter to use session in wml format? Can anyone help me? > g> Thanks! > > g> <b>Warning</b>: Cannot send session cookie - headers already sent by > g> (output started at c:\inetpub\wwwroot\dinol\index.php:3) in > g> <b>c:\inetpub\wwwroot\dinol\index.php</b> on line > g> <b>6</b><br> > g> <br> > g> <b>Warning</b>: Cannot send session cache limiter - headers already > g> sent (output started at c:\inetpub\wwwroot\dinol\index.php:3) in > g> <b>c:\inetpub\wwwroot\dinol\index.php</b> on line > g> <b>6</b><br> > session_start() wants to send a cookie with session id, but it can't. > > g> Gary > > -- > Best regards, > Ruslan Ohitin > mailto:rus@bagan.ru

« previous php.windows (#8221) next »