Bug #60143 [Com]: ftp_nlist does not return anything.
| From: | cdburgess at gmail dot com | Date: | Thu, 27 Oct 2011 02:31:08 +0000 |
| Subject: | Bug #60143 [Com]: ftp_nlist does not return anything. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-164599@lists.php.net to get a copy of this message | ||
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:
I tried rebooting my machine in 32 bit mode, and I can get the command line version of this script
to work. It still will not work in the browser so I am looking into that. But it definitely appears
to be a 64 bit issue.
Previous Comments:
------------------------------------------------------------------------
[2011-10-26 22:52:57] cdburgess at gmail dot com
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.
------------------------------------------------------------------------
[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