Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.4.1

Bug #622 ls() method throws's out errors
Submitted: 2004-01-24 21:12 UTC
From: me at oujie dot com Assigned: toby
Status: Closed Package: Net_FTP
PHP Version: 5.0.0b3 (beta3) OS: Windows XP
Roadmaps: (Not assigned)    
Subscription  


 [2004-01-24 21:12 UTC] me at oujie dot com
Description: ------------ I've created a new object, connected & logged in to the server, changed the Directory and then wanted to list all (dirs, files, doesn't matter). The method ls () throws out an error: both (dirs and files): Fatal error: Cannot use object of type pear_error as array in D:\Webserver\PHP\PEAR\Net\FTP.php on line 865 dirs: Fatal error: Cannot use object of type pear_error as array in D:\Webserver\PHP\PEAR\Net\FTP.php on line 891 files: Fatal error: Cannot use object of type pear_error as array in D:\Webserver\PHP\PEAR\Net\FTP.php on line 905 Is it a problem with using PHP5 (b3) or a general? Also, I can't find the error, I don't have any idea why this doesn't works. Reproduce code: --------------- <?php require_once 'Net/FTP.php'; $host = 'xxx'; $port = '21'; $username = 'xxx'; $password = 'xxx'; $ftp = new Net_FTP ($host, $port); $ftp->connect (); $ftp->login ($username, $password); $ftp->cd ('hosting'); $ftp->ls($ftp->pwd ()); $ftp->disconnect (); ?> Expected result: ---------------- I get 2 lines. The first line is the "status" of the connection, featuring: string(57) "drwx---r-t 10 <username> ftpusers 4096 Jan 24 16:04 .." <username> is the username I've used to connect to the FTP-Server. On the next line the error is thrown out.

Comments

 [2004-01-25 02:00 UTC] toby
Please try the CVS version of Net_FTP to see, if this problem has already been solved. The current CVS version should be PHP5 compatible. If you still experience problems, please send me (or paste here) a dump of your raw-directory listing.
 [2004-01-25 03:24 UTC] me at oujie dot com
I'm sorry, but I can't find any CVS-Version (also I can't find the informations how to get on the CVS-Server). I only find "Download Latest Version" but this is 1.2-stable :-/
 [2004-03-14 12:59 UTC] toby
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better.