|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #62894 add preloaded binaries function for APC
Submitted: 2012-08-22 13:22 UTC Modified: 2016-11-18 21:24 UTC
From: cfc4n at cnxct dot com Assigned:
Status: Wont fix Package: APC (PECL)
PHP Version: 5.3.16 OS: ubuntu 12.04
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:
Bug Type:
From: cfc4n at cnxct dot com
New email:
PHP Version: OS:


 [2012-08-22 13:22 UTC] cfc4n at cnxct dot com
In my work,I need a function of apc to auto-load binary file. 

This binary file is dump of apc_bin_dump/apc_bin_dumpfile function. Because I 
want protect our php script source code. So I dump some of them to a binary 
file,and clear them scripts empty. 

I copy the binary file and empty php scripts file to an other server.  I must 
request a URI  to load binary file  use apc_bin_loadfile function when I use 

If php-fpm restart and call apc_clear_cache ,I must request the URI one by one 
If there are some php-fpm master process , I not sure who is I request one...
If I have some server... 
It's too hard to operation and maintenance.

So, I have this idea. pre-load binary file when php-fpm start and after 
apc_clear_cache called.

I talked  with laruence ( ) about this 
idea,He believes that this way is feasible. and I wish PHP Group can accept 

Test script:
dump script :

patch :

Expected result:
accept it.


add-preload-binary-file-function-to-apc-r327454 (last revision 2012-09-06 11:35 UTC by cfc4n at cnxct dot com)
add-preload-binary-file-function-to-apc (last revision 2012-08-22 13:25 UTC by cfc4n at cnxct dot com)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-09-06 11:34 UTC] cfc4n at cnxct dot com
There are many faults in previous path.Bin file will loaded multiple times(as num 
of fpm subprocess)when use php-fpm. So I give a new method to achieve it. That is 
storing an identifier in share memory identify whether loaded. If do that in 
PHP_MINIT_FUNCTION , It will not autoload when apc_clear_cache function called. 
So,I think this is a very appropriate way to achieve it.
and patch 
 [2016-11-18 21:24 UTC]
-Status: Open +Status: Wont fix
 [2016-11-18 21:24 UTC]
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: Mon Jul 22 15:01:29 2024 UTC