Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
603 views
in Technique[技术] by (71.8m points)

php - How to install apcu in windows

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).

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

This short and straight to the point tutorial should help you

Install APCu on Windows

Assumptions

  • I assume that you know what is APC - Alternative PHP cache
  • You want to install APCu because APC is not compatible anymore with PHP 5.5.x
  • You want to install APCu for wamp, xampp. Mostly windows web development platforms for PHP

Instructions

Pre: All directory locations might be different for you depending on your wamp installation folder and your PHP/apache versions.

  1. Go to http://pecl.php.net/package/APCu, there is a table with available releases
  2. Choose whatever release suits you better (latest stable version that supports your php version)
  3. Choose package from DLL list, depending on what Windows you are using:
    • PHP version (5.5 in your case)
    • x64 (64 bits) OR x86 (32 bits windows)
    • Thread Safe (for Apache compatibility)
  4. Unzip the archive, copy php_apcu.dll in C:wampinphpphp5.5.6ext.
  5. Go to C:wampinapacheapache2.4.9in open php.ini and add the following lines (I just added them at the end of the file):

    [apcu]
    extension=php_apcu.dll
    apc.enabled=1
    apc.shm_size=32M
    apc.ttl=7200
    apc.enable_cli=1
    apc.serializer=php
    

    This are recommended configurations located in INSTALL file from the php_apcu archive, excepting the location of the DLL file.

  6. Restart wamp

  7. Go to http://localhost/phpinfo.php and check if apcu configuration table appears and apcu is enabled
  8. If you also want to use apcu for PHP CLI then you only need to add in C:wampinphpphp5.5.6inphp.ini the config lines you added at step 5 in apache's php.ini.

The end!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...