php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #26436 user temp dir in call to ftp_rawlist()
Submitted: 2003-11-27 13:56 UTC Modified: 2014-12-30 10:41 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: PaulMenard1 at Yahoo dot com Assigned:
Status: No Feedback Package: FTP related
PHP Version: 4.3.3 OS: Windows 2000 Adv. Server
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.
Password:
Status:
Package:
Bug Type:
Summary:
From: PaulMenard1 at Yahoo dot com
New email:
PHP Version: OS:

 

 [2003-11-27 13:56 UTC] PaulMenard1 at Yahoo dot com
Description:
------------
I have read through the already reported buglist about common problems getting ftp_rawlist()/ftp_nlist() returning nothing. I am having the same issue. 

First some configuration notes:
Server: windows 2000 Advanced Server with all the lates patches.
PHP: Version 4.3.3 running as CGI.

My server is primarily used as an FTP server using the FTP services of IIS 5. I provide a Web page in PHP to also allow pass-through FTP for certain account that are trapped behind the corporate firewall. The IIS is setup to use Basic Authentication. 

So does this mean the PHP.exe is executed as the authenticated user instead of the default IIS user?

After tracing through the source code I found what I think is my issue. 

In the code module php-4.3.3\ext\ftp\ftp.c the function ftp_genlist() first calls 

	if ((tmpfp = tmpfile()) == NULL)
		return NULL;

In some of the other post here there was mention of verifying that the use has full permission on the TEMP folder. After checking phpinfo via a non-admin use I have verified that the TEMP & TMP folder on my system 'C:\WinNT\TEMP\' has full permissions for everyone. 

To test this I changed the line in the PHP ftp.c code to not use tmpfile() but instead to use a hard-coded folder. I recompiled PHP and tested. This seemed to work great. 

So what are the chances of getting an optional argument added to the ftp_rawlist() function? Something like the ftp_fget second parameter resource handle.

Paul


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-04-17 14:26 UTC] levim@php.net
-Status: Open +Status: Feedback -Package: Feature/Change Request +Package: FTP related
 [2014-04-17 14:26 UTC] levim@php.net
Is this something you are still interested in?
 [2014-12-30 10:41 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 12:01:29 2024 UTC