#48285 [NEW]: ftp_nlist fails
| From: | me at andreylis dot ru | Date: | Thu, 14 May 2009 18:35:12 +0000 |
| Subject: | #48285 [NEW]: ftp_nlist fails | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-137329@lists.php.net to get a copy of this message | ||
From: me at andreylis dot ru
Operating system: debian
PHP version: 5.2.9
PHP Bug Type: FTP related
Bug description: ftp_nlist fails
Description:
------------
hello
ftp_nlist($connect, $directory)
if $directory contains '+' nothing is returned
Reproduce code:
---------------
function ftpList ($hostname, $username, $password, $directory) {
$connect = ftp_connect($hostname);
$autorize = ftp_login($connect, $username, $password);
$buff = ftp_nlist($connect, $directory);
foreach ($buff as $element) {
$size = ftp_size($connect, $element);
if ($size < 0) { $type = "dir"; } else { $type = "file"; }
$return[] = array("name" => $element, "size" => $size, "type"
=> $type);
}
sort($return);
return $return;
ftp_close($connect);
}
Expected result:
----------------
array with ftp names and sizes sorted by alphabet
Actual result:
--------------
nothing
--
Edit bug report at http://bugs.php.net/?id=48285&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48285&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48285&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48285&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=48285&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48285&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=48285&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=48285&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=48285&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=48285&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=48285&r=support
Expected behavior: http://bugs.php.net/fix.php?id=48285&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=48285&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=48285&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=48285&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48285&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=48285&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=48285&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=48285&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=48285&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=48285&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=48285&r=mysqlcfg