|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2012-11-12 08:46 UTC] cfc4n at cnxct dot com
Description: ------------ In apc extension,It can record file md5 hash value to help administrator to file info and version confirmation. But if you use apc_bin_dump(apc_bin_dumpfile) function to dump a binfile, And lode this binfile to php. Now get one file of them md5 hash with apc.php ,you'll see, They md5 hash was wrong... Test script: --------------- No test script. Expected result: ---------------- I gave a patch on https://github.com/cfc4n/cnxct/blob/master/apc_bin_filemd5.patch , I hope it can fix this bugs. Patchesapc_bin_filemd5.patch (last revision 2012-11-12 08:46 UTC by cfc4n at cnxct dot com)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 21:00:01 2025 UTC |
I'll dump test.php to a bin file with apc . And see md5 hash in result whit dump.php . But, It was a wrong md5 value of test.php in apc share memory when I load that bin file. (test.php was a example php file with any rightful codes...) All version of apc. apc.file_md5=1 /* ** dump.php ** dump a bin file named apc.bin */ $dir = dirname(__FILE__); apc_compile_file($dir.'/test.php'); apc_bin_dumpfile(array($dir.'/test.php'), array(), 'apc.bin'); var_dump(apc_cache_info()); /* ... ["cache_list"]=> array(2) { [0]=> array(12) { ["type"]=> string(4) "file" ["device"]=> int(0) ["inode"]=> int(0) ["filename"]=> string(17) "/home/cfc4n/test.php" ["md5"]=> string(32) "f33c672d79452462266841d1a68406a2" ["num_hits"]=> float(0) ["mtime"]=> int(1354085879) ["creation_time"]=> int(1354085879) ["deletion_time"]=> int(0) ["access_time"]=> int(1354085879) ["ref_count"]=> int(0) ["mem_size"]=> int(11600) } ... } ... */and load.php (sorry,I lose this file ) /* ** load.php ** load bin apc.bin file */ apc_bin_loadfile('apc.bin'); var_dump( apc_cache_info()); /* ... ["cache_list"]=> array(2) { [0]=> array(12) { ["type"]=> string(4) "file" ["device"]=> int(0) ["inode"]=> int(0) ["filename"]=> string(17) "/home/cfc4n/test.php" ["md5"]=> string(32) "00000000000000000000000000000040" ["num_hits"]=> float(0) ["mtime"]=> int(1354085879) ["creation_time"]=> int(1354085879) ["deletion_time"]=> int(0) ["access_time"]=> int(1354085879) ["ref_count"]=> int(0) ["mem_size"]=> int(11600) } ... } ... */