php.net |  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
Votes:4
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:
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
Description:
------------
The following code fails with "fwrite failed" message if php is configured with "--with-curlwrappers" option.

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

Reproduce code:
---------------
See description

Expected result:
----------------
FTP is OK

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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-03-28 10:32 UTC] tony2001@php.net
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] sniper@php.net
See also bug #33770

 [2006-10-16 15:08 UTC] iliaa@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip


 [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-2014 The PHP Group
All rights reserved.
Last updated: Wed Apr 23 14:02:33 2014 UTC