WinCache for PHP8 pre-build available

Andergraund 0 Reputation points
2023-06-05T17:43:17.75+00:00

There are some old threads asking for WinCache for PHP 8. Maybe this will help someone.

Here is a pre-build DLL of WinCache 2.0.0.8 extension compiled for PHP 8.0.28 (VS16 x64 Non Thread Safe).
Seems to compile and run fine without any changes.

https://github.com/mercchen/pecl-caching-wincache/releases/tag/2.0.0.8


How to compile the stuff for yourself, basically follow the guide at:
https://wiki.php.net/internals/windows/stepbystepbuild_sdk_2

Here are some information to make it easier to follow the guide.

Download the source here - we need to use the PHP7 fork:
https://github.com/php/pecl-caching-wincache/tree/WinCache_PHP7

Download the source of PHP8.0.xx here:

https://windows.php.net/download/

I used and compiled for PHP 8.0.28 (VS16 x64 Non Thread Safe).

When installing VS Community 2019 choose the following 3 packages:
User's image

In English this should be something similar to .NET for Desktop, C++ for Desktop and Dev for universal Windows. The PHP SDK Binary Tools documentation says:
Visual C++ 2017 or Visual C++ 2019 must be installed prior SDK usage. Required components

  • C++ dev
  • Windows SDK
  • .NET dev

When you did follow the steps in the guide and are ready to compile your own extension, I did use the following minimalistic configuration:
configure --disable-all --enable-cli -–enable-wincache –-enable-session –-disable-zts

After running nmake your phpcache.dll should be in:
PathToYourPHPDevFolder\vc15\x64\php-8.0.28-src\x64\Release

Internet Information Services
{count} votes

2 answers

Sort by: Most helpful
  1. Andergraund 0 Reputation points
    2023-06-10T17:41:10.7266667+00:00

    @Anonymous I see, thanks for the comment. I've added the process how to compile the DLL.

    0 comments No comments

  2. Mike Lu 5 Reputation points
    2024-06-29T08:00:01.7+00:00

    Some good news here. In April I contacted the PECL to promote myself as the lead of WinCache in order to upstream the patch I developed for PHP 8.1+ when I was working at the university. Before this, I also contacted the PhpTools.online team who maintains a binary build and distribution platform. They confirmed my patch to be working. I finally uploaded my release as 2.0.0.9-beta yesterday on https://pecl.php.net/package/wincache and I believe you will soon be able to download a binary release (visit the homepage URL shown on the above site). I am open to issues and queries (also from Microsoft if there has been an issue in the copyright modifications/project ownership transfer process) here on this forum. I'll also try to ask the guys from PHP to reopen the issues section of this project on GitHub (which is also listed on the above site under Browse Repo).


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.