I am working on a project with setup PHP7.3
, Drupal 6.4
with memcached
. Memcached is working in server and in my local machine with windows. But I am not able to make it work in my Mac
machine. I followed the below link to make this work.
https://www.journaldev.com/1/install-memcached-mac
And I tried
brew install memcached
Also.
Then added
[memcached]
extension="memcached.so"
In php.ini
file. Then restarted apache. After this on the first run I got the error
{"Error Details":{"Message":"n Error code : 32n Message : PHP Startup: Unable to load dynamic library ‘memcached.so’ (tried: /usr/local/lib/php/pecl/20180731/memcached.so (dlopen(/usr/local/lib/php/pecl/20180731/memcached.so, 9): image not found), /usr/local/lib/php/pecl/20180731/memcached.so.so (dlopen(/usr/local/lib/php/pecl/20180731/memcached.so.so, 9): image not found))n File name : Unknownn Line no : 0n Date :12-March-21 02:45:05n Path : http://localhost/mysite/?q="}}
But from the second run onwards the error is not there. But memcache is not working. And I can’t find the memcached.so file in my system.
How can I fix this? Please help
2
Answers
Have you remembered to start the service?
brew services start memcached
I tried this. It helps.
https://izziswift.com/how-to-install-memcached-module-for-php7-1-on-macos-high-sierra/
pecl bundle memcached
phpize
brew install libmemcached zlib
).brew list zlib
)../configure --with-zlib-dir=/usr/local/Cellar/zlib/1.2.11/
(replace the zlib path with the one from the previous command).make
make install
/usr/local/etc/php/7.4/conf.d
directory in a file calledext-memcached.ini
.php -m
should show you memcached in the outputted list.