|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25347 ftp_rawlist() returns nothing, when apache runs as service
Submitted: 2003-09-01 16:26 UTC Modified: 2004-03-04 17:34 UTC
From: spam at come dot no-ip dot com Assigned:
Status: Not a bug Package: FTP related
PHP Version: 4.3.3 OS: Windows XP Pro
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: spam at come dot no-ip dot com
New email:
PHP Version: OS:


 [2003-09-01 16:26 UTC] spam at come dot no-ip dot com
I know there are atleast few bug submittions but they are closed while the problem is still remain.

I run Apache2 as "apache" user that is member of "USERS" group. ftp_rawlist() function returns nothing.
I've checked my FTP logs and all I can see that PHP logs into FTP server and does not sends LIST command.

Windows XP Pro on NTFS + Apache2 + PHP4.3.3 as SAPI module

Reproduce code:
$conn = ftp_connect("");
$nlist = ftp_nlist($conn, "");
$rawlist = ftp_rawlist($conn, "");

echo "<pre>";
echo "Values from ftp_nlist()<BR>";
echo "Values from ftp_rawlist()<BR>";
echo "</pre>";

Expected result:
List of the dirs

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-09-01 21:17 UTC]
ftp_nlist and ftp_rawlist require the ability to create a temporary file.  The user you are running as does not have write premission to your TEMP directory.

This is not a bug in ext/ftp, this is a configuration issue.

Make sure whoever you're running Apache as has read/write/erase permissions in your system's temp directory.
 [2003-09-11 03:34 UTC] spam at come dot no-ip dot com
mmm...I'm sorry, but why all the replys where deleted?
it was important, because as I said in my replys, no permission changes for TEMP folders helped!
the only way I could make it work is add write permissions to ENTIRE drive! witch is NOT ACCEPTEBLE, otherwise there is no reason run it under a USER, not as default as SYSTEM.

Is this should be related to Apache itself, then?

P.S. as u (or maybe somebody else says, that PHP has no idea where those temp files are being writen, then would it be so difficult to add a specific temp dir that will be set in .ini file (same as for sessions temp files)
This way this issue can be fixed.
 [2004-03-04 17:34 UTC]
Yes it would be difficult, PHP doesn't create the file, the operating system does.  And I don't know anyone at Microsoft who can introduce that particular patch.

Try the next snapshot though (dated *AFTER* 3/4/2004 21:30 GMT).  This might just suitably workaround the problem.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sat May 21 03:05:45 2022 UTC