|  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
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:
14 + 41 = ?
Subscribe to this entry?

 [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-2020 The PHP Group
All rights reserved.
Last updated: Tue Oct 27 01:01:23 2020 UTC