ID:               19380
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Closed
 Bug Type:         Session related
 Operating System: linux redhat 7.2 (2.4.7-10)
 PHP Version:      4.2.3
 New Comment:

Using unset() works fine here with PHP 4.3.0-dev.



Previous Comments:
------------------------------------------------------------------------

[2002-09-27 00:32:32] [EMAIL PROTECTED]

Well, I 'fixed' the problem using

$_SESSION=array();

to clear all session variables. 
and 

$_SESSION['variable']=NULL;

to clear individual.

The problem is, I think, when destroying session variables. In some
systems, fail and causes problems, in other, the same code works fine.
All this is about destroy variables in session array.

To avoid problems, I suspend use of unset.

------------------------------------------------------------------------

[2002-09-26 20:11:13] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.



------------------------------------------------------------------------

[2002-09-12 15:38:57] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip

Zeev and I talked about this awhile back, and I believe he implemented
your requested feature.  Try a new snapshot, and see if that fixes
things for you.  From what I recall, this functionality didn't exist
previously.

------------------------------------------------------------------------

[2002-09-12 14:40:36] [EMAIL PROTECTED]

It seems like unset function it's not working fine, when is used on
$_SESSION variables. My script uses an array containing a list of
items, and with a button, i clear that list (I only 'destroy' the
variable, using unset. When the scripts check again for the existence
of $_SESSION and isn't set, it's created, of course, empty)

/*Clear function (in file clear.php)*/

 if(isset($_POST['reset']))
 {
        unset($_SESSION['galery']);
 
 }
 header("location:showlist.php");


/*Show items in list (in file showlist.php)*/
session_start();
if(!isset($_SESSION['galery']))
   $_SESSION['galery']=array();
echo "List has ". count($_SESSION['gallery']) ." items";

This is only a sample. Supose that I have many lists, every of them
accessible by a link. When I click a link, it should show the items of
that collection, but it's not working, the session variable is not
destroyed, and every list, show the same content.

I'm not using global variables since 4.2.1. Some scripts working fine
become unstable when upgraded from 4.2.2 to  4.2.3

 './configure' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin'
'--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share'
'--includedir=/usr/include' '--libdir=/usr/lib'
'--libexecdir=/usr/libexec' '--localstatedir=/var'
'--sharedstatedir=/usr/com' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--with-config-file-path=/etc'
'--disable-debug' '--enable-pic' '--disable-path'
'--enable-inline-optimization' '--with-apxs=/usr/sbin/apxs'
'--with-bz2' '--with-db3' '--with-exec-dir=/usr/bin' '--with-gd'
'--with-gdbm' '--with-gettext' '--with-jpeg-dir=/usr' '--with-mm'
'--with-openssl' '--with-png' '--with-regex=system' '--with-ttf'
'--with-zlib' '--with-layout=GNU' '--enable-debugger' '--enable-ftp'
'--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets'
'--enable-sysvsem' '--enable-sysvshm' '--enable-track-vars'
'--enable-yp' '--enable-wddx' '--with-mysql' '--with-xml'
'--with-png-dir=/usr/local/lib' '--with-pam_auth'
'--with-imap=/usr/src/imap/lib' '--with-ldap' '--with-ftp'
'--with-kerberos'

Cesar




------------------------------------------------------------------------


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

Reply via email to