php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57813 resetCookies causes segfault
Submitted: 2007-08-30 04:42 UTC Modified: 2008-03-25 08:43 UTC
From: gprzybylski at eurodns dot com Assigned: mike (profile)
Status: No Feedback Package: pecl_http (PECL)
PHP Version: 5.2.1 OS: Ubuntu/Redhat Linux
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 — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
45 - 43 = ?
Subscribe to this entry?

 
 [2007-08-30 04:42 UTC] gprzybylski at eurodns dot com
Description:
------------
Resetting cookies list (empty or not) causes segfault.

Reproduce code:
---------------
 $objHttp = new HttpRequest('http://www.google.com');
 $objHttp->resetCookies();
 // -> segmentation fault

 // OR

 $arrCookies = array('test' => 'testvalue');
 $objHttp = new HttpRequest('http://www.google.com');
 $objHttp->setCookies($arrCookies);
 var_dump($objHttp->getCookies());
 $objHttp->resetCookies();
 // -> segmentation fault

Expected result:
----------------
no segfault :)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-08-30 07:51 UTC] mike@php.net
This schould be fixed in current CVS.

Anyway, note that resetCookies does not reset cookies set with setCookies, but libcurl internal (retrieved from website) cookies. To unset custom cookies call setCookies(array())!

Would be awesome if you could test current CVS (HEAD or R_1_5 branch).

Thanks!
 [2007-09-18 07:13 UTC] mike@php.net
Any news?
 [2008-03-25 08:43 UTC] mike@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 [2008-06-21 09:13 UTC] troy at yortfolio dot com
Hi,

I have the same problem but in Windows.

Currently running ...
Windows XP Pro x64 SP2
Apache 2.2
PHP 5.2.6
pecl_http 1.6.1-dev (from php.net pecl package)
libcurl 7.16.0

Once I remove ->resetCookies() the script continues fine. I would take it from this the bug is still there.

Not sure what other details you require but would be good to see this fixed.

Thanks
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 06:01:29 2024 UTC