|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26587 multipart form post won't upload file
Submitted: 2003-12-10 15:12 UTC Modified: 2003-12-10 15:40 UTC
From: ed at epsit dot net Assigned:
Status: Not a bug Package: cURL related
PHP Version: 4.3.4 OS: XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
38 - 6 = ?
Subscribe to this entry?

 [2003-12-10 15:12 UTC] ed at epsit dot net
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:
// Sample from PHP Bug report # 14320
$url    = "http://design/uyoffice/test/testrcv.php";
$upfile = "logo.gif";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POSTFIELDS, array('upfile'=>@$upfile));
$result = curl_exec($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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-12-10 15:40 UTC]
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Sep 26 18:03:37 2021 UTC