php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59282 apc_fetch done value always return zero
Submitted: 2010-06-25 11:32 UTC Modified: 2013-02-18 00:35 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: vincentmartineau at free dot fr Assigned: kalle (profile)
Status: No Feedback Package: APC (PECL)
PHP Version: 5.3.1 OS: debian 5
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: vincentmartineau at free dot fr
New email:
PHP Version: OS:

 

 [2010-06-25 11:32 UTC] vincentmartineau at free dot fr
Description:
------------
$fileInformation = apc_fetch('upload_'.$_POST['keyFile']);
echo $fileInformation['done'];

value from $fileInformation['done'] is always 0 as 
$fileInformation['current'] return the corect value

So to know if the upload is complete, we need to compare 
$fileInformation['current'] against $fileInformation['total']




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-08-01 06:23 UTC] kalle@php.net
Could you try the following patch against apc-trunk:
Index: apc_rfc1867.c
===================================================================
--- apc_rfc1867.c	(revision 301754)
+++ apc_rfc1867.c	(working copy)
@@ -187,7 +187,7 @@
                 add_assoc_string(track, "name", RFC1867_DATA(name), 1);
                 add_assoc_string(track, "temp_filename", RFC1867_DATA(temp_filename), 1);
                 add_assoc_long(track, "cancel_upload", RFC1867_DATA(cancel_upload));
-                add_assoc_long(track, "done", 0);
+                add_assoc_long(track, "done", 1);
                 add_assoc_double(track, "start_time", RFC1867_DATA(start_time));
                 _apc_store(RFC1867_DATA(tracking_key), RFC1867_DATA(key_length), track, APCG(rfc1867_ttl), 0 TSRMLS_CC);
                 zval_ptr_dtor(&track);
 [2010-08-10 09:41 UTC] blueduck at free dot fr
Same issue for me.
 [2010-08-10 09:43 UTC] kalle@php.net
blueduck, could you try the patch aswell?
 [2010-08-11 01:43 UTC] blueduck at free dot fr
Well... never did a such thing, but if you can tell me the way, maybe I can try...
 [2010-08-14 12:30 UTC] kalle@php.net
I assume you have the patch program installed. Copy the patch code into a new file, e.g. /tmp/apc.patch.

Then cd into where you have the apc sources, and execute
patch < /tmp/apc.patch

then run make to re-build PHP & APC and you should be ready to go.
 [2013-02-18 00:35 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: Thu Apr 18 01:01:28 2024 UTC