From:             ed at epsit dot net
Operating system: XP
PHP version:      4.3.4
PHP Bug Type:     cURL related
Bug description:  multipart form post won't upload file

Description:
------------
This appears to be a re-accurance of bug 14320.
Attempting to upload image file using libcurl http multipart post. All I
get is the file name stuffed into the variable I would expect the
temporary file path to be in. No file is uploaded.

OS - Windows XP
Apache/2.0.47 (Win32)
PHP Version 4.3.4
libcurl/7.10.5 OpenSSL/0.9.7b zlib/1.1.4



Reproduce code:
---------------
<?php
// Sample from PHP Bug report # 14320
$url    = "http://design/uyoffice/test/testrcv.php";;
$upfile = "logo.gif";
$ch = curl_init($url);
curl_setopt($ch,CURLOPT_HEADER,1);
curl_setopt($ch,CURLOPT_VERBOSE,1);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_POST,"1");
curl_setopt($ch, CURLOPT_POSTFIELDS, array('upfile'=>@$upfile));
$result = curl_exec($ch);
curl_close($ch);
?>

Expected result:
----------------
Expect to have image file uploaded to server,
with appropriate PHP variable _FILES["upfile"]
array available for file manipulation.

Actual result:
--------------
No file is uploaded. Instead, I get variable $upfile containing the file
address that was to be uploaded.

-- 
Edit bug report at http://bugs.php.net/?id=26587&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=26587&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=26587&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=26587&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=26587&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=26587&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=26587&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=26587&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=26587&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=26587&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=26587&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=26587&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=26587&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26587&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=26587&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=26587&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=26587&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26587&r=float

Reply via email to