calling session_register() on a var that is allready registered is asking
for trouble. there seems to be some bug in php concerning this.

<?php

 session_start();

 if (!isset($HTTP_SESSION_VARS['counter']))
 {
  $counter = 0;
  session_register('counter');
 }
 $counter++;

 echo "
 Counter: $counter<br>
 ";

?>

will work better for you I hope. please get back to me regarding how this
worked out.

--

  Chris Lee
  [EMAIL PROTECTED]



"Robert Schaller" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi all,
>
> I'm having the following problem. I have PHP-4.0.5 staticaly compiled
> with apache 1.3.19, running on a red hat linux with a 2.2.12 Kernel.
>
> The following script does not work the second time called, the browser
> just "hangs" and returns a "this document is empty" after a while. I am
> getting no error message in the log files and the session files are
> being created in the tmp directory, they are empty though.
>
> <?
> session_name( "test" );
> session_start();
> $session_ok = session_register( "counter" );
> if( $session_ok ){
> echo( "Counter: ".++$counter );
> }else echo( "failed" );
> ?>
>
> Any ideas?
>
> How can I get some kind of hint as to what is going wrong?
>
> thanks,
> Robert
>
> --
> 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]

Reply via email to