Look for empty lines, html tags,"echoes" or "prints" before the cookie
session is tried, even in include files and clear them.

Jayme.

http://www.conex.com.br/jjeffman



-----Mensagem Original-----
De: JB <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Enviada em: quarta-feira, 10 de janeiro de 2001 12:49
Assunto: [PHP-DB] Cannot send session cache limiter - headers already sent
Cannot send session cookie - headers already sent by


actually.. still give me the same error after i fixed that. new code as
follows along with the error:

if (!session_is_registered('cart')) {
$cart = array();
session_register('cart');
}
else {
session_start();
}

?>


Warning: Cannot send session cookie - headers already sent by (output
started at C:\Program Files\Apache Group\Apache\htdocs/store/index.php:2) in
../../wpdbcon.php on line 14

Warning: Cannot send session cache limiter - headers already sent (output
started at C:\Program Files\Apache Group\Apache\htdocs/store/index.php:2) in
../../wpdbcon.php on line 14


any other ideas?   =)

thanks



> You are missing a parentheses:
>
> if (!session_is_registered('cart') {
>
> correct:
> if (!session_is_registered('cart')) {
>                                   ^
> -----Original Message-----
> From: JB [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 10, 2001 6:05 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Session Errors, do you recognize?
>
>
> Hey, I keep getting the same error messages when trying to fire up
sessions
> in this code i wrote. i've written some test scripts to test sessions on
my
> machine, and they are working, so the problem must lie within my code.
Here'
> what I'm getting, anyone know how to resolve this?
>
> Warning: Cannot send session cookie - headers already sent by (output
> started at C:\Program Files\Apache
> Group\Apache\htdocs/store/index.php:2) in ../../wpdbcon.php on line 14
>
> Warning: Cannot send session cache limiter - headers already sent (output
> started at C:\Program Files\Apache
> Group\Apache\htdocs/store/index.php:2) in ../../wpdbcon.php on line 14
>
>
> wpdbcon.php --------------
>
> <?
> $db = "mydb";
> $user = "mybot";
> $pw = "mypw";
> $mysql_access = mysql_connect("localhost", $user, $pw);
> mysql_select_db($db, $mysql_access);
>
> session_start();
>
> if (!session_is_registered('cart') {
> $cart = array();
> session_register('cart');
> }
>
> ?>
>
> i also tried doing
>
> if (!session_is_registered('cart') {
> $cart = array();
> session_register('cart');
> }
> else {
> session_start();
> }
>
> i thought it was sending conflicting data when it was trying to
initialize,
> didn't work either.
>
> thanks in advance.
>
>




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to