php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16355 Session_destroy() doesn't work
Submitted: 2002-03-29 17:57 UTC Modified: 2002-04-02 22:05 UTC
From: betsyasm at yahoo dot com Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.1.2 OS: Linux Redhat 7.1
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: betsyasm at yahoo dot com
New email:
PHP Version: OS:

 

 [2002-03-29 17:57 UTC] betsyasm at yahoo dot com
I use apache 1.3.24/ php 4.1.2 /firebird with Red Hat 7.1
It used to work properly with php 4.0.5. When I installed php 4.1.2 I get the following error message:

Wrong parameter count for session_destroy() and the session is not destroied

Configure command: ./configure --with-interbase=/opt/interbase --with-apache=../apache_1.4.2 --enable-track-vars
You can check it at www.g2k.es/factory/index.php

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-02 09:34 UTC] yohgaki@php.net
That's because you're passing parameter(s) to session_destroy. Old PHP didn't check pramater is passed or not even if it should check.
You have to fix your code.
 [2002-04-02 21:18 UTC] betsyasm at yahoo dot com
Fix my code means to remove the parameter. My current code is:
session_register("userid");
  if ($userid!="") {
        my page code
}else
session_destroy("userid");

Should I leave session_destroy void?
Thanks for your help
 [2002-04-02 22:05 UTC] yohgaki@php.net
Yes. 
You cannot pass any parameter to session_destroy(). It was just ignoring where it should raise error. Now it raises error as it should.

I've changed some internal functions so that functions that cannot take any parameter raise errors. It's one of them. There are some of functions that aren't fixed. Be careful ;)


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Dec 04 22:00:01 2025 UTC