ID:               31413
 User updated by:  travis at etrafficsolutions dot com
 Reported By:      travis at etrafficsolutions dot com
 Status:           Analyzed
 Bug Type:         cURL related
 Operating System: Linux
 PHP Version:      4.3.10
 Assigned To:      jorton
 New Comment:

Works!

Thanks so much for the quick response.

Any idea when this will be in CVS and when the next version (of php)
will be released?

Thanks again.


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

[2005-01-05 22:36:06] [EMAIL PROTECTED]

Can you try this patch: http://www.apache.org/~jorton/php_curl64.diff

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

[2005-01-05 01:31:31] travis at etrafficsolutions dot com

Description:
------------
CURL Information: libcurl/7.12.3 OpenSSL/0.9.7d zlib/1.2.1

Tested with PHP 4.3.10 and the latest php4 cvs.


When I run the script below on a 64-bit AMD machine, the post received
by the receiving script are empty. Nothing is posted.

To try and figure out if cURL was having problems or if it was PHP, I
tried the exact same submit using curl command line, to the same
receiving script. Works as expected.

curl -d key=value http://{URL_HERE}/curl_receive.php

Returns a var_dump() with the key "key" holding a value of "value"

I have tested this on 3+ 32-bit machines, without any problems (script
or command line curl). I have also tested on 3 64-bit machines, all of
them failed when the script was run, but were successful when run from
command line curl.

-------------
If I can provide any more information to help with this, please reply
and I will get it to you asap.

Reproduce code:
---------------
<?php
// curl_submit.php
$ch = curl_init();
// replace {URL_HERE} to where you put this script
curl_setopt($ch, CURLOPT_URL, "http://{URL_HERE}/curl_receive.php";);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);

$post_array = array(
        'key' => 'value');

curl_setopt($ch, CURLOPT_POSTFIELDS, $post_array);

$response = curl_exec($ch);
var_dump($response);
?>

<?php
// curl_receive.php
var_dump($_POST);
?>

Expected result:
----------------
array(1) {
  ["key"]=>
  string(5) "value"
}

Actual result:
--------------
array(0) {}


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


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

Reply via email to