Bug #53087 [Com]: getRealPath() returns the parent directory.
Edit report at http://bugs.php.net/bug.php?id=53087&edit=1
ID: 53087
Comment by: thepixeldeveloper at googlemail dot com
Reported by: thepixeldeveloper at googlemail dot com
Summary: getRealPath() returns the parent directory.
Status: Open
Type: Bug
Package: SPL related
Operating System: Ubuntu Maverick Meerkat
PHP Version: 5.3.3
Block user comment: N
New Comment:
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
Previous Comments:
------------------------------------------------------------------------
[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 http://bugs.php.net/bug.php?id=53087&edit=1
Thread (3 messages)