|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-09-12 15:38 UTC] kalowsky@php.net
[2002-09-26 20:11 UTC] sniper@php.net
[2002-09-27 00:32 UTC] ctenedor at yahoo dot com
[2002-09-27 06:29 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 04 18:00:01 2025 UTC |
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