note 108308 added to apc.configuration

From: Date: Mon, 16 Apr 2012 07:35:02 +0000
Subject: note 108308 added to apc.configuration
Groups: php.notes 
Request: Send a blank email to php-notes+get-187168@lists.php.net to get a copy of this message
I did some digging how to use the apc.preload_path settings works. The bad news is that for the current version it seems to be broken, but that will hopefully be fixed soon. If you can compile apc yourself (phpize->configure->make), you need to apply the following fix : - open the source file apc_main.c - search for the function : apc_load_data - change p = strrchr(key, '.'); into p = strrchr(key, '.')+1; - compile the source and copy the apc.so file to correct folder. If you assign a valid path to this setting, APC will move the contents of the files to the user entry cache. The files need to have the extension '.data' and the filename part will be the key of the APC entry, e.g "mykey.data" The contents needs to be the serialized string of the desired output. if you just echo(serialize(<contents>)) you will be show the correct format. For example a string 'test' will be s:4:"test"; (the semicolon is needed) If Apache starts, APC will look in the specified folder and will create a key called 'mykey' that contains the contents "test". If the files you create do not have the '.data' extension they will be ignored as well as file that have no valid contents. apc.preload_path cannot be used for preloading PHP scripts you would like to use. To precompile PHP files to be stored in APC, you need to create a script yourself and use 'apc_compile_file' to load all desired files to APC. You need to run this after the webserver has started. ---- Server IP: 69.147.83.197 Probable Submitter: 183.77.249.182 ---- Manual Page -- http://www.php.net/manual/en/apc.configuration.php Edit -- https://master.php.net/note/edit/108308 Del: integrated -- https://master.php.net/note/delete/108308/integrated Del: useless -- https://master.php.net/note/delete/108308/useless Del: bad code -- https://master.php.net/note/delete/108308/bad+code Del: spam -- https://master.php.net/note/delete/108308/spam Del: non-english -- https://master.php.net/note/delete/108308/non-english Del: in docs -- https://master.php.net/note/delete/108308/in+docs Del: other reasons-- https://master.php.net/note/delete/108308 Reject -- https://master.php.net/note/reject/108308 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#187168) next »