PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Networking » Net_Curl » Bug #3580

Fileupload doesn't work

Details

Submitted2005-02-24 15:25 UTC
Fromcmoehrke at netviser dot de
Assignedjstump
StatusClosed
PackageNet_Curl
PHP Version5.0.3
OSLinux
Roadmaps(Not assigned)

Comments

[2005-02-24 15:25 UTC] cmoehrke at netviser dot de

Description:
------------
CURL needs a file resource, but Net_Curl expects $file to be a filename.
As Net_Curl uses filesize() to detect the size it is not possible to use a file resource

Reproduce code:
---------------
$curl = new Net_Curl('http://www.netviser.de/');
$curl->username='xx';
$curl->password='xx';
$curl->file='data.xml';
$res=$curl->execute();
$curl->close();

Expected result:
----------------
No Error

Actual result:
--------------
Warning: curl_setopt(): supplied argument is not a valid File-Handle resource in /usr/local/php/pear/Net/Curl.php on line 358
socket error: 111

[2005-07-13 21:37 UTC] joe at joestump dot net

This has been fixed in my patch. Hopefully this all gets
accepted and rolled into a release. You can download and apply
the various patches from here:

http://zebulon.miester.org/~jstump/pear/Net_Curl/