RE: [PHP] confusing problem w/sessions

2001-08-20 Thread Quentin Gillet

On which platform do you run?

set display_startup_errors = On
so that you eventually will see any php initialization problem (like the
folder where session data is stored being not accessible because of
permission restrictions...I say that because I ran into this problem)

to recap, code should be on first page:



and on second page:



should return:

Value of a is: something




-Message d'origine-
De : Gabriele Biondo [mailto:[EMAIL PROTECTED]]
Envoyé : lundi 20 août 2001 15:11
À : [EMAIL PROTECTED]; PHP
Objet : Re: [PHP] confusing problem w/sessions




> start your session before sending any html output to browser

Okay. This solves the problem w/the warnings

> check that register_globals is on

It is actually on

> if not use $HTTP_SESSION_VARS("a") instead to reference your session var
> assign a value after having initialiazed your var not before
Done. Nothing changes at all...
my variables are saved (session_register("a") returns true) but from the
second page,
wich code is:
$a";
?>
i do not see anything at all...

more suggestions?

thanks in advance

Gabriele


--
PHP General 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]



-- 
PHP General 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]




Re: [PHP] confusing problem w/sessions

2001-08-20 Thread Gabriele Biondo



> start your session before sending any html output to browser

Okay. This solves the problem w/the warnings

> check that register_globals is on

It is actually on

> if not use $HTTP_SESSION_VARS("a") instead to reference your session var
> assign a value after having initialiazed your var not before
Done. Nothing changes at all...
my variables are saved (session_register("a") returns true) but from the
second page,
wich code is:
$a";
?>
i do not see anything at all...

more suggestions?

thanks in advance

Gabriele


-- 
PHP General 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]




Re: [PHP] confusing problem w/sessions

2001-08-20 Thread php mailing list

start your session before sending any html output to browser
check that register_globals is on
if not use $HTTP_SESSION_VARS("a") instead to reference your session var
assign a value after having initialiazed your var not before

-- Original Message --
From: "Gabriele Biondo" <[EMAIL PROTECTED]>
Date: Mon, 20 Aug 2001 14:34:35 +0200

>Dear sirs;
>i have a simple snippet of code :
>session_start();
>$a = 10;
>session_register("a");
>?>
>
>i am trying to understand how do session work.
>
>Accessing at this document directly from the server (it is a SuSE 7.2 PE -
>running PHP 4.0.4
>and apache 1.3.9) i find out the following problem:
>
>Warning: cannot send session cookie - headers already sent (output started
>at )
>
>and
>
>Warning: cannot send session cache limiter - headers already sent (output
>started at )
>
>The matter is that if i access this variables from another page, they seem
>to be empty...
>
>How can i solve this little confusing problem?
>
>Thanks in advance
>
>Gabriele
>
>
>-- 
>PHP General 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]
>
>

-- 
PHP General 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]




[PHP] confusing problem w/sessions

2001-08-20 Thread Gabriele Biondo

Dear sirs;
i have a simple snippet of code :


i am trying to understand how do session work.

Accessing at this document directly from the server (it is a SuSE 7.2 PE -
running PHP 4.0.4
and apache 1.3.9) i find out the following problem:

Warning: cannot send session cookie - headers already sent (output started
at )

and

Warning: cannot send session cache limiter - headers already sent (output
started at )

The matter is that if i access this variables from another page, they seem
to be empty...

How can i solve this little confusing problem?

Thanks in advance

Gabriele


-- 
PHP General 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]