php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #60413 curl_setopt cookiefile ""
Submitted: 2011-11-30 03:22 UTC Modified: 2011-12-03 04:03 UTC
From: phpbugs at joern dot heissler dot de Assigned: frozenfire (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2011-11-30 03:22 UTC] phpbugs at joern dot heissler dot de
Description:
------------
---
From manual page: http://www.php.net/function.curl-setopt
---

CURLOPT_COOKIEFILE accepts an empty string "" as parameter to load no cookies but enable cookie handling. This is documented e.g. here: http://curl.haxx.se/libcurl/c/curl_easy_setopt.html

> Given an empty or non-existing file or by passing the empty string (""), this option will enable cookies for this curl handle, making it understand and parse received cookies and then use matching cookies in future requests. 

Suggested patch to command description:

The name of the file containing the cookie data. The cookie file can be in Netscape format, or just plain HTTP-style headers dumped into a file.
If the name is an empty string, no cookies are loaded, but cookie handling is still enabled.

Test script:
---------------
Have 100 random php coders read the manpage and ask them to figure out how to enable cookie handling.

Expected result:
----------------
I expect most to come up with "no idea" or "Uhh.. someone wrote I could use /dev/null"


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-12-03 04:02 UTC] frozenfire@php.net
Automatic comment from SVN on behalf of frozenfire
Revision: http://svn.php.net/viewvc/?view=revision&revision=320297
Log: Clarified curlopt_cookiefile behaviour, as per bug #60413.
 [2011-12-03 04:03 UTC] frozenfire@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: frozenfire
 [2011-12-03 04:03 UTC] frozenfire@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 13:00:02 2026 UTC