How to install apcu in windows

前端 未结 5 1164
难免孤独
难免孤独 2020-12-08 00:42

How can I install APCu in Windows?

I found this. But I need a solution for Windows.

I use PHP 5.5.6 (I have the XAMPP package).

5条回答
  •  佛祖请我去吃肉
    2020-12-08 01:34

    For those who want APCu with backward APC compatibility (1:1 replacement without changing codebase, for example apc_cache_info > apcu_cache_info)

    1. Download php_apcu.dll from release page (choose proper PHP version, architecture and thread safety mode)

    2. Download php_apcu_bc.dll from PECL

    3. Save both files in ext dir under your PHP installation folder

    4. Load extensions in php.ini:

      extension=php_apcu.dll
      extension=php_apcu_bc.dll
      
    5. Configure APCu in php.ini

      [APCu]
      apc.enabled=1
      apc.shm_size=32M
      apc.ttl=7200
      apc.enable_cli=1
      apc.serializer=php
      

    INFO: APC extension with APCu-BC 1.0.3 must be named exactly php_apcu.dll in order to work. When I named it php_apcu_bc-1.0.3-7.1-ts-vc14-x86.dll XAMPP did not start properly (error about missing php_apc.dll)

    Additional Note: the downloaded zip file from the source above for vc15 contained a file named php_apc.dll (in file: 'php_apcu_bc-1.0.4-7.2-ts-vc15-x86.zip' date: 13/06/2018) - just renaming it to php_apcu_bc.dll worked.

提交回复
热议问题