php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25103 Session handling that seg faults apache
Submitted: 2003-08-15 18:37 UTC Modified: 2003-08-15 20:21 UTC
From: tony at tonybibbs dot com Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.3.2 OS: Linux (RedHat)
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tony at tonybibbs dot com
New email:
PHP Version: OS:

 

 [2003-08-15 18:37 UTC] tony at tonybibbs dot com
Description:
------------
I have a custom php session handler that interacts with a database via PEAR::DB.  I have set session.save_handler to user.  I have test this using both MySQL and MS SQL Server 2000 on the backend.  Running this code can kill one of the Apache process consistently.  The short version of what I am doing is I authenticate my app, stick a user object in the session using $_SESSION['user'] = &$userObj; Then later I try to get that object out of the session by using $userObj = &$_SESSION['user'].  

To get code that reproduces this go here:

http://www.tonybibbs.com/filemgmt/visit.php?lid=5

Reproduce code:
---------------
http://www.tonybibbs.com/filemgmt/visit.php?lid=5

Expected result:
----------------
I would expect that on page 2 I would get an instance of the object out of the session Ok.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-08-15 20:21 UTC] sniper@php.net
Session extension does not work with references. Don't use those and everything will be fine.

If it crashes, provide a SHORT example script (one php file),
max. 20 lines of code. (yes, you can make it shorter)
And/or a gdb backtrace.

 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Fri Apr 03 11:00:02 2026 UTC