ID:               47906
 Updated by:       [email protected]
 Reported By:      klas at k-k-k dot biz
-Status:           Open
+Status:           Feedback
 Bug Type:         Scripting Engine problem
 Operating System: windows
 PHP Version:      5.2.9
 New Comment:

Works fine for me with both 5.2 and 5.3. What version of libcurl are
you 
using?


Previous Comments:
------------------------------------------------------------------------

[2009-04-06 13:11:04] klas at k-k-k dot biz

Sorry, but that doesn't work. 

Note that this is a different problem that the one described on that
page.

------------------------------------------------------------------------

[2009-04-06 12:46:24] [email protected]

You just need to disable the Expect header cURL sends by default:

http://the-stickman.com/web-development/php-and-curl-disabling-100-continue-header/


------------------------------------------------------------------------

[2009-04-06 11:48:31] klas at k-k-k dot biz

Description:
------------
Inserting array (key=>value) as CURLOPT_POSTFIELDS doesn't work
although documentation states:

 "This can either be passed as a urlencoded string like
'para1=val1&para2=val2&...' or as an array with the field name as key
and field data as value. "

Reproduce code:
---------------
$url="example.php";
$process = curl_init($url);
$data= array ('somefield'=>'somedata')
curl_setopt($process, CURLOPT_POSTFIELDS, $data);
curl_exec($process);
curl_close($process);

Expected result:
----------------
input field "somefield" with value "somedata" posted to example.php

Actual result:
--------------
Empty field/value


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=47906&edit=1

Reply via email to