Re: readdir
| From: | Chris | Date: | Wed, 09 Aug 2000 20:22:29 +0000 |
| Subject: | Re: readdir | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-10991@lists.php.net to get a copy of this message | ||
Here is part of the ls -al on the directory. I thought perhaps the naming
conventions with "-", and "+" may be throwing it off but I have tried on
several directories with basic naming conventions. I have changed the
ownership from root to nobody to normal users and even set the directory
and files 777.
I did upgrade Apache at the same time so I am wondering if an httpd.conf
directive could cause such problems. I have picked through it and see no
problems.
rwxr-xr-x 2 webmastr users 4096 Aug 9 12:47 ./
drwxr-xr-x 7 webmastr users 1024 Aug 9 12:59 ../
-rw-r--r-- 1 webmastr users 74653 Nov 21 1999 3Dfx-HOWTO
-rw-r--r-- 1 webmastr users 105257 Oct 25 1999 AI-Alife-HOWTO
-rw-r--r-- 1 webmastr users 140723 Nov 3 1997 AX25-HOWTO
-rw-r--r-- 1 webmastr users 64589 Mar 30 1997 Access-HOWTO
-rw-r--r-- 1 webmastr users 22533 Sep 2 1997 Alpha-HOWTO
-rw-r--r-- 1 webmastr users 70845 Sep 18 1999 Assembly-HOWTO
-rw-r--r-- 1 webmastr users 60688 Nov 21 1999 Bash-Prompt-HOWTO
-rw-r--r-- 1 webmastr users 42434 Sep 12 1999 Belgian-HOWTO
-rw-r--r-- 1 webmastr users 43468 Nov 21 1999 Benchmarking-HOWTO
-rw-r--r-- 1 webmastr users 50910 Nov 21 1999 Beowulf-HOWTO
-rw-r--r-- 1 webmastr users 93578 Nov 21 1999 BootPrompt-HOWTO
-rw-r--r-- 1 webmastr users 99919 Oct 28 1999 Bootdisk-HOWTO
-rw-r--r-- 1 webmastr users 22902 Nov 21 1999 Busmouse-HOWTO
-rw-r--r-- 1 webmastr users 62928 Sep 28 1999 CD-Writing-HOWTO
-rw-r--r-- 1 webmastr users 71434 Nov 21 1999 CDROM-HOWTO
Two scripts;
<?php
$blah = "Print Something";
$dir = opendir('.');
echo "$blah";
while($file = readdir($dir)) {
echo "$blah\n";
echo "$file\n";
}
closedir($dir);
?>
Only returns "Print Something" once
<?php
$handle=opendir('.');
echo "Directory handle: $handle\n";
echo "Files:\n";
while (($file = readdir($handle))!==false) {
echo "$file\n";
}
closedir($handle);
?>
Returns "Directory handle: Resource id #1 Files: "
Thanks again for your help.
Chris
On Tue, 8 Aug 2000, Rasmus Lerdorf wrote:
> Please provide the simplest example possible that fails for you along with
> an ls -la listing of the directory you are running the example on.
>
> -Rasmus
>
> On Mon, 7 Aug 2000, Chris wrote:
>
> >
> > Built it with the newest snap shot and still no luck. Im at a loss as I am
> > not getting any error messages. I have tried multiple examples that work
> > on my other box.
> >
> > Chris
> >
> >
> >
> > On Mon, 7 Aug 2000, Rasmus Lerdorf wrote:
> >
> > > Try a recent snapshot from http://snaps.php.net
> > > instead.
> > >
> > >
> > > On Mon, 7 Aug 2000, Chris wrote:
> > >
> > > > I know that 4.01 had an issue with readdir() but I have just upgraded from
> > > > 3.1.12 with no compilation errors but my readdir functions do not work
> > > > properly.
> > > >
> > > > The only thing I can think of is the Kernel level this box is on, as my
> > > > scripts work on a different box also running 4.01pl2 and Apache 1.3.12.
> > > >
> > > > Is there a kernel level or libc level for Zend. I am currently running
> > > > Kernel 2.0.38. Been meaning to make the leap to a 2.2.x kernel but this
> > > > an older production server that is running just fine.
> > > >
> > > > Any help would be appreciated.
> > > >
> > > > Chris
> > > >
> > > >
> > > >
> > >
> >
> >
> >
>