php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63057 problem in cUrl with CURLOPT_PRIVATE and CURLINFO_PRIVATE
Submitted: 2012-09-10 21:21 UTC Modified: 2012-09-11 08:34 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: stefanos at cpan dot org Assigned: laruence (profile)
Status: Closed Package: cURL related
PHP Version: 5.3.16 OS: Debian Linux 6.0.5
Private report: No CVE-ID: None
 [2012-09-10 21:21 UTC] stefanos at cpan dot org
Description:
------------
Currently, while using a testscript with curl_multi, the option CURLOPT_PRIVATE (per curl_setopt) isn't stored correctly, is getting messed up or can't be retrieved properly with curl_getinfo($curl,CURLINFO_PRIVATE). The result with multiple URLs is that the last entry (in this example 620) is used instead of 64, 666, 600.

cUrl version 7.27.0

Now where exactly is the error? Script? cURL? PHP?


Test script:
---------------
More as 20 lines, see the url: 
http://pastebin.com/raw.php?i=dascV5Xv

Expected result:
----------------
Next - 64 - 404 - 0.061303 Sec - Request http://www.kb-gaming.com/
Next - 666 - 200 - 0.057142 Sec - Request http://www.sd-p.ch/
Next - 600 - 200 - 0.032915 Sec - Request http://richardschwab.de/
Next - 620 - 200 - 0.326081 Sec - Request https://www.google.de/

Actual result:
--------------
Next -  - 404 - 0.061303 Sec - Request http://www.kb-gaming.com/
Next - 620 - 200 - 0.057142 Sec - Request http://www.sd-p.ch/
Next - 620 - 200 - 0.032915 Sec - Request http://richardschwab.de/
Next - 620 - 200 - 0.326081 Sec - Request https://www.google.de/

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-09-11 04:19 UTC] laruence@php.net
I can not reproduce this, maybe a libcurl issue?

cURL support => enabled
cURL Information => 7.15.5
 [2012-09-11 04:59 UTC] stefanos at cpan dot org
maybe a libcurl issue, can you test this with newer cUrl version?

7.15.5 is very old (year 2006)
 [2012-09-11 05:18 UTC] rasmus@php.net
PHP 5.3.16/5.4.6 w/ Curl 7.22

Next - 666 - 404 - 0.543194 Sec - Request http://www.kb-gaming.com/
Next - 64 - 200 - 0.759856 Sec - Request http://www.sd-p.ch/
Next - 600 - 200 - 0.555988 Sec - Request http://richardschwab.de/
Next - 620 - 200 - 0.769565 Sec - Request https://www.google.de/
 [2012-09-11 07:03 UTC] rasmus@php.net
Ok, I compiled against 7.27 and I am still unable to reproduce this:

12:02am x220:~> php -i | grep "cURL Info"
cURL Information => 7.27.0

12:02am x220:~> php test.php
Next - 666 - 404 - 0.55528 Sec - Request http://www.kb-gaming.com/
Next - 64 - 200 - 0.746688 Sec - Request http://www.sd-p.ch/
Next - 600 - 200 - 0.554405 Sec - Request http://richardschwab.de/
Next - 620 - 200 - 0.782507 Sec - Request https://www.google.de/
 [2012-09-11 07:32 UTC] stefanos at cpan dot org
-Status: Open +Status: Closed -PHP Version: 5.3.16 +PHP Version: 5.4.16
 [2012-09-11 07:32 UTC] stefanos at cpan dot org
okay, thanks for the answer. With php version 5.4.6 is no problem. I close the bugreport.
 [2012-09-11 08:34 UTC] laruence@php.net
-PHP Version: 5.4.16 +PHP Version: 5.3.16 -Assigned To: +Assigned To: laruence
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 19 22:01:32 2024 UTC