|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-05-20 04:43 UTC] gavin dot brown at uk dot com, colin at wibble dot org dot uk
Any script that contains a call to the parse_ini_file() function results in a segmentation fault. This is the case for mod_php4 and the CLI. The scripts used to test this are at http://jodrell.net/files/parse_ini_file_bug/ Here's what happens when the script is run from a shell: [root@spoon rael]# /usr/local/bin/php parse_ini_file_demo.php Date: Tue, 20 May 2003 10:37:09 +0100 This string is printed before parsing. Segmentation fault (core dumped) [root@spoon rael]# gdb /usr/local/bin/php core GNU gdb Red Hat Linux (5.2-2) Copyright 2002 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 "i386-redhat-linux"... Core was generated by `/usr/local/bin/php parse_ini_file_demo.php'. Program terminated with signal 11, Segmentation fault. Reading symbols from /lib/libcrypt.so.1...done. Loaded symbols for /lib/libcrypt.so.1 Reading symbols from /lib/libresolv.so.2...done. Loaded symbols for /lib/libresolv.so.2 Reading symbols from /lib/i686/libm.so.6...done. Loaded symbols for /lib/i686/libm.so.6 Reading symbols from /lib/libdl.so.2...done. Loaded symbols for /lib/libdl.so.2 Reading symbols from /lib/libnsl.so.1...done. Loaded symbols for /lib/libnsl.so.1 Reading symbols from /lib/i686/libc.so.6...done. Loaded symbols for /lib/i686/libc.so.6 Reading symbols from /lib/ld-linux.so.2...done. Loaded symbols for /lib/ld-linux.so.2 Reading symbols from /lib/libnss_files.so.2...done. Loaded symbols for /lib/libnss_files.so.2 #0 0x4011a3cd in __libc_free (mem=0xbfffca4c) at malloc.c:3143 3143 malloc.c: No such file or directory. in malloc.c (gdb) bt #0 0x4011a3cd in __libc_free (mem=0xbfffca4c) at malloc.c:3143 #1 0x0810e798 in _efree (ptr=0xbfffca58) at /home/stuff/php-4.3.2RC3/Zend/zend_alloc.c:265 #2 0x08108cb2 in zend_file_handle_dtor (fh=0xbfffca20) at Zend/zend_language_scanner.c:2945 #3 0x0810cd78 in zend_parse_ini_file (fh=0xbfffca20, unbuffered_errors=0, ini_parser_cb=0x8094b94 <php_simple_ini_parser_cb>, arg=0x81a9e3c) at Zend/zend_ini_parser.c:185 #4 0x08094f0e in zif_parse_ini_file (ht=1, return_value=0x81a9e3c, this_ptr=0x0, return_value_used=1) at /home/stuff/php-4.3.2RC3/ext/standard/basic_functions.c:2894 #5 0x0812fb88 in execute (op_array=0x81a57cc) at /home/stuff/php-4.3.2RC3/Zend/zend_execute.c:1606 #6 0x0811d60c in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/stuff/php-4.3.2RC3/Zend/zend.c:886 #7 0x080f6c9c in php_execute_script (primary_file=0xbffff5b0) at /home/stuff/php-4.3.2RC3/main/main.c:1687 #8 0x08138314 in main (argc=2, argv=0xbffff654) at /home/stuff/php-4.3.2RC3/sapi/cli/php_cli.c:805 #9 0x400b5657 in __libc_start_main (main=0x81378a0 <main>, argc=2, ubp_av=0xbffff654, init=0x8060eec <_init>, fini=0x81388c0 <_fini>, rtld_fini=0x4000dcd4 <_dl_fini>, stack_end=0xbffff64c) at ../sysdeps/generic/libc-start.c:129 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 16 17:00:02 2025 UTC |
The snapshot php4-STABLE-200305200930 did the trick for the CLI, although i've not been able to get apache to load via a install using --with-mysql --apxs2=... [root@spoon rael]# /usr/local/bin/php -v PHP 4.3.2RC4-dev (cli) (built: May 20 2003 11:06:00) Copyright (c) 1997-2003 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies [root@spoon rael]# /usr/local/bin/php parse_ini_file_demo.php Date: Tue, 20 May 2003 11:09:08 +0100 This string is printed before parsing. This string is printed after parsing. $parsed looks like this: Array ( [foo] => bar [name] => value [time] => money [knowledge] => power )