Edit report at https://bugs.php.net/bug.php?id=60143&edit=1
ID: 60143
Comment by: cdburgess at gmail dot com
Reported by: cdburgess at gmail dot com
Summary: ftp_nlist does not return anything.
Status: Open
Type: Bug
Package: FTP related
Operating System: Mac OS X 10.7.2
PHP Version: 5.3.8
Block user comment: N
Private report: N
New Comment:
Just tested this on another Mac OS X 10.6.8 running PHP v 5.3.4 and the
function works just fine. This could have something to do with Lion (x86_64)
based machines.
Previous Comments:
------------------------------------------------------------------------
[2011-10-26 17:37:55] cdburgess at gmail dot com
Description:
------------
When running this script on a linux box, it works as expected.
CURLOPT_FTPLISTONLY will work as well. However, when trying to run this from a
Mac, it does not return anything.
Test script:
---------------
<?php
$ftp_server = 'DOMAIN';
$ftp_user_name = 'USER';
$ftp_user_pass = 'PASS';
$conn_id = ftp_connect($ftp_server) or die("Couldn't connect to $ftp_server");
ftp_pasv($conn_id, true);
ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
$dir = ftp_pwd($conn_id);
$list = ftp_nlist($conn_id, $dir);
print_r($list);
ftp_close($conn_id);
?>
Expected result:
----------------
I would expect to see a list of files location on the FTP server.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60143&edit=1