[PHP-DEV] Bug #13753 Updated: failed session_register in object method

2001-10-24 Thread hholzgra

ID: 13753
Updated by: hholzgra
Reported By: [EMAIL PROTECTED]
Status: Bogus
Bug Type: Session related
Operating System: linux mandrake 8.0
PHP Version: 4.0.6
New Comment:

session_register and session_is_registered 
operate on *names* not *variables*

only at request end the list of registered
names is processed and contents of corresponding
*global* variables are stored

what you are looking for is a combination like

if(session_is_registered($name) and isset($GLOBLAS[$name])) ...

and, no, session_register and session_is_registered
can *not* do this job for you as variables in PHP
can be created and removed at any time

checking for existance in session_register makes
no sense as there is no guarante that the variable
won't be unset() before request end

for your list question: see the support section
(on both www.php.net and bugs.php.net) and look
for the php-general list or for the local list
of your favourite language at the end of the 
page


Previous Comments:


[2001-10-19 10:38:22] [EMAIL PROTECTED]

Ok, sorry, but why session_is_registered returns true?

And  btw,  which  list/news  you can recomend me, that I can get help such as this as 
soon, as possible?





[2001-10-19 10:14:11] [EMAIL PROTECTED]

$edf1 is local to the gg() method

you can only register variables from the global
scope, so $edf1 is empty in the session as no
such global variable existed as the session data
was written



[2001-10-19 09:55:30] [EMAIL PROTECTED]

misspeled; should be:

After that both session_is_registered('edf1') and session_is_registered('edf2') 
returns true



[2001-10-19 09:50:59] [EMAIL PROTECTED]

I have made much tests and it seems, that calling session register in object's method 
failed. Assume:


?
(...)[session_start, headers, etc...]
  $edf2 = 1234;
  session_register('edf2');
  class gg {
function gg() {
$edf1 = 65432;
session_register('edf1');
}
  }
  gg::gg();
?

After that both session_is_registered('edf1') and session_is_registered('edf1') 
returns true, but ($edf1
 == $edf2) return false; ($edf1 == '') - is true.

Any suggestions?





Edit this bug report at http://bugs.php.net/?id=13753edit=1


-- 
PHP Development 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-DEV] Bug #13753 Updated: failed session_register in object method

2001-10-19 Thread m . izydorski

ID: 13753
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Session related
Operating System: linux mandrake 8.0
PHP Version: 4.0.6
New Comment:

misspeled; should be:

After that both session_is_registered('edf1') and session_is_registered('edf2') 
returns true

Previous Comments:


[2001-10-19 09:50:59] [EMAIL PROTECTED]

I have made much tests and it seems, that calling session register in object's method 
failed. Assume:


?
(...)[session_start, headers, etc...]
  $edf2 = 1234;
  session_register('edf2');
  class gg {
function gg() {
$edf1 = 65432;
session_register('edf1');
}
  }
  gg::gg();
?

After that both session_is_registered('edf1') and session_is_registered('edf1') 
returns true, but ($edf1
 == $edf2) return false; ($edf1 == '') - is true.

Any suggestions?





Edit this bug report at http://bugs.php.net/?id=13753edit=1


-- 
PHP Development 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-DEV] Bug #13753 Updated: failed session_register in object method

2001-10-19 Thread hholzgra

ID: 13753
Updated by: hholzgra
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Bogus
Bug Type: Session related
Operating System: linux mandrake 8.0
PHP Version: 4.0.6
New Comment:

$edf1 is local to the gg() method

you can only register variables from the global
scope, so $edf1 is empty in the session as no
such global variable existed as the session data
was written

Previous Comments:


[2001-10-19 09:55:30] [EMAIL PROTECTED]

misspeled; should be:

After that both session_is_registered('edf1') and session_is_registered('edf2') 
returns true



[2001-10-19 09:50:59] [EMAIL PROTECTED]

I have made much tests and it seems, that calling session register in object's method 
failed. Assume:


?
(...)[session_start, headers, etc...]
  $edf2 = 1234;
  session_register('edf2');
  class gg {
function gg() {
$edf1 = 65432;
session_register('edf1');
}
  }
  gg::gg();
?

After that both session_is_registered('edf1') and session_is_registered('edf1') 
returns true, but ($edf1
 == $edf2) return false; ($edf1 == '') - is true.

Any suggestions?





Edit this bug report at http://bugs.php.net/?id=13753edit=1


-- 
PHP Development 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-DEV] Bug #13753 Updated: failed session_register in object method

2001-10-19 Thread m . izydorski

ID: 13753
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Bogus
Bug Type: Session related
Operating System: linux mandrake 8.0
PHP Version: 4.0.6
New Comment:

Ok, sorry, but why session_is_registered returns true?

And  btw,  which  list/news  you can recomend me, that I can get help such as this as 
soon, as possible?



Previous Comments:


[2001-10-19 10:14:11] [EMAIL PROTECTED]

$edf1 is local to the gg() method

you can only register variables from the global
scope, so $edf1 is empty in the session as no
such global variable existed as the session data
was written



[2001-10-19 09:55:30] [EMAIL PROTECTED]

misspeled; should be:

After that both session_is_registered('edf1') and session_is_registered('edf2') 
returns true



[2001-10-19 09:50:59] [EMAIL PROTECTED]

I have made much tests and it seems, that calling session register in object's method 
failed. Assume:


?
(...)[session_start, headers, etc...]
  $edf2 = 1234;
  session_register('edf2');
  class gg {
function gg() {
$edf1 = 65432;
session_register('edf1');
}
  }
  gg::gg();
?

After that both session_is_registered('edf1') and session_is_registered('edf1') 
returns true, but ($edf1
 == $edf2) return false; ($edf1 == '') - is true.

Any suggestions?





Edit this bug report at http://bugs.php.net/?id=13753edit=1


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