Install APC on Windows
Asked Answered
E

6

16

How can I install APC on Windows? I am using PHP 5.3, Windows 7 x64.

I used

pecl install apc

I got

C:\PHP>pecl install apc
downloading APC-3.0.19.tgz ...
Starting to download APC-3.0.19.tgz (115,735 bytes) ............
done: 115,735 bytes 47 source files, building
WARNING: php_bin c:\php\php.exe appears to have a suffix \php.exe, but config
    variable php_suffix does not match running: msdev APC.dsp /MAKE "APC - Release"
ERROR: Did not understand the completion status returned from msdev.exe.
Escapade answered 13/3, 2010 at 8:25 Comment(1)
Sounds like this one should be migrated to superuser.Reedbuck
D
24

Installing an extension with the pecl command means :

  • downloading the sources
  • compiling them

And, generally speaking, a windows machine doesn't have what's required to compile software like PHP and/or PHP extensions.


A better / easier solution, in your case, would probably be to find a pre-compiled .dll of the extension, that matches your system and your version of PHP.

With a bit of luck, maybe one of the versions provided on http://downloads.php.net/pierre/ could be OK ?
(It's what kind of acts as replacement of the old pecl4win, until the extensions for windows are available on windows.php.net)

For more informations about which version you should use, take a look at the Which version do I choose? section, in the left side-bar of http://windows.php.net/

Dormie answered 13/3, 2010 at 10:48 Comment(3)
hmm even i am tryin to install APC for a magento project. First on a windows localhost and then on production server.Raposa
new URL : windows.php.net/downloads/pecl/releases/apc/3.1.14 YOu can replace 3.1.14 with the latest version or dev.freshsite.pl/php-accelerators/apc.htmlAbscissa
^ none of which are valid anymoreTellurize
R
4

It is not really important, whether you are running Windows 32-bit or 64-bit version. What matters is what Apache (webserver) version you have installed (32/64). Since lots of PHP extensions (like APC) are not available for 64-bit systems, most common setup is as follows:

  • Operating system 32 or 64-bit (not really important). Apache 32-bit will run easily on Windows 64-bit. The difference is, that for 32-bit apache you MUST install PHP 32-bit. Once you install 64-bit PHP, you may find difficult to install some extensions - there are almost no extensions available for 64-bit PHP platform.

  • therefore your webserver should be 32-bit if you care about special extensions, like APC, Imagick etc... Also you need to know if your apache is thread safe (TS) or not thread safe (NTS) and whether it has been compiled in Visual Studio 6 (VC6) or newser Visual Studio 2008 (VC9). You will easily find all this info from phpinfo() function.

  • as for the APC, some nice compilation for Windows are available from http://dev.freshsite.pl/php-accelerators/apc.html.

Ruthful answered 21/12, 2012 at 15:29 Comment(0)
J
3

For php 5.3 you use php.net/pierre/php_apc-3.1.10-5.3-vc9-x86.zip.

Download it and copy php_apc.dll to your php ext directory. (I choose the file under ts I have thread safe php installation. There is also an apc dll file for non thread safe.)

Add extension=php_apc.dll into your php.ini file

Restart your web server

Run phpinfo() to see if it's installed or not.

I am using php 5.4 and I downloaded php.net/pierre/php_apc-3.1.10-5.4-vc9-x86.zip and its working fine.

Hope this will help mate.Good luck.

Jauch answered 22/10, 2013 at 6:34 Comment(0)
J
1

Also, make sure that the compiled version from here http://downloads.php.net/pierre/ matches your php version, otherwise the extension will not load (php v. 5.2.17 requires php_apc.dll v 5.2.17.17 - which doesn't seem to be available as of this writing - I had to downgrade the php version to play with apc).

Another point, pierre's zip packages, at least the one I downloaded, did not include the management script. you can get it from here: http://pecl.php.net/package/APC - select the version you downloaded, then navigate to Browse Source, then find your version in the 'tags' folder. the apc.php script should be there.

Jeggar answered 1/6, 2011 at 21:42 Comment(0)
D
1

There's no available version for php > 5.4. I'm using APCu instead. Just download the dll and reference it in php.ini.

Downes answered 26/2, 2016 at 11:51 Comment(0)
H
0

This website offers updated dll and installers for Apache, PHP and APC compiled to work on windows 64 bit. I've been using it for a while and it works fine. You could an APC version compatible with PHP 5.3.22 here

Harbot answered 14/7, 2013 at 6:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.