When I try to start Apache with
[PHP_APC]
extension = php_apc.dll
[apc]
apc.shm_segments=1
apc.optimization=0
apc.shm_size=128
apc.ttl=7200
apc.user_ttl=7200
apc.num_files_hint=1024
apc.mmap_file_mask=/tmp/apc.XXXXXX
apc.enable_cli=1
in php.ini, it fails. I have the php_apc.dll in the ext directory.
Using Apache 2.2.17 and PHP 5.2.14 on Windows 7 x64.
Any suggestions?
After trying a lot of solutions, I found one that worked for me... so I am going to post this as an answer just to help people that may have the same problem finding the correct version to use.
I am using Windows 7 32bits, PHP 5.3.13, Apache 2.2.22, and the php_apc.dll found in the file apc-igbinary-fastlz-snap20110301-5.3-ts-vc9-x86.zip in this site: http://downloads.php.net/pierre/
I have registered the extension by just pasting the following code to the end of php.ini file:
[PHP_APC]
extension=php_apc.dll
Then I checked the result of phpinfo(), by using this php file:
phpinfo.php
<?php phpinfo(); ?>
Best bet, due to the limited windows PECL support atm, is to install Zend Server CE w/ PHP 5.3. You can have it install itself on IIS or Apache on the windows machine. Zend Server comes with APC built in (As well as many other PHP modules missing from the current 5.3 PECL stack).
As a side note, you could probably (I haven't tested this so...is just a possibility) install the server, "steal" the dlls, and install PHP however you like w/o zend server. BUT, that said, Zend server is actually pretty nice :)
Fixed. Was using the wrong version of APC.
when on Windows use APC VC6 from here
http://downloads.php.net/pierre
Related
I’ve been trying to install apc on wamp 2.2 on a windows 7 x64 to no avail. I downloaded php_apc without memprotect and was able to select it in the task switcher on wamp, I also added the extension and the following:
[APC]
apc.enabled = 1
apc.shm_segments = 1
apc.shm_size = 64M
apc.max_file_size = 10M
apc.stat = 1
to php.ini, next, downloaded apc.php from http://svn.php.net, but my phpinfo() file doesn’t show apc no matter what I do, and apc.php says it isn’t running.
I've read about wamp being built on vc6 but on pierre's php extensions page I can't find any vc6 version anymore, plus I have php5.4.3 with the MSVC9 (Visual C++ 2008) compiler, so I figure I must not install a vc6 version. But I can't find any information about wamp and alternative php cache (thats the full name!). All the pages where I've read about it make it seem very simple, but I can't make it work. I need apc to deal with the nicEdit image uploading, by the way. Any help would make me very, very happy!
Also, I notice a couple of things, many posts right here on this forum say that apc is not supported by php 5.4, and on other posts people say that for windows we should use vc6 versions either of php or its extensions. The thing is I'm using wamp as I said, and don't want to go through the process of installing php and apache independently. Even if I did, then what dll should I download (after searching a lot, as pecl doesn't provide dlls), also considering that I can't afford for a server other than apache and it is recommended not to install any vc9 version of php with apache's binaries?
Again, any help is greatly appreciated.
Think I finally got it, #eis you were right about installing the correct x64bit extension. I downloaded the correct one from the list of extensions hosted in mediafire on this http://www.anindya.com/php-5-4-3-and-php-5-3-13-x64-64-bit-for-windows/ site. Now I can see apc is installed on phpinfo();
Thanks and goodbye.
Will keep posting about the usage of apc though.
As a resolution - the dlls on pierres page seem to be 32-bit (x86). Since you have a 64-bit server, you need either a 64-bit dll, or switch to a 32-bit server installation.
The anindya.com page had a link to 64-bit extensions.
I have found plenty of tutorials covering how to install memcache in Windows and install the PHP extension. My situation though is slightly unusual:
I'm using iis, not apache.
I don't need to install memcache on the server (it has its own dedicated server already setup). I ONLY need to install the extension.
I thought I simply needed to add the PHP_memcache.dll extension to the PHP extension folder and add it to PHP.ini
This causes an error loading the PHP module (unable to load dynamic library).
Is this error likely to be caused because memcache isn't installed on the server and what can I do to solve it?
Errors while loading extensions in Windows are not as helpful as they are in Linux, so you need a tool like dependency walker to fish out the problem.
http://www.dependencywalker.com/
If you are using XAMPP on Windows you probably have installed the 32bit-XAMPP version.
So make sure you are using the 32bit (x86) DLL of Memcache.
The DLL download List for windows can be found here: http://pecl.php.net/package/memcache/3.0.8/windows
I tried to install APC on my wamp(PHP 5.3.10/Apache2.2.21). OS which i`m using is Windows 7.
I downloaded 'APC 3.1.9 for PHP 5.3 vc9 (Win7/2008)' dll from http://dev.freshsite.pl/php-accelerators/apc.html.
I copied php_apc.dll to wamp/php/5.3.10/ext and I added extension=php_apc.dll to php.ini file.
phpinfo() don`t display APC configuration, and APC is not working.
phpinfo() values Compiler:MSVC9, Architecture:x86, Enabled for Thread Safety.
Thank you
Check out this guide it solved the problem for me.
http://mnshankar.wordpress.com/2011/03/25/installing-apc-3-1-6-on-wamp-64-bit/
You can see why here:
http://forum.wampserver.com/read.php?2,70601
I did absolutely everything what is written in here: http://www.leonardaustin.com/technical/how-to-install-memcached-on-xampp-on-windows-7
I see now in task manager that memcache server is running, I refreshed apache and so on, but I still get an error Class 'Memcache' not found.
What should I do? Maybe there is an error in the tutorial?
I am on the Vista 32
The error indicates that memcache extension is not loaded. Make sure to "extension=php_memcache.dll" in php.ini points to the actual location of the file, and to restart your httpd server afterwards.
I just downloaded the newest version of XAMPP and it works. So, don't forget to update to the newest version of XAMPP.
I had the same problem for 3 hours. I finally installed the DLL for VC6 not 9 and that worked great. For Windows 7, 32bit. file: php_memcache-cvs-20090703-5.3-VC6-x86
Make sure your PHP in x86 or x64, (NOT Your Windows)
On this screen, php_info() tells Windows is 64bit, but PHP is on x86, so you should choose x86 dll
Choose correctly package to download and install should solve your problems
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.
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/
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.
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.
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.
There's no available version for php > 5.4.
I'm using APCu instead. Just download the dll and reference it in php.ini.
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