Re: Directory Listing Problem

From: Date: Tue, 03 Oct 2000 08:44:01 +0000
Subject: Re: Directory Listing Problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-18385@lists.php.net to get a copy of this message
Try being one of the apache user (login as one) and see the directory listing ... whether you're able to get one? Me thinks that you require the execute permissions as well for reading a directory! -Romi ----- Original Message ----- From: Samantha Savvakis To: PHP General Sent: Tuesday, October 03, 2000 2:12 PM Subject: [PHP] Directory Listing Problem Hi, I have run into a slight problem using the directory functions in PHP. Versions: * Apache/1.3.11 Ben-SSL/1.38 (Unix) * PHP/4.0.3-dev I have copied the details straight from the PHP Manual: <?php $handle=opendir('/tmp'); echo "Directory handle: $handle<BR>\n"; echo "Files:<BR>\n"; while (($file = readdir($handle))!==false) { echo "$file\n"; } closedir($handle); ?> I get the following output: ************ Directory handle: Resource id #1 Files: ************ No files are being displayed. Then I tried the "dir" class method. Again, code straight from the PHP manual: $d = dir("/tmp"); echo "Handle: ".$d->handle."<br>\n"; echo "Path: ".$d->path."<br>\n"; while($entry=$d->read()) { echo $entry."<br>\n"; } $d->close(); Output: *************** Handle: :Resource id #1 Path: /tmp *************** Again, no files listed. I have checked permissions on the directory. The apache user definitely has "read" access to the /tmp directory. Is there some sort of setting in the apache conf file that I need? Thanks, Sam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#18385) next »