Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

php_memcache.dll for 64 bit wampserver with either php 5.3.13 or 5.4.3

Okay, so far ive been googeling and trying to find a solution for over 6 hours. normally i dont post questions because i feel the answer should be findable, but here goes nothing.

I need to work with PHP code that has implemented the memcache class. I use wampserver 2.2 as 64 bit install, with apache 2.2.2, php 5.4.3 (installed 5.3.13 too, to see if i could fix it in that version) and mysql 5.5.24

i have run the memcache service with both the memcached-win64-1.4.4-14.zip link and the memcached-1.2.6-win32-bin.zip link

I am now at a point where the feedback from wampserver i get is the following when (re)starting the apache module -> mem_cache_module, using the answers from a similar thread on stackoverflow.com/questions/3894065/php-memcache-dll-vc6-x64), in combination with php 5.3.13 64 bit:

PHP Startup: memcache: Unable to initialize module Module compiled with module API=20090626 PHP compiled with module API=20100525 These options need to match

This is a lot further than i got with the other options, most (or all) results i can come up with seem to redirect to either a 32 bit dll (which i cant use since my wampserver is 64 bit) or with the wrong php version or api version (compilation date?) .. i do not think i am able to compile my own library to solve this.

I have added *extension=php_memcache.dll* to both php.ini files for both php versions and the dll files have been placed into the correct php/php5.x.x/ext/ folders of the wamp server

my assumption so far is that i need the php_memcache.dll compilated for 64 bit (x64) for php 5.3.13 on the 25th of may, 2010. That or i need to install a php version matching the binairy compiled on the 26th of june, 2009.

Do any of you have a soltion to my specific dillemma? Any help will be greatly appriciated.

like image 682
Erik Avatar asked Dec 08 '12 13:12

Erik


2 Answers

I tried all dlls and none worked but suddenly the one given in comment by falcontoast http://www.mediafire.com/?8d3vd26z3fg6bf1 did work.

Will be glad if it works for someone :).

One must check architecture of the phpversion from phpinfo() and must use corresponding dll file. Also the version for memcached service should be of same type.

Try following steps that might work for you. Yes it did work for me when I almost gave up.

1 - Close all memcached services if any already running.

2 - get this service memcached-win64-1.4.4-14(find it) and install it and then start.(the ways to install are already given out there).

3 - get the dll file in comment by falcontoast and put that in extension(ext) folder.

4 - do the changes in php.ini file.

5 - restart the wamp server(probably exit it and then again start it).

If everything is done properly, then the program given here https://commaster.net/content/installing-memcached-windows should work fine.

like image 191
Satys Avatar answered Oct 15 '22 05:10

Satys


Basically you need Memcache OR Memcached Library that match your PHP Executable. When I say match I'm not speaking of date but of code. The old PHP won't support new Memcache and vice-versa.

You can try to compile a special one just for your version of PHP (I tried once with other libraries it's not fun). Or you can find a version of PHP that would work with a version of Memcache but this new PHP will also need to work with your version of Apache...

After years of playing with that I just gave up and just used a unix system.

PS: Now that I think about it PHP already come with a correct version of Memcache... So your error may be just that you're using "new Memcached();" instead of "new Memcache();"

like image 36
zzarbi Avatar answered Oct 15 '22 04:10

zzarbi