I have tried virtually everything I could for the last 3 hours. I just don't seem to get it to load on PHP. I was able to install it via brew install memcached
and successfully make run it as a background service via memcached -d
. But that's not really what I am looking for.
I am looking at loading it as one of my PHP modules. Running php -m
on the terminal does not list memcached
on it at all. Neither looking at phpinfo()
or print_r(get_loaded_extensions());
on runtime gave me any luck. I am trying to officially access it in my project via something like extension_loaded('memcached')
, of course, this returns a falsy value atm.
I have tried solutions like below:
How to install memcached module for php@7.1 on MacOS High Sierra?
https://donatstudios.com/OS-X-Mavericks-Memcached-PHP-Extension-Installation
Can I install the memcached PHP extension with PECL?
Most of the solutions are similar to the above linked. Unfortunately, this isn't working for me because of an issue similar to this:
Unable to use PHPIZE after update to MacOS Mojave
I also get below error when executing a make
command:
make: *** No targets specified and no makefile found. Stop.
And the below error when running ./configure
checking for session includes... configure: error: Cannot find php_session.h
Meanwhile, I also cannot attempt an install via pecl install memcached
due to the error below:
configuration download directory "/tmp/pear/install" is not writeable. Change download_dir config variable to a writeable dir to avoid this warning
Basically everything just doesn't work. And honestly, I didn't even know how to start writing this question, so I'm just kinda throwing everything in here.
It doesn't help that there are no recent discussions about installing memcached on PHP since Catalina. A lot of resources are just 5 years old and that's not a good sign, a number of them aren't even valid solutions anymore.
I am losing my mind. Why this thing is so complicated to configure is beyond my comprehension. If someone can point me in the right direction that would be great!