PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Networking » Net_FTP » Bug #7527

ls fails if there isn't a file/directory

Details

Submitted2006-04-30 17:16 UTC
Fromuwelk at xhochy dot org
Assignedjorrit
StatusClosed
PackageNet_FTP
PHP Version5.1.2
OSSuse Linux 9.3
Roadmaps1.3.3

Comments

[2006-04-30 17:16 UTC] uwelk at xhochy dot org

Description:
------------
Simply if you make an ls on an empty folder you get an error:

The list style of your server seems not to be supported.

I use the following commands below, both return a PEAR::Error

Test script:
---------------
$arr1 = $connection->ls($path,NET_FTP_FILES_ONLY);
$arr2 = $connection->ls($path,NET_FTP_DIRS_ONLY);

Expected result:
----------------
an array with the length 0

Actual result:
--------------
object(PEAR_Error)#5 (8) {
["error_message_prefix"]=>
string(0) ""
["mode"]=>
int(1)
["level"]=>
int(1024)
["code"]=>
int(-31)
["message"]=>
string(208) "The list style of your server seems not to be supported. Please email a "$ftp->ls(NET_FTP_RAWLIST);" output plus info on the server to the maintainer of this package to get it supported! Thanks for your help!"
["userinfo"]=>
NULL
["backtrace"]=> //not more because password should behiddeen and coming data > 1MB

[2006-04-30 17:18 UTC] uwelk at xhochy dot org

Output from "$ftp->ls(NET_FTP_RAWLIST);"
----------------------------------------

array(1) {
[0]=>
string(7) "total 0"
}

[2007-03-11 10:51 UTC] uwelk at xhochy dot org

I'm not using it anymore, but I connected to a muddleftpd, version 1.3.13.1-4(on debian sarge)

PS: It should work with older PHP-versions too.