|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40514 Segmentation fault on session_register of undeclared variable
Submitted: 2007-02-17 08:18 UTC Modified: 2007-02-17 11:16 UTC
Avg. Score:4.5 ± 0.5
Reproduced:0 of 0 (0.0%)
From: steve at webdrive dot co dot nz Assigned:
Status: Closed Package: Session related
PHP Version: 4.4.5 OS: Debian Linux 3.1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: steve at webdrive dot co dot nz
New email:
PHP Version: OS:


 [2007-02-17 08:18 UTC] steve at webdrive dot co dot nz
The upgrade from PHP 4.4.4 to 4.4.5 caused a Segmentation Fault on a client's osCommerce site.  I've tracked the problem down to a session_register function call on a undeclared variable.

Reproduce code:
// Uncomment the following line to prevent the Segmentation Fault
//$myvar = 1;

echo "Hello World";

Expected result:
Hello World and no "Segmentation Fault" in Apache's error log:

[Sat Feb 17 21:14:16 2007] [notice] child pid 20549 exit signal Segmentation fault (11)

Actual result:
0x080dbbc2 in php_add_session_var (name=0x850b75c "myvar", namelen=5)
    at /usr/src/apache-php/build/php-4.4.5/ext/session/session.c:287
287                     if ((Z_TYPE_PP(sym_global) == IS_ARRAY && Z_ARRVAL_PP(sym_global) == &EG(symbol_table)) || *sym_global == PS(http_session_vars)) {


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-02-17 11:16 UTC]
Fixed in CVS.
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed Sep 18 18:01:44 2019 UTC