|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17281 session_encode is causing segmentation fault
Submitted: 2002-05-16 19:56 UTC Modified: 2002-09-29 11:01 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: rubens_gomes at hotmail dot com Assigned:
Status: Closed Package: Session related
PHP Version: 4.2.1 OS: Solaris 2.7
Private report: No CVE-ID: None
 [2002-05-16 19:56 UTC] rubens_gomes at hotmail dot com
I am running apache 1.3.24/PHP 4.2.1 on Solaris 2.7 (with
recent OS patches applied.)

When I call session_encode() as follows I get the 
segmentation fault error below...

$session_array = explode(";", session_encode());

[Thu May 16 20:50:45 2002] [notice] child pid 26235 exit signal Segmentation Fault (11)



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-05-17 04:37 UTC]
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

 [2002-05-17 14:21 UTC] rubens_gomes at hotmail dot com
bash-2.03# gdb /usr/local/apache/bin/httpd
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.7"...
(gdb) run -X
Starting program: /usr/local/apache/bin/httpd -X
[New LWP    2        ]
[New LWP    3        ]
[New LWP    4        ]

Program received signal SIGSEGV, Segmentation fault.
0xfe5ec8c4 in _zval_dtor (zvalue=0x1586b0, __zend_filename=0xfe75c060 "zend_execute_API.c", 
    __zend_lineno=274) at zend_variables.c:43
43                              CHECK_ZVAL_STRING_REL(zvalue);
(gdb) bt
#0  0xfe5ec8c4 in _zval_dtor (zvalue=0x1586b0, 
    __zend_filename=0xfe75c060 "zend_execute_API.c", __zend_lineno=274)
    at zend_variables.c:43
#1  0xfe5dde08 in _zval_ptr_dtor (zval_ptr=0xfe7aac78, 
    __zend_filename=0xfe75ba90 "zend_execute_locks.h", __zend_lineno=26)
    at zend_execute_API.c:274
#2  0xfe5db0d8 in zend_clean_garbage () at zend_execute_locks.h:26
#3  0xfe5d2b8c in execute (op_array=0x1436e8) at ./zend_execute.c:1056
#4  0xfe5d933c in execute (op_array=0x13de78) at ./zend_execute.c:2141
#5  0xfe5ef554 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at zend.c:810
#6  0xfe60b958 in php_execute_script (primary_file=0xffbeecb0) at main.c:1381
#7  0xfe603b94 in apache_php_module_main (r=0x131558, display_source_mode=0)
    at sapi_apache.c:90
#8  0xfe605170 in send_php (r=0x131558, display_source_mode=0, 
    filename=0x132078 "/home/httpd/html/dbiflex/sm/login.php") at mod_php4.c:575
#9  0xfe6051e8 in send_parsed_php (r=0x131558) at mod_php4.c:590
#10 0x41620 in ap_invoke_handler () from /lib/
#11 0x5fd04 in process_request_internal () from /lib/
#12 0x5fd88 in ap_process_request () from /lib/
#13 0x52f74 in child_main () from /lib/
#14 0x53208 in make_child () from /lib/
#15 0x53424 in startup_children () from /lib/
#16 0x53e58 in standalone_main () from /lib/
#17 0x54aa0 in main () from /lib/
(gdb) frame 3
#3  0xfe5d2b8c in execute (op_array=0x1436e8) at ./zend_execute.c:1056
1056                    zend_clean_garbage(TSRMLS_C);
(gdb) print (char *)(executor_globals.function_state_ptr->function)->common.function_name
$1 = 0x0
(gdb) print (char *)executor_globals.active_op_array->function_name
$2 = 0x0
(gdb) print (char *)executor_globals.active_op_array->filename
$3 = 0x14a970 "/home/nmsuser/dbiflex/docroot/common/"
(gdb) quit
The program is running.  Exit anyway? (y or n) y

Here is the line that is causing the seg fault:

error_log( "{common/ session_encode: " . session_encode() );
 [2002-06-18 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2002-06-18 01:10 UTC]
Feedback was there, reopening
 [2002-09-29 11:01 UTC]
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at
In case this was a documentation problem, the fix will show up soon at

In case this was a website problem, the change will show
up on the site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.

 [2003-11-24 16:17 UTC] miguelangel dot gonzalez at itesm dot mx
Hi all.
I have installed PHP 4.3.4 with apache 1.3.29 and i'm getting this fault (11) error, with the product issuetracker, in an AIX 4.3.3 with fixes 10.
I'have tried with snapshots in but the problem persist. Any ideas?
Thanks in advance
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Sep 29 23:01:25 2023 UTC