php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23314 session_start() plus "Warning:" causes apache 1.3.27 segfault
Submitted: 2003-04-23 08:02 UTC Modified: 2003-04-23 12:49 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: nicola dot fankhauser at variant dot ch Assigned:
Status: Closed Package: Session related
PHP Version: 4.3.2RC1 OS: linux 2.4.20
Private report: No CVE-ID: None
 [2003-04-23 08:02 UTC] nicola dot fankhauser at variant dot ch
hello

I am using php 4.3.2rc1 (4.3.1 was tested too) and apache 1.3.27 - it crashes on me reproducibly when calling session_start() and then provoking a mere "Warning:" in a script:

doesn't work:
---
session_start();
$file = file('nix');
---

but this works:
---
$file = file('nix');
---

apache error log:
---
/var/www/nrmag/includes/util.inc.php(48) : Warning - file(pass.xml) [<a href='http://www.php.net/function.file'>function.file</a>]: failed to open stream: No such file or directory
[Wed Apr 23 12:20:55 2003] [notice] child pid 1911 exit signal Segmentation fault (11)
---

a gdb backtrace shows this:
---
#0 0x4013901b in memcpy () from /lib/libc.so.6
#1 0x402c2687 in smart_str_appendl_ex (dest=0xbffff06c, src=0x0, len=134960688, what=0)
at /home/nikee/php-4.3.2RC1/ext/standard/php_smart_str.h:76
#2 0x402c2962 in php_var_serialize_class_name (buf=0xbffff06c, struc=0x810c4b8)
at /home/nikee/php-4.3.2RC1/ext/standard/var.c:420
#3 0x402c2060 in php_var_serialize_intern (buf=0xbffff06c, struc=0x810c4b8, var_hash=0xbffff040)
at /home/nikee/php-4.3.2RC1/ext/standard/var.c:560
#4 0x402c21c7 in php_var_serialize_intern (buf=0xbffff06c, struc=0x810d428, var_hash=0xbffff040)
at /home/nikee/php-4.3.2RC1/ext/standard/var.c:598
#5 0x402c21c7 in php_var_serialize_intern (buf=0xbffff06c, struc=0x817b868, var_hash=0xbffff040)
at /home/nikee/php-4.3.2RC1/ext/standard/var.c:598
#6 0x402c21c7 in php_var_serialize_intern (buf=0xbffff06c, struc=0x817ba90, var_hash=0xbffff040)
at /home/nikee/php-4.3.2RC1/ext/standard/var.c:598
#7 0x402c224f in php_var_serialize (buf=0xbffff06c, struc=0x817ba90, var_hash=0xbffff040)
at /home/nikee/php-4.3.2RC1/ext/standard/var.c:612
#8 0x4026012f in ps_srlzr_encode_php (newstr=0xbffff0a4, newlen=0xbffff0d8)
at /home/nikee/php-4.3.2RC1/ext/session/session.c:440
#9 0x402606db in php_session_encode (newlen=0xbffff0d8) at /home/nikee/php-4.3.2RC1/ext/session/session.c:522
#10 0x40260e96 in php_session_save_current_state () at /home/nikee/php-4.3.2RC1/ext/session/session.c:683
#11 0x40263f90 in php_session_flush () at /home/nikee/php-4.3.2RC1/ext/session/session.c:1588
#12 0x40263fdc in zm_deactivate_session (type=1, module_number=4) at /home/nikee/php-4.3.2RC1/ext/session/session.c:1602
#13 0x4033f483 in module_registry_cleanup (module=0x80ab108) at /home/nikee/php-4.3.2RC1/Zend/zend_API.c:1167
#14 0x40342577 in zend_hash_apply (ht=0x4039d680, apply_func=0x4033f438 <module_registry_cleanup>)
at /home/nikee/php-4.3.2RC1/Zend/zend_hash.c:688
#15 0x4033b669 in zend_deactivate_modules () at /home/nikee/php-4.3.2RC1/Zend/zend.c:634
#16 0x402ffa0c in php_request_shutdown (dummy=0x0) at /home/nikee/php-4.3.2RC1/main/main.c:983
#17 0x40354708 in apache_php_module_main (r=0x80eabb4, display_source_mode=0)
at /home/nikee/php-4.3.2RC1/sapi/apache/sapi_apache.c:61
#18 0x40355700 in send_php (r=0x80eabb4, display_source_mode=0, filename=0x80ec6a4 "/var/www/dom.php")
at /home/nikee/php-4.3.2RC1/sapi/apache/mod_php4.c:617
#19 0x4035577f in send_parsed_php (r=0x80eabb4) at /home/nikee/php-4.3.2RC1/sapi/apache/mod_php4.c:632
#20 0x08053b34 in ap_invoke_handler ()
#21 0x0806368c in ap_some_auth_required ()
#22 0x080636e8 in ap_process_request ()
#23 0x0805ce2b in ap_child_terminate ()
#24 0x0805cfbc in ap_child_terminate ()
#25 0x0805d0d9 in ap_child_terminate ()
#26 0x0805d5b5 in ap_child_terminate ()
#27 0x0805dcbd in main ()
#28 0x400dfa51 in __libc_start_main () from /lib/libc.so.6
---

my confiure line:
---
  './configure' '--with-dom' '--with-zlib' '--with-mysql' '--with-apxs' '--enable-debug'
---

This bug _may_ be a duplicate of Bug #22425 (session_start() causes apache segfault/crash) - but here is a backtrace... :)

If you need more info about my system, contact me please.

thanks & regards
nicola

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-04-23 12:49 UTC] nicola dot fankhauser at variant dot ch
I re-installed the machine and it works now well on 4.3.2rc (cvs snapshot from this afternoon). Must have been some OS library strangeness or other...
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 10:00:01 2026 UTC