From: predecess at hotmail dot com Operating system: Red Hat Enterprise Linux PHP version: 5.0.3 PHP Bug Type: Scripting Engine problem Bug description: ftp_nlist and ftp_rawlist not working in ver 5
Description: ------------ ftp_nlist does not work anymore, nor does ftp_rawlist. Code that used ftp_nlist worked fine on PHP 4.3.9 and simply copying the code to a server running PHP 5.0.3 breaks it. The /tmp directory's mode/permissions is set to 777 Reproduce code: --------------- <?php // Get FTP file list $ftpconn = ftp_connect('ftp.example.com'); if ($ftpconn) { if (ftp_login($ftpconn, 'username', 'password')) { $path = '/this/same/task/works/fine/with/a/url/wrapper/'; $files = ftp_nlist($ftpconn, $path); foreach ($files AS $filelist) { echo $filelist.'<br>'; } } } ?> Expected result: ---------------- this/same/task/works/fine/with/a/url/wrapper/file1.txt this/same/task/works/fine/with/a/url/wrapper/file2.txt this/same/task/works/fine/with/a/url/wrapper/file3.txt this/same/task/works/fine/with/a/url/wrapper/file4.txt Actual result: -------------- Warning: Invalid argument supplied for foreach() in /documentroot_path/ftpBUG.php on line 9 -- Edit bug report at http://bugs.php.net/?id=32708&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32708&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32708&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32708&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=32708&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=32708&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=32708&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=32708&r=needscript Try newer version: http://bugs.php.net/fix.php?id=32708&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=32708&r=support Expected behavior: http://bugs.php.net/fix.php?id=32708&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=32708&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=32708&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=32708&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32708&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=32708&r=dst IIS Stability: http://bugs.php.net/fix.php?id=32708&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=32708&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=32708&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=32708&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=32708&r=mysqlcfg