Re: [PHP-DEV] A patch for APC harklinks problem

[email protected] (陈磊) Fri, 29 Apr 2011 08:56:23 +0800
Newsgroups php.apc.dev
Message-ID <[email protected]>
A bug about hardlink problem of APC:
http://pecl.php.net/bugs/bug.php?id=22673

thanks for Christopher's reply.

BRs,
Chen Lei

于 2011-4-29 1:48, Christopher Jones 写道:
> On 04/27/2011 08:18 PM, 陈磊 wrote:
>> The bug url:
>> http://pecl.php.net/bugs/bug.php?id=22673
> I would also suggest mailing apc-dev @ lists.php.net (even though there
> is likely to be a big overlap in readership with internals@).
>
> Chris
>
>> BRs,
>> Chen Lei
>>
>> 于 2011-4-27 18:34, Pierre Joye 写道:
>>> hi,
>>>
>>> Please report bug and patches to the pecl.php.net/apc bug tracker.
>>>
>>> Thanks for your work,
>>>
>>> Cheers,
>>>
>>> 2011/4/27 陈磊<[email protected]>:
>>>> Hi,
>>>>
>>>> I come from sae team of sina. We meet with a problem of APC harklinks
>>>> mentioned in the buglist of PHP and APC long time ago.
>>>>
>>>> The key word __FILE__ is a magic constants, and it is generated after the
>>>> php source code is compiled.
>>>> When the APC is used as a php extension for performence reason, the
>>>> compiling and executing are independent.
>>>> So, there are some problems. Please refer to the bug links:
>>>> http://bugs.php.net/bug.php?id=45421
>>>> http://pecl.php.net/bugs/bug.php?id=14055&thanks=3
>>>>
>>>> I thinks there shoule be a feature in PHP Runtime to get the current
>>>> executed file name at execute-time(not compile-time).
>>>> apc_auto_hardlinks_for_php_5.3.5.diff is a patch for PHP 5.3.5, and the
>>>> patch is to add a new key word "executed_filename".
>>>>
>>>> When the following code is running:
>>>>   <?php
>>>>   echo executed_filename;
>>>>   ?>
>>>>
>>>> In PHP Runtime, zend_get_executed_filename() is called to returne the
>>>> current executed file name and being displayed.
>>>>
>>>> To fixed the APC hardlinks problem, the other patch
>>>> auto_hardlinks_for_apc_3.1.6.diff must be used. The filename of
>>>> opcode array should be updated when both setting and getting get opcode
>>>> array to caches in APC.
>>>>
>>>> Hope the php patch should be reviewed and php runime will provide the way to
>>>> get current executed file name at
>>>> execute-time in the future.
>>>>
>>>> Thanks so much.
>>>>
>>>> BRs,
>>>> Chen Lei
>>>> [email protected]
>>>>
>>>> --
>>>> PHP Internals - PHP Runtime Development Mailing List
>>>> To unsubscribe, visit: http://www.php.net/unsub.php