|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49519 Passing tmpfile() to CURLOPT_FILE gives warning
Submitted: 2009-09-10 10:16 UTC Modified: 2009-09-10 14:40 UTC
From: sjoerd-php at linuxonly dot nl Assigned:
Status: Not a bug Package: cURL related
PHP Version: 5.3.0 OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: sjoerd-php at linuxonly dot nl
New email:
PHP Version: OS:


 [2009-09-10 10:16 UTC] sjoerd-php at linuxonly dot nl
Passing a resource created by tmpfile() gives a warning that the resource is not writable.

Reproduce code:
$curl = curl_init();
curl_setopt($curl, CURLOPT_FILE, tmpfile());

Expected result:
No warning.

Actual result:
Warning: curl_setopt(): the provided file handle is not writable in /Volumes/sjoerd-nfs/public_html/svnreps/test/a.php on line 4


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-09-10 13:04 UTC]
Please try using this snapshot:
For Windows:

Works fine for me..
 [2009-09-10 14:40 UTC]
Could not reproduce with latest 5.3 branch.
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri Sep 20 09:01:26 2019 UTC