Edit report at https://bugs.php.net/bug.php?id=53087&edit=1

 ID:                 53087
 Updated by:         fel...@php.net
 Reported by:        thepixeldeveloper at googlemail dot com
 Summary:            getRealPath() returns the parent directory.
-Status:             Open
+Status:             Bogus
 Type:               Bug
 Package:            SPL related
 Operating System:   Ubuntu Maverick Meerkat
 PHP Version:        5.3.3
 Block user comment: N
 Private report:     N

 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Not a bug, your directory is probably empty, so it's getting the realpath for 
"..".

Check it using the getFileName() method. :)


Previous Comments:
------------------------------------------------------------------------
[2010-10-17 04:35:15] thepixeldeveloper at googlemail dot com

Some additional information

./configure  --prefix=/opt/php-5.3.3 --with-openssl --with-mcrypt --with-
mysqli 
--with-mysql=mysqlnd --with-mysql-sock --with-gd --with-jpeg-dir=/usr --with-
png-dir=/usr --with-zlib-dir=/usr --with-freetype-dir=/usr --with-tidy --with-
curl --enable-fpm --enable-gd-native-ttf --enable-gd-jis-conv --enable-mbstring 
--disable-xmlreader --disable-xmlwriter --disable-phar --without-sqlite --
without-sqlite3 --disable-pdo --disable-posix --with-pear=/usr/share/pear

diff -u /home/mathew/Sources/php-5.3.3/php.ini-development php.ini

http://pastie.org/private/kjaxcwwyx210jfpkfe0ipw

------------------------------------------------------------------------
[2010-10-17 03:40:33] thepixeldeveloper at googlemail dot com

Description:
------------
Using getRealPath() on RecursiveDirectoryIterator returns the parent directory.

Test script:
---------------
<?php

$directory = '/var/www/nolimits/public/application/cache';

$iterator = new RecursiveDirectoryIterator($directory);

echo $iterator->getRealPath();

Expected result:
----------------
/var/www/nolimits/public/application/cache

Actual result:
--------------
/var/www/nolimits/public/application


------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=53087&edit=1

Reply via email to