Skip to content

Instantly share code, notes, and snippets.

@maorpolak
Last active February 13, 2025 21:22
Show Gist options
  • Save maorpolak/678400fef1a81f2a72da4e23948e2075 to your computer and use it in GitHub Desktop.
Save maorpolak/678400fef1a81f2a72da4e23948e2075 to your computer and use it in GitHub Desktop.
Install Memcached for XAMPP on macOS
1. Install libmemcached with brew:
> brew install libmemcached
2. Install memcached with pecl:
- > sudo /Applications/XAMPP/xamppfiles/bin/pecl install memcached
- When prompted for the libmemcached directory, press 'Enter' and the installer will automatically find it.
3. Add the memcached extension to your php.ini file:
- > sudo vim /Applications/XAMPP/xamppfiles/etc/php.ini
- Add 'extension=memcached.so' to the file
4. Restart your Apache server (either use the GUI or run):
> sudo apachectl restart
5. Start memcached with brew:
> brew services start memcached
@ikechukwukalu
Copy link

sudo PHP_ZLIB_DIR=/opt/homebrew/opt/zlib LIBMEMCACHED=/usr/local/Cellar/libmemcached/1.0.18_2 /Applications/XAMPP/xamppfiles/bin/pecl install memcached

This worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment