|  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
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: 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-2021 The PHP Group
All rights reserved.
Last updated: Wed Apr 14 18:01:23 2021 UTC