PHP 4.0 Bug #3391: PHP 4.0 crash when using PHPLib

From: Date: Thu, 03 Feb 2000 04:33:32 +0000
Subject: PHP 4.0 Bug #3391: PHP 4.0 crash when using PHPLib
Groups: php.dev 
Request: Send a blank email to php-dev+get-15160@lists.php.net to get a copy of this message
From: gmerrall@email.com Operating system: Linux 2.2.12-20 (Cyrix 6x86) PHP version: 4.0 Latest CVS (02/02/2000) PHP Bug Type: Reproduceable crash Bug description: PHP 4.0 crash when using PHPLib Previously working system from CVS with latest CVS crashes at same spot using standard PHPLib setup using tthe auth object. I do have odd probs with this Cyrix chip so may be caused by that but thought I better submit anyway. Login page appears, error at bottom is Warning: Variable passed to reset() is not an array or object in session.inc line 310 Warning: Variable passed to reset() is not an array or object in session.inc line 311 Refersh screen and crashes. gdb backtrace shows: Starting program: /usr/local/apache/bin/./httpd -X (no debugging symbols found)...(no debugging symbols found)... Program received signal SIGSEGV, Segmentation fault. 0x401974e1 in __kill () from /lib/libc.so.6 (gdb) bt #0 0x401974e1 in __kill () from /lib/libc.so.6 #1 0x807e1ee in _erealloc () #2 0x80af5e5 in php_if_stat () #3 0x80afe5b in php_if_stat () #4 0x80b0477 in php_if_user_sprintf () #5 0x80cf014 in execute () #6 0x80cf1ce in execute () #7 0x80cf1ce in execute () #8 0x80cf1ce in execute () #9 0x80cf1ce in execute () #10 0x807935c in php_execute_script () #11 0x8090f81 in apache_php_module_main () #12 0x8077ce3 in send_php () #13 0x8077d28 in send_parsed_php () #14 0x80d8e83 in ap_invoke_handler () #15 0x80ec179 in ap_some_auth_required () #16 0x80ec598 in ap_internal_redirect () #17 0x80713ed in ap_get_server_built () #18 0x80d8e83 in ap_invoke_handler () #19 0x80ec179 in ap_some_auth_required () #20 0x80ec1dc in ap_process_request () #21 0x80e3b9e in ap_child_terminate () #22 0x80e3d2c in ap_child_terminate () #23 0x80e3e89 in ap_child_terminate () #24 0x80e44b6 in ap_child_terminate () #25 0x80e4c33 in main () #26 0x401911eb in __libc_start_main (main=0x80e48fc <main>, argc=2, argv=0xbffffd14, init=0x805f87c <_init>, fini=0x811887c <_fini>, rtld_fini=0x4000a610 <_dl_fini>, stack_end=0xbffffd0c) at ../sysdeps/generic/libc-start.c:90 Lines from session.inc of PHPLib are: function freeze() { $str=""; $this->serialize("this->in",&$str); $this->serialize("this->pt",&$str); reset($this->pt); // LINE 310 while ( list($thing) = each($this->pt) ) { // LINE 311 $thing=trim($thing); if ( $thing ) { $this->serialize("GLOBALS['".$thing."']",&$str); } }

« previous php.dev (#15160) next »