RE: [PHP-WIN] Utilizing the file cache on PHP 7.2
| From: | Anatol Belski | Date: | Sun, 03 Jun 2018 17:19:04 +0000 |
| Subject: | RE: [PHP-WIN] Utilizing the file cache on PHP 7.2 | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-31457@lists.php.net to get a copy of this message | ||
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