#31413 [NEW]: cURL not posting on 64-bit machine
From: travis at etrafficsolutions dot com
Operating system: Linux
PHP version: 4.3.10
PHP Bug Type: cURL related
Bug description: cURL not posting on 64-bit machine
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 bug report at http://bugs.php.net/?id=31413&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31413&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31413&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31413&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=31413&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=31413&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=31413&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=31413&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=31413&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=31413&r=support
Expected behavior: http://bugs.php.net/fix.php?id=31413&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=31413&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=31413&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=31413&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31413&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=31413&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=31413&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=31413&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=31413&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=31413&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=31413&r=mysqlcfg
Thread (5 messages)
- travis at etrafficsolutions dot com