php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63545 don't reset array pointer in apc_fetch
Submitted: 2012-11-17 07:08 UTC Modified: 2013-02-18 00:36 UTC
From: kogarasi dot cross at gmail dot com Assigned:
Status: No Feedback Package: APC (PECL)
PHP Version: 5.3.18 OS: CentOS
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: kogarasi dot cross at gmail dot com
New email:
PHP Version: OS:

 

 [2012-11-17 07:08 UTC] kogarasi dot cross at gmail dot com
Description:
------------
add array to apc.
and fetch.
i use current to return value. and current return value is false.


Test script:
---------------
$retval = apc_add('key', array(1,2,3,4,5));

echo $retval; // true

$retval = apc_fetch('key');

var_dump($retval); // array( 1,2,3,4,5 );

var_dump(current($retval)); // error: false

reset($retval);
var_dump(current($retval)); // OK: 1

apc_delete('key');


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-12-05 13:34 UTC] ab@php.net
Please give the APC version you're using and the APC config.
 [2012-12-05 13:47 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2012-12-05 15:43 UTC] kogarasi dot cross at gmail dot com
i'm using apc version is 3.1.9.
and config is not changed.

i used pecl command for installed apc.
 [2012-12-05 15:43 UTC] kogarasi dot cross at gmail dot com
-Status: Feedback +Status: Open
 [2012-12-07 12:22 UTC] ab@php.net
Automatic comment from SVN on behalf of ab
Revision: http://svn.php.net/viewvc/?view=revision&revision=328704
Log: added a test for bug #63545
 [2012-12-07 12:25 UTC] ab@php.net
I've just added a test based on your code

http://svn.php.net/viewvc/pecl/apc/trunk/tests/bug63545.phpt?view=markup&pathrev=328704

but it passes for me on trunk. Could you test on trunk or at least on 3.1.13?
 [2012-12-07 12:25 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2012-12-07 16:09 UTC] kogarasi dot cross at gmail dot com
-Status: Feedback +Status: Open
 [2012-12-07 16:09 UTC] kogarasi dot cross at gmail dot com
can you check test on php 5.3.x?

I will check about trunk or 3.1.13 later.
possible... I check on php5.4.x too.
 [2012-12-07 20:27 UTC] ab@php.net
Oh, it'll not run on 5.3 as the built-in web server is used. Will check manually 
there.
 [2012-12-08 13:55 UTC] kogarasi dot cross at gmail dot com
I checked two case.

1. php 5.3.18 and apc 3.1.13 --- NG
2. php 5.4.8 and apc 3.1.13 --- OK
 [2012-12-10 08:37 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2012-12-10 08:37 UTC] ab@php.net
Tested explicitly with php 5.3.20, apc 3.1.13 and trunk - pass here. How exactly 
do you test that?
 [2013-02-18 00:36 UTC] pecl-dev at lists dot php dot 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.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 22:01:28 2024 UTC