APC Upload progress: apc_fetch return empty result
Posted: Tue Mar 29, 2011 1:44 pm
My initial task: work with file on server whilte it is uploading (for files > 300Mb).
System: MacOS X (10.6.6), Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/0.9.8l DAV/2 PHP/5.3.3, APC installed (apc_fetch() doesn't return any error).
In HTML I have:
PHP (test2.php) contain:
$status is always empty array. But after upload $_FILES contains correct file data.
APC settings:
APC Support enabled
Version 3.1.7
APC Debugging Enabled
MMAP Support Enabled
MMAP File Mask /Library/WebServer/Documents/mediagate/progressbar/tmp/apc.WdLqlh
Locking type File Locks
Serialization Support php
Revision $Revision: 307215 $
Build Date Mar 29 2011 15:59:31
apc.cache_by_default On On
apc.canonicalize On On
apc.coredump_unmap Off Off
apc.enable_cli On On
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 1M 1M
apc.mmap_file_mask /Library/WebServer/Documents/mediagate/progressbar/tmp/apc.WdLqlh /Library/WebServer/Documents/mediagate/progressbar/tmp/apc.WdLqlh
apc.num_files_hint 1024 1024
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.serializer default default
apc.shm_segments 1 1
apc.shm_size 128 128
apc.slam_defense On On
apc.stat On On
apc.stat_ctime Off Off
apc.ttl 7200 7200
apc.use_request_time On On
apc.user_entries_hint 4096 4096
apc.user_ttl 7200 7200
apc.write_lock On On
post_max_size and upload_max_filesize - 500M.
Help please!!))
System: MacOS X (10.6.6), Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/0.9.8l DAV/2 PHP/5.3.3, APC installed (apc_fetch() doesn't return any error).
In HTML I have:
Code: Select all
<form enctype="multipart/form-data" method="post" action="test2.php" id="myForm">
<input type="hidden" name="APC_UPLOAD_PROGRESS" id="progress_key" value="" />
<input type="file" id="test_file" name="test_file" value="upload" /><br/>
<input type="submit" value="Upload!"/>
</form>
Code: Select all
if($_SERVER['REQUEST_METHOD']=='POST') {
$status = apc_fetch('upload_'.$_POST['APC_UPLOAD_PROGRESS']);
$status['done']=1;
exit();
} else if(isset($_GET['progress_key'])) {
$status = apc_fetch('upload_'.$_GET['progress_key']);
exit();
}
$status is always empty array. But after upload $_FILES contains correct file data.
APC settings:
APC Support enabled
Version 3.1.7
APC Debugging Enabled
MMAP Support Enabled
MMAP File Mask /Library/WebServer/Documents/mediagate/progressbar/tmp/apc.WdLqlh
Locking type File Locks
Serialization Support php
Revision $Revision: 307215 $
Build Date Mar 29 2011 15:59:31
apc.cache_by_default On On
apc.canonicalize On On
apc.coredump_unmap Off Off
apc.enable_cli On On
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 1M 1M
apc.mmap_file_mask /Library/WebServer/Documents/mediagate/progressbar/tmp/apc.WdLqlh /Library/WebServer/Documents/mediagate/progressbar/tmp/apc.WdLqlh
apc.num_files_hint 1024 1024
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.serializer default default
apc.shm_segments 1 1
apc.shm_size 128 128
apc.slam_defense On On
apc.stat On On
apc.stat_ctime Off Off
apc.ttl 7200 7200
apc.use_request_time On On
apc.user_entries_hint 4096 4096
apc.user_ttl 7200 7200
apc.write_lock On On
post_max_size and upload_max_filesize - 500M.
Help please!!))