|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36882 ftp upload failed if curlwrappers are enabled.
Submitted: 2006-03-28 01:36 UTC Modified: 2006-10-24 01:00 UTC
Avg. Score:3.2 ± 0.4
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: sos at sokhapkin dot dyndns dot org Assigned:
Status: No Feedback Package: cURL related
PHP Version: 5.1.2 OS: Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2006-03-28 01:36 UTC] sos at sokhapkin dot dyndns dot org
The following code fails with "fwrite failed" message if php is configured with "--with-curlwrappers" option.

$h=fopen("ftp://user:password@server/tmp/test", "w");
    die ("fopen failed");
if(!fwrite($h, "asd"))
    die ("fwrite failed");

Reproduce code:
See description

Expected result:

Actual result:
"fwrite failed" message. The code runs OK if PHP is configured without "--with-curlwrappers" option.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-03-28 10:32 UTC]
What FTP server do you use and are you able to reproduce it with some publicly available FTP server?
 [2006-03-28 13:39 UTC] sos at sokhapkin dot dyndns dot org
I tried with gentoo linux net-ftp/ftpd-0.17-r3 and AIX 5.3 ftp server, I did not try public ftp servers.

PHP package maintainer for gentoo linux had reproduced the problem also, and we tracked the problem down to curlwrappers configure option.

I ran php cli under linux strace command and found out that after connecting to ftp server php tries to read the server response but passes 0 timeout to poll syscall and timeouts immediately.
 [2006-04-10 11:59 UTC]
See also bug #33770

 [2006-10-16 15:08 UTC]
Please try using this CVS snapshot:
For Windows:

 [2006-10-24 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jul 21 20:01:30 2024 UTC