|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
  [2002-04-29 10:55 UTC] mav at alkar dot net
 Simple test like this makes segmentation fault:
<?
  mkdir('1/fv',0777);
  echo('!!!!!!!!!!!!!!\n\n');
?>
This error occurs in both Apache DSO module and console version.
PHP configures as:
./configure  --with-apxs=/usr/local/apache/bin/apxs --with-config-file-path=/usr/local/apache/conf --with-mysql=
/usr/local/mysql --with-gd=/usr/local --enable-trans-sid --enable-versioning --enable-inline-optimization --enabl
e-ftp --enable-dbase --enable-gd-native-ttf --with-ttf --with-freetype-dir=/usr/local
Here is back trace by gdb from core file:
# gdb php /www/www/clients/alkar/hotline/hotline.alkar.net/php.core 
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 "i386-unknown-freebsd"...
Core was generated by `php'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libpam.so.1...done.
Reading symbols from /usr/local/mysql/lib/mysql/libmysqlclient.so.10...done.
Reading symbols from /usr/lib/libz.so.2...done.
Reading symbols from /usr/lib/libcrypt.so.2...done.
Reading symbols from /usr/local/lib/libgd.so.2...done.
Reading symbols from /usr/local/lib/libfreetype.so.9...done.
Reading symbols from /usr/lib/libm.so.2...done.
Reading symbols from /usr/lib/libc.so.4...done.
Reading symbols from /usr/local/lib/libpng.so.5...done.
Reading symbols from /usr/local/lib/libjpeg.so.9...done.
Reading symbols from /usr/libexec/ld-elf.so.1...done.
#0  0x80fed24 in execute (op_array=0x0) at ./zend_execute.c:1602
1602                                                    EX(Ts)[EX(opline)->result.u.var].var.ptr->is_ref = 0;
(gdb) bt
#0  0x80fed24 in execute (op_array=0x0) at ./zend_execute.c:1602
(gdb) 
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             | |||||||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 19:00:02 2025 UTC | 
I have very similar thing happening. Script is reading directory with a lot of image files, printing them in colors. The script crash as both mod_php4 in apache and command-line. It crash every time at same position, however it crash in different positions when called thru apache and when run from command line. Relevant part of script: $handle = opendir("/home/pav/images/fit"); while ($fajl = readdir($handle)) { if ($fajl == "." || $fajl == "..") continue; echo '<a href="wow.php3?showme='.$fajl.'" target="_blank" style="color: '; if ($rates[$fajl]) echo calclinkcolor($ratingy[$fajl]); else echo calclinkcolor(-1); echo '">'.$fajl."</a>\n"; } closedir($handle); backtrace #0 0x2836aaed in readdir_r () from /usr/lib/libc.so.4 (gdb) bt #0 0x2836aaed in readdir_r () from /usr/lib/libc.so.4 #1 0x8091935 in php_if_readdir () #2 0x80ed79c in execute () #3 0x80d9171 in zend_execute_scripts () #4 0x8062406 in php_execute_script () #5 0x8060288 in main () #6 0x805f629 in _start () PHP 4.2.1, Apache 1.3.24, FreeBSD 4.5-STABLE