majksner / php-memcached-mamp Goto Github PK
View Code? Open in Web Editor NEWPecl Memcached Extension for MAMP 3.x
Home Page: http://majksner.com/
Pecl Memcached Extension for MAMP 3.x
Home Page: http://majksner.com/
Is there any chance we could get a .so file compiled for 5.4.4? That would be a huge help!
Thanks!
I used MAMP PRO 3.0.4.
phpinfo view ok,but php can't works.
error info:
Fatal error: Class 'Memcache' not found in /Users/aa/web/jk/public/test.php on line 9
test.php
$memcache = new Memcache; // <=== this line 9
$memcache->connect('localhost', 11211) or die ("Could not connect");
$memcache->set('key', 'test');
$get_value = $memcache->get('key');
echo $get_value;
While the extension is available, and after also including igbinary
I found out that I also need 'msgpack.so'.
I'm not sure how others have got Memcached to work with MAMP 4 on PHP 7.1. But I would love it if you revived the project :)
Cheers!
How can we trust that these binaries are clean, and nothing iffy with them?
I've got the following error with MAMP 3.4:
PHP Warning: PHP Startup: Unable to load dynamic library '/Applications/MAMP/bin/php/php5.6.10/lib/php/extensions/no-debug-non-zts-20131226/memcached.so' - dlopen(/Applications/MAMP/bin/php/php5.6.10/lib/php/extensions/no-debug-non-zts-20131226/memcached.so, 9): no suitable image found. Did find:
/Applications/MAMP/bin/php/php5.6.10/lib/php/extensions/no-debug-non-zts-20131226/memcached.so: unknown file type, first eight bytes: 0x0A 0x0A 0x0A 0x3C 0x21 0x44 0x4F 0x43 in Unknown on line 0
Hi,
brew install memcached
Gives me the error:
==> Installing memcached dependency: libevent
==> Downloading https://downloads.sourceforge.net/project/levent/libevent/libevent-2.0/libevent-2.0.22-stable.tar.gz
curl: (22) The requested URL returned error: 404 Not Found
Error: Failed to download resource "libevent"
Download failed: https://downloads.sourceforge.net/project/levent/libevent/libevent-2.0/libevent-2.0.22-stable.tar.gz
and
brew install libmemcached
Gives me the error:
==> Installing dependencies for libmemcached: libevent, memcached
==> Installing libmemcached dependency: libevent
==> Downloading https://downloads.sourceforge.net/project/levent/libevent/libevent-2.0/libevent-2.0.22-stable.tar.gz
curl: (22) The requested URL returned error: 404 Not Found
Error: Failed to download resource "libevent"
Download failed: https://downloads.sourceforge.net/project/levent/libevent/libevent-2.0/libevent-2.0.22-stable.tar.gz
Is there another way to install these dependencies?
Tried installing followed directly correctly, I believe, and having an error I can't figure out. When starting up MAMP I get this:
PHP Warning: PHP Startup: Unable to load dynamic library '/Applications/MAMP/bin/php/php5.3.14/lib/php/extensions/no-debug-non-zts-20090626/memcached.so' - dlopen(/Applications/MAMP/bin/php/php5.3.14/lib/php/extensions/no-debug-non-zts-20090626/memcached.so, 9): Library not loaded: /usr/local/lib/libmemcached.10.dylib
Referenced from: /Applications/MAMP/bin/php/php5.3.14/lib/php/extensions/no-debug-non-zts-20090626/memcached.so
Reason: image not found in Unknown on line 0
First I thought I'd put memcached.so in the wrong place but it's definitely there. Have you run across this before?
If you are having these Apache errors:
Warning: PHP Startup: Unable to load dynamic library '/Applications/MAMP/bin/php/php5.3.14/lib/php/extensions/no-debug-non-zts-20090626/memcached.so' - dlopen(/Applications/MAMP/bin/php/php5.3.14/lib/php/extensions/no-debug-non-zts-20090626/memcached.so, 9): Library not loaded: /usr/local/lib/libmemcached.10.dylib
Referenced from: /Applications/MAMP/bin/php/php5.3.14/lib/php/extensions/no-debug-non-zts-20090626/memcached.so
Reason: image not found in Unknown on line 0
The reason is twofold:
chris@floyd $ echo $DYLD_LIBRARY_PATH
chris@floyd $ export DYLD_LIBRARY_PATH=/usr/local/lib/
chris@floyd $ echo $DYLD_LIBRARY_PATH
/usr/local/lib/
After following install directions I received this error in the log:
[03-Feb-2013 17:05:03 UTC] PHP Fatal error: Class 'Memcache' not found in /Users/johnmeah/AWS/memreasdev/s3_jquery/public/mamp_memcached_test.php on line 2
[03-Feb-2013 17:15:13 UTC] PHP Warning: PHP Startup: Unable to load dynamic library '/Applications/MAMP/bin/php/php5.4.4/lib/php/extensions/no-debug-non-zts-20100525/“memcached.so”' - dlopen(/Applications/MAMP/bin/php/php5.4.4/lib/php/extensions/no-debug-non-zts-20100525/“memcached.so”, 9): image not found in Unknown on line 0
The first error is from a simple php i found below (note: I'm new to memcached so I'm not sure if this is the right code to test):
connect('127.0.0.1', 11211) or die ("Could not connect"); //connect to memcached server $mydata = "i want to cache this line"; //your cacheble data $memcache->set('key', $mydata, false, 100); //add it to memcached server $get_result = $memcache->get('key'); //retrieve your data var_dump($get_result); //show it ?>Note: I'm running 64bit Mac.
Am I missing something?
Thanks,
-J
Can you compile .so file for php version 7.0.0?
Thanks!
I followed every step, memcached is not loaded in phpinfo... Any ideas? Thanks
here is the log
Reason: image not found in Unknown on line 0
[01-Oct-2015 22:44:36 Asia/Shanghai] PHP Warning: PHP Startup: Unable to load dynamic library '/Applications/MAMP/bin/php/php5.6.10/lib/php/extensions/no-debug-non-zts-20131226/memcached.so' - dlopen(/Applications/MAMP/bin/php/php5.6.10/lib/php/extensions/no-debug-non-zts-20131226/memcached.so, 9): Library not loaded: /usr/local/lib/libmemcached.11.dylib
Referenced from: /Applications/MAMP/bin/php/php5.6.10/lib/php/extensions/no-debug-non-zts-20131226/memcached.so
Hi I tried your instructions but I get following error in my log
/Applications/MAMP/bin/php/php5.6.7/lib/php/extensions/no-debug-non-zts-20131226/memcached.so: unknown file type, first eight bytes: 0x0A 0x0A 0x0A 0x3C 0x21 0x44 0x4F 0x43 in Unknown on line 0
I presume it's because I tried your php 5.6.2 memcached.so while I would need a 5.6.7 version.
I tried doing it manually (with make etc) but I soon got stuck way over my head, needing to add components like php_session.h etc...
How can I make this work for MAMP 3.2.1 with PHP 5.6.7?
Thank you in advance
In step 2 the instructions say to open MAMP and click File -> Template, etc...
However MAMP does not in fact have a File Menu:
These instructions seem to be for the 'PRO' version of MAMP, without ever actually mentioning it.
For non-PRO users, I would like to suggest that this is clarified, and that you add a sentence stating that non-Pro users just need to manually edit their ini files (found in Applications/MAMP/bin/php/php5.x.x/conf/php.ini
hi there,
i hope its ok to mention this here
i followed the steps you provided,
my brew list is
drush libevent libmemcached memcached wget
i double checked my php.ini and copied the extension file and restarted but in phpinfo() there is no extension and i cant
new Memcached();
how to test?
can there be a $PATH issue ..
what am i missing
thnx
Any chance to get a memcached.so file for 5.4.10?
I right-click and save the memcached.so file from php5.3.14, save it into the Applications/MAMP/bin/php/php5.3.14/lib/php/extensions/no-debug-non-zts-20090626 folder, but get this in the php log when I start the server:
PHP Warning: PHP Startup: Unable to load dynamic library '/Applications/MAMP/bin/php/php5.3.14/lib/php/extensions/no-debug-non-zts-20090626/memcached.so' - dlopen(/Applications/MAMP/bin/php/php5.3.14/lib/php/extensions/no-debug-non-zts-20090626/memcached.so, 9): no suitable image found. Did find:
/Applications/MAMP/bin/php/php5.3.14/lib/php/extensions/no-debug-non-zts-20090626/memcached.so: unknown file type, first eight bytes: 0x0A 0x0A 0x0A 0x3C 0x21 0x44 0x4F 0x43 in Unknown on line 0
After running the two brew install command lines in the dependencies section, where do I find the memcached.so file for the first line of the installation instructions?
Hi,
Is MAMP 2.1.1 supported?
This is what I have installed:
autoconf libevent libmemcached memcached
Thanks!
works great with my previous version of MAMP 2 (php 5.6.x)
but not with current release of MAMP 3.
i put the extension=memcached.so
after all extensions (instead of end of php.ini
)
like this :
; Extensions
;extension=apcu.so
;extension=apc.so
extension=imap.so
;extension=yaz.so
extension=mcrypt.so
extension=gettext.so
extension=pgsql.so
extension=pdo_pgsql.so
;extension=imagick.so
;extension=tidy.so
;extension=oauth.so
extension=memcached.so
Apache starts, but php return an error Fatal error: Uncaught Error: Class 'Memcached' not found
I see that this repository is updated when MAMP comes out with a new version.
How about a script that automates the installation/update process?
A script could check MAMP's bin/
folder for versions of php and copy the corresponding memcached.so files into the right place. It could also search for and add the required lines to the php.ini files if they dont exist -- this could be done for php.ini files in both MAMP as well as MAMP Pro (which stores them in a separate place).
Here is the message I receive after downloading the memcached.so
file and placing it in the appropriate folder, then adding the module reference to php.ini
(MAMP 3.5 is that the issue?):
PHP Startup: Unable to load dynamic library '/Applications/MAMP/bin/php/php5.6.10/lib/php/extensions/no-debug-non-zts-20131226/memcached.so' - dlopen(/Applications/MAMP/bin/php/php5.6.10/lib/php/extensions/no-debug-non-zts-20131226/memcached.so, 9): no suitable image found. Did find:
/Applications/MAMP/bin/php/php5.6.10/lib/php/extensions/no-debug-non-zts-20131226/memcached.so: unknown file type, first eight bytes: 0x0A 0x0A 0x0A 0x0A 0x3C 0x21 0x44 0x4F in Unknown on line 0
Do you know what may be happening?
Enable the use of igbinary (./configure –enable-memcached-igbinary) to serialize objects.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.