Home » Networking » Net_Curl » Bug #3580
Fileupload doesn't work
Details
| Submitted | 2005-02-24 15:25 UTC |
|---|---|
| From | cmoehrke at netviser dot de |
| Assigned | jstump |
| Status | Closed |
| Package | Net_Curl |
| PHP Version | 5.0.3 |
| OS | Linux |
| 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/