ОТН: [PHP-WIN] Utilizing the file cache on PHP 7.2
| From: | momchil at bojinov dot info | Date: | Tue, 05 Jun 2018 09:47:25 +0000 |
| Subject: | ОТН: [PHP-WIN] Utilizing the file cache on PHP 7.2 | ||
| References: | 1 2 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-31459@lists.php.net to get a copy of this message | ||
Hi again,
-----Първоначално съобщение-----
От: momchil@bojinov.info <momchil@bojinov.info>
Изпратено: Monday, June 4, 2018 9:47 AM
До: 'Anatol Belski' <ab@php.net>; 'php-windows@lists.php.net'
<php-windows@lists.php.net>
Относно: ОТН: [PHP-WIN] Utilizing the file cache on PHP 7.2
Hi,
-----Първоначално съобщение-----
От: Anatol Belski <weltling@outlook.de> От името на Anatol Belski
Изпратено: Sunday, June 3, 2018 8:19 PM
До: momchil@bojinov.info; php-windows@lists.php.net
Относно: RE: [PHP-WIN] Utilizing the file cache on PHP 7.2
Hi,
> -----Original Message-----
> From: momchil@bojinov.info <momchil@bojinov.info>
> Sent: Thursday, May 31, 2018 10:44 AM
> To: php-windows@lists.php.net
> Subject: [PHP-WIN] Utilizing the file cache on PHP 7.2
>
> Hello,
>
>
>
> I ran into a problem with the file cache with PHP 7.2.6
>
> I used to be able to predict the cache path
>
>
>
> .e.g
>
> opcache.file_cache=F:\SVN\xxx\5.2\cache
>
> opcache.file_cache_only=1
>
>
>
> That would result in the actual BIN files being stored here:
>
> F:\SVN\xxx\5.2\cache\cb30f97c420833336c52d76bb38c161\33f5bcdd9882d65b
> c27c038
> df49ec706\
>
>
>
> And with PHP 7.1 these would remain the same for every PHP sub
> version, regardless of the server it runs on
>
> Now with PHP 7.2 they will change if I run it on a different server
>
A couple of versions ago one more path segment has been added. Please check
zend_file_cache_get_bin_file_path() for more info. It affects 7.1, too.
Thus, even exporting the system_id to the PHP land wouldn't give a complete
solution. Hopefully that helps.
I'm not sure one should rely on how the path is put together. The system_id
will be different in every PHP build by version. As it's an internal detail,
it can change on demand and doesn't affect the user operation. The actual
change was needed for a bug fix.
Regards
Anatol
---------
I'm OK with it changing every build and every version as it will be handled
by packaging .. as long as I have a way of knowing it in advance
I was looking at the zend_file_cache.c when I submitted the bug. It was a
while back That bug is now invalid/pointless
I would love to have it work out of a sqlite database and have like a
handler interface for the cache, but that's pushing it I guess
Thank you Anatol
Regards,
Momchil
----------
I'm ditching the idea of using the file cache
It also used to be portable, but now the compiled files are looking for
includes that reside only on the system they were compiled on
That did not use to be the case
Momchil