php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25702 ftp_nlist & ftp_rawlist in IIS 6
Submitted: 2003-09-30 10:39 UTC Modified: 2003-10-08 13:55 UTC
From: ctomele at hotmail dot com Assigned:
Status: Not a bug Package: FTP related
PHP Version: 5CVS-2003-09-30 (dev) OS: Windows 2003 Server Beta 2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
16 + 28 = ?
Subscribe to this entry?

 
 [2003-09-30 10:39 UTC] ctomele at hotmail dot com
Description:
------------
Running:
Win 2003 Server
IIS 6.0
FTP is IIS 6, and also XServer (OSX)

Gives an empty result.

Tried latest stable 4 as well as Version 5.0.0b2-dev.

I know this is beating a dead horse, I just didn't see anyone reporting it on IIS 6 and it seems to have come back.

Reproduce code:
---------------
$ftp_server = "10.10.1.242";
$conn_id = ftp_connect($ftp_server) or die("Couldn't connect to $ftp_server"); 

ftp_login($conn_id, "####", "####");

$content = ftp_nlist($conn_id, "/");

echo "<pre>";
print_r($content);
echo "</pre>";

ftp_close($conn_id);


Expected result:
----------------
Should have listed directory contents.

Actual result:
--------------
Nada.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-10-03 12:35 UTC] pollita@php.net
ftp_nlist / ftp_rawlist require write permissions to your system's temporary files directory.  The user IIS is running as (typicly IUSR_<yourcomputername>) does not have permissions, whle the user Apache is running as "Check control panel, it's probably "Local System") does have permissions.
 [2003-10-08 13:55 UTC] ctomele at hotmail dot com
I had the permissions set perfectly. Had it working fine in Win2K. Forget I mentioned IIS. I was hitting *public* ftps which were coming up empty. Every single ftp I tried, which I was verifying aok from another server running PHP, were empty. I'm not sure if it was an issue of Server 2003, although it appeared to work at first, or an issue of installing File Server Role in Server 2003, which is when it bunked out. When I removed IIS and installed Apache, it worked fine on the same machine. So I can only assume that PHP running in Server 2003 with apache is fine, while PHP running in IIS 6 MAY be fine, but PHP running on Server 2003 in IIS 6 with File Server Roles is not working. I'm sure it's some wonderful MS issue, now that I've navigated the nasty maze of their GUI 'training wheels' setup, but I'm forced to use it by my job. Oh well, thanks for the help, and keep truckin.
 [2004-09-28 20:43 UTC] pcatlin at plus dot com
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. :)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 07:01:29 2024 UTC