ID: 8874 Comment by: pcatlin at plus dot com Reported By: steve at szabos dot com Status: Closed Bug Type: FTP related Operating System: Windows 2000 Advanced Server PHP Version: 4.0.4 New Comment:
Took a while but have now figured out a work around for this VERY annoying little problem. PHP or IIS tries to write a temporary file, but NOT in the c:\windows\temp folder. It writes this file in the C:\ root. With permissions set to allow which ever user PHP is running as access to write this file, ftp_nlist will work. It tries to write a file called c:\t3lo Hope this is useful to other people stuck on this. :) Previous Comments: ------------------------------------------------------------------------ [2002-03-20 19:37:06] ryan at wonko dot com This bug *is* present in 4.1.1 and 4.1.2, and I've confirmed it personally. This issue needs to be re-opened. I've submitted another bug report about it (http://bugs.php.net/bug.php?id=16057) but it doesn't seem to be getting any attention. This is a *major* blocker for Win32 developers. Here's a short test script that works fine on UNIX builds but fails on Windows: <?php $conn = ftp_connect("ftp.kernel.org"); ftp_login($conn, "anonymous", "[EMAIL PROTECTED]"); $nlist = ftp_nlist($conn, ""); $rawlist = ftp_rawlist($conn, ""); echo "<pre>"; print_r($nlist); print_r($rawlist); echo "</pre>"; ?> ------------------------------------------------------------------------ [2001-08-16 18:37:20] [EMAIL PROTECTED] I must be blind. :) The ftp server information was in the first comment of yours: wu-2.6.1 I installed this same ftp server to my machine and tried with this script: <?php $conn_id = ftp_connect("localhost"); $login_result = ftp_login($conn_id, "username", "pass"); $rawlist = ftp_rawlist($conn_id,"*.gz"); $nlist = ftp_nlist($conn_id,"*.gz"); ftp_quit($conn_id); print_r($rawlist); print_r($nlist); ?> And this worked just fine. So closed. Reopen if you can reproduce this some time. --Jani ------------------------------------------------------------------------ [2001-08-16 00:26:06] steve at szabos dot com Per my previous message, I no longer have access to the FreeBSD server to try it. ------------------------------------------------------------------------ [2001-08-15 02:07:31] [EMAIL PROTECTED] This bug report was for PHP 4.0.4. There have been a few changes since that in PHP 4.0.6. Have you tried with it? And also, these functions do work on most ftp servers. What was the version of the ftp server on which this didn't work? --Jani ------------------------------------------------------------------------ [2001-08-14 21:07:00] steve at szabos dot com $aFiles = Array( "Oct100.log.gz", "Nov100.log.gz"); // $aFiles = ftp_rawlist (nFTP, "/mnt/web/guide/accumeddata/logs/*.gz"); $aFiles = ftp_nlist ( $nFTP, "*.gz"); echo "count(aFiles)=" . count ($aFiles ) . "<BR>"; ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/8874 -- Edit this bug report at http://bugs.php.net/?id=8874&edit=1