Re: Problem w/ readdir()

From: Date: Tue, 25 Jul 2000 21:08:44 +0000
Subject: Re: Problem w/ readdir()
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-26093@lists.php.net to get a copy of this message
Could you try a recent snapshot from http://snaps.php.net ? I think this problem has been fixed. -Rasmus On Tue, 25 Jul 2000, Eric Anderson wrote: > > Server version: Apache/1.3.12 (Unix) > Server built: Jul 25 2000 13:33:45 > Server's Module Magic Number: 19990320:7 > Server compiled with.... > -D HAVE_MMAP > -D USE_MMAP_SCOREBOARD > -D USE_MMAP_FILES > -D USE_FCNTL_SERIALIZED_ACCEPT > -D HTTPD_ROOT="/usr/local/apache" > -D SUEXEC_BIN="/usr/local/apache/bin/suexec" > -D DEFAULT_PIDLOG="logs/httpd.pid" > -D DEFAULT_SCOREBOARD="logs/apache_runtime_status" > -D DEFAULT_LOCKFILE="logs/accept.lock" > -D DEFAULT_XFERLOG="logs/access_log" > -D DEFAULT_ERRORLOG="logs/error_log" > -D TYPES_CONFIG_FILE="conf/mime.types" > -D SERVER_CONFIG_FILE="conf/httpd.conf" > -D ACCESS_CONFIG_FILE="conf/access.conf" > -D RESOURCE_CONFIG_FILE="conf/srm.conf" > > built with a static php-4.0.1pl2. No errors on compilation. > Everything has worked great up this point, except the following code > generates a 'exit signal Segmentation Fault (11)': > > $dh = opendir("$LOCATION"); > while ( $File = readdir($dh) ) { > if ($File != "." && $File != "..") { > echo("File: $File<br>\n"); > } > } > closedir($dh); > > It does not matter if the directory is empty or full, it makes one > iteration (to '.') but fails the second time around on '..' > > Variations with DIR() fail as well. > > The gdb bt shows: > > This GDB was configured as "i386-pc-solaris2.7"...X -f > (gdb) run -X -f /usr/local/www/conf/httpd.conf > Starting program: /usr/sbin/httpd -X -f /usr/local/www/conf/httpd.conf > > Program received signal SIGSEGV, Segmentation fault. > 0x80feb25 in execute () > (gdb) bt > #0 0x80feb25 in execute () > #1 0x823b4c4 in ?? () > Cannot access memory at address 0x1. > (gdb) > > Let me know if you need any more info.. > > >

« previous php.dev (#26093) next »