11

On windows 7 xampp 5.6.19 and symfony 2.8 dev environment configuration i was prompted "install and/or enable a php accelerator (highly recommended)". How to resolve this recommendation/warning?

Dung
  • 19,199
  • 9
  • 59
  • 54

1 Answers1

18

I found the answer to my question here: http://www.ivangabriele.com/php-how-to-install-php-accelerator-in-xampp/

here is instruction just in case the site goes away:

  1. to show you PHP configuration via the PHP function phpinfo()
  2. to get 2 precious informations :

    • architecture: x86 or x64?
    • TS (Thread Safe) or NTS (Non Thread Safe)?
  3. to download the corresponding DLL (including your PHP version): http://pecl.php.net/package/APCu/4.0.8/windows (PHP 7: https://pecl.php.net/package/APCu/5.1.17/windows)

  4. to copy/paste the DLL file within your extensions directory (C:\xampp\php\ext)

  5. to edit your php.ini file (i.e. within C:/xampp/php directory)

  6. to add this line inside Dynamic Extensions part :

    ;;;;;;;;;;;;;;;;;;;;;;
    ; Dynamic Extensions ;
    ;;;;;;;;;;;;;;;;;;;;;;
    
    [...]
    
    extension=php_apcu.dll
    
  7. finally, to restart Apache - done.

NOTE: It is php_apcu.dll not php_apc.dll and click on Windows icon for Windows versions https://pecl.php.net/package/APCu

Tested and works on Windows 10.

Dung
  • 19,199
  • 9
  • 59
  • 54
  • 3
    apc.enabled=1 apc.shm_size=32M apc.ttl=7200 apc.enable_cli=1 apc.serializer=php – hyena Sep 09 '16 at 12:30
  • Ends up with error "php_apcu.dll' - %1 is not a valid Win32 application.\r\n in Unknown on line 0" – fkabeer Sep 18 '17 at 14:40
  • In step 6, Please add the dynamic extension like below. extension=apcu Hopefully it will work fine :) – shery089 Dec 10 '18 at 19:19
  • For those that get error " %1 is not a valid Win32 application.", first check your php version with `php -v` and download a DLL that matches your version, e.g. mine says 7.2 & I have downloaded http://pecl.php.net/package/APCu/5.1.12/windows . If you have XAMPP try the x86 version download – Mansouri Jan 14 '19 at 15:48