php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58947 Apc_fetch doesn't return all values when upload is done
Submitted: 2009-11-12 06:09 UTC Modified: 2016-11-18 21:54 UTC
From: wahl31 at hotmail dot com Assigned:
Status: Wont fix Package: APC (PECL)
PHP Version: 5.2.5 OS: Gentoo
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: wahl31 at hotmail dot com
New email:
PHP Version: OS:

 

 [2009-11-12 06:09 UTC] wahl31 at hotmail dot com
Description:
------------
Hello,

APC is working good and the upload progress too.
The problem is when the upload is done.
It doesn't change the status of done, and it doesn't add 
cancel_upload and temp_filename.

It's like if the upload was still in progress but it's done.

The file is uploaded good, I can move it.

I'm stuck on this problem for hours, any help is appreciate.
ps: I'm french, sorry for my bad english.

-------------------------------------------------
CONFIG
-------------------------------------------------
Directive	Local Value	Master Value
apc.cache_by_default	On	On
apc.canonicalize	On	On
apc.coredump_unmap	Off	Off
apc.enable_cli	Off	Off
apc.enabled	On	On
apc.file_md5	Off	Off
apc.file_update_protection	2	2
apc.filters	no value	no value
apc.gc_ttl	3600	3600
apc.include_once_override	Off	Off
apc.lazy_classes	Off	Off
apc.lazy_functions	Off	Off
apc.max_file_size	10M	10M
apc.mmap_file_mask	no value	no value
apc.num_files_hint	1000	1000
apc.preload_path	no value	no value
apc.report_autofilter	Off	Off
apc.rfc1867	On	On
apc.rfc1867_freq	0	0
apc.rfc1867_name	APC_UPLOAD_PROGRESS	
APC_UPLOAD_PROGRESS
apc.rfc1867_prefix	upload_	upload_
apc.rfc1867_ttl	3600	3600
apc.shm_segments	1	1
apc.shm_size	64	64
apc.stat	On	On
apc.stat_ctime	Off	Off
apc.ttl	0	0
apc.use_request_time	On	On
apc.user_entries_hint	4096	4096
apc.user_ttl	0	0
apc.write_lock	On	On

Reproduce code:
---------------
<?php
if (isset($_GET['id']) && !empty($_GET['id'])) {
	header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
	header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
	header('Cache-Control: no-store, no-cache, must-revalidate');
	header('Cache-Control: post-check=0, pre-check=0', false);
	header('Pragma: no-cache');
	echo json_encode(apc_fetch('upload_'.$_REQUEST['id']));
	exit();
}
?>

Expected result:
----------------
{"total":115376,"current":115376,"filename":"test2.jpg","name"
:"options_24_file","done":0,"start_time":1258024004.89,"cancel
_upload":0,"temp_filename":"xxxxxxx","done":1,"rate":12345678}

Actual result:
--------------
{"total":115376,"current":115376,"filename":"test2.jpg","name"
:"options_24_file","done":0,"start_time":1258024004.89}

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-11-14 09:08 UTC] wahl31 at hotmail dot com
Hello,

One more information:
When an upload fails because of maximum file size exceeded, 
the apc_fetch returns well cancel_upload and all the stuff.

So the problem is only when an upload is ok, for the event 
file_end.

Thanks for your help.
 [2010-08-25 06:01 UTC] swuji at me dot com
I can confirm this bug... Using APC 3.1.4 with PHP 5.3.2 under 
Mac OS X (10.6.4).
 [2013-04-10 11:24 UTC] dam358 at hotmail dot fr
Hello,
this problem still exist, my progress bar don't progress at the end because the values current and done are not updated at the end.
 [2016-11-18 21:54 UTC] kalle@php.net
-Status: Open +Status: Wont fix
 [2016-11-18 21:54 UTC] kalle@php.net
APC is no longer supported in favor of opcache that comes bundled with PHP, if you wish to use the user cache, then look at PECL/APCu.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 06:01:35 2024 UTC