ID: 34498
User updated by: johannes at jlindenbaum dot de
Reported By: johannes at jlindenbaum dot de
Status: Bogus
Bug Type: *General Issues
Operating System: Mac OS X 10.4.2
PHP Version: 4.4.0
New Comment:
As a test I gave the complete /Applications/xampp folder
chmod -R 777
same outcome!
Works fine on SuSEn (self built - not XAMPP) or Win XP Pro SP2 (not on
Apache but on self built Apache, PHP MySQL
Previous Comments:
------------------------------------------------------------------------
[2005-09-14 09:29:58] [EMAIL PROTECTED]
The full path to the directories must be readable by the apache user
for this to work. Never rely on the "left-overs" to be really readable
and usable files.
------------------------------------------------------------------------
[2005-09-14 08:27:53] johannes at jlindenbaum dot de
Description:
------------
Hi,
Don't know if it's just me but XAMPP distrib with php 4.4.0 running
parsing following PHP code doesn't work.
Clearly the $handle directory I am reading contains directories. These
are not recognized and thus not put into the array!
htdocs in Apache has full 777 for developing purposes.
Reproduce code:
---------------
$directories = array();
while( FALSE !== ($file_names = readdir($handle)) ) {
if( $file_names != "." && $file_names != "..") {
if( !is_dir($file_names) ) {
echo $file_names;
}
else {
$directories[] = $file_names;
}
}
}
Expected result:
----------------
I expect directories found in the read directory to be added into the
$directories array.
Actual result:
--------------
Directory is outputted as if it were a file.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34498&edit=1