|  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: ed at epsit dot net
New email:
PHP Version: OS:


 [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: Tue Sep 21 23:03:37 2021 UTC