Re: [PHP] problems with session_register()...

2001-04-04 Thread slavko dervisevic

Hello Christian,

you must register first, then set the value!

session_register("script_total_time");
$script_total_time=(float)$total_time;
$step_times_array[$step]=$total_time;
session_register("step_times");
$step_times=serialize($step_times_array);


Tuesday, April 03, 2001, 2:35:10 AM, you wrote:
CD> Why does one variable gets registered and the other don't (the order
CD> doesn't alter anything.. I've tried)...

CD> 
CD> $script_total_time=(float)$total_time;
CD> session_register("script_total_time");
CD> $step_times_array[$step]=$total_time;
CD> $step_times=serialize($step_times_array);
CD> //echo "step_times=\"$step_times\"";
CD> session_register("step_times");
CD> 

CD> after that (and there are no mentions to either of those vars after that), 
CD> these are the contents of the session-cookie:
CD> script_total_time|d:4.8891049623489;!step_times|

CD> step_times simply doesn't get registered...

CD> BTW... the commented echo above outputs:
CD> step_times="a:1:{s:8:"download";d:4.8891049623489;}"

CD> what is wrong with my code?

CD> 
CD> . Christian Dechery (lemming)
CD> . http://www.tanamesa.com.br
CD> . Gaita-L Owner / Web Developer
-- 
Best regards,
 slavkomailto:[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] problems with session_register()...

2001-04-04 Thread Yasuo Ohgaki

Try to use $HTTP_SESSION_VARS, it may work for  you.
There are many number of notes in Annotated PHP Manual. Some of them may help.

By the way, you don't need to serialize Array/Object for PHP4 session.

Regards,
--
Yasuo Ohgaki


"Christian Dechery" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Why does one variable gets registered and the other don't (the order
> doesn't alter anything.. I've tried)...
>
> 
> $script_total_time=(float)$total_time;
> session_register("script_total_time");
> $step_times_array[$step]=$total_time;
> $step_times=serialize($step_times_array);
> //echo "step_times=\"$step_times\"";
> session_register("step_times");
> 
>
> after that (and there are no mentions to either of those vars after that),
> these are the contents of the session-cookie:
> script_total_time|d:4.8891049623489;!step_times|
>
> step_times simply doesn't get registered...
>
> BTW... the commented echo above outputs:
> step_times="a:1:{s:8:"download";d:4.8891049623489;}"
>
> what is wrong with my code?
>
> 
> . Christian Dechery (lemming)
> . http://www.tanamesa.com.br
> . Gaita-L Owner / Web Developer
>


-- 
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] problems with session_register()...

2001-04-02 Thread Christian Dechery

Why does one variable gets registered and the other don't (the order 
doesn't alter anything.. I've tried)...


$script_total_time=(float)$total_time;
session_register("script_total_time");
$step_times_array[$step]=$total_time;
$step_times=serialize($step_times_array);
//echo "step_times=\"$step_times\"";
session_register("step_times");


after that (and there are no mentions to either of those vars after that), 
these are the contents of the session-cookie:
script_total_time|d:4.8891049623489;!step_times|

step_times simply doesn't get registered...

BTW... the commented echo above outputs:
step_times="a:1:{s:8:"download";d:4.8891049623489;}"

what is wrong with my code?


. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer