Enabling memcache on Mac OSX with stock apache and php5

I canโ€™t understand for life how I can enable memcache on Mac OSX to work with apache. I installed memcache and can verify that it works through the php command line.

Next command:

php --ri memcache

reports that memcache is supported.

However, if I download a local script test that runs phpinfo () in my browser, it does not report that memcahe is installed. Running a script in my browser that creates new reports of memcache objects:

Fatal error: Class โ€˜Memcacheโ€™ not found

I edited php.ini and added extensions = memcache.so

I restarted apache by going to "System Preferences"> "Sharing" and "Disable" and turn on "Web Access". I even tried restarting apache from the w / sudo apachectl restart command line.

, php memcache ?

!

+3
3

, , memcache.so, */no-debug-non-zts-*, ( Linux), php.ini . php.ini( ), memcache.so */no-debug-non-zts-*.

:

ln -s /usr/local/lib/php/extensions/no-debug-non-zts-20060613/memcache.so /usr/lib64/php/modules/memcache.so

, memcache.so , (755), :

chmod 755 /usr/local/lib/php/extensions/no-debug-non-zts-20060613/memcache.so

, , :)

+1

, , php mod_php php.ini.

0

memcache? ? memcached , ?

mac, , , , , .

, memcached Mac, , Mac memcached.

, memcached Mac - http://memcached.darwinports.com/

, php memcache , , memcache, . PHP, , memcache :

session.save_handler =
:
session.save_handler = memcache

session.save_path = "TCP://: 11211 = 1 & = 1 & = 1 & retry_interval = 2"

.

http://www.of-networks.co.uk

-1
source

Source: https://habr.com/ru/post/1708395/


All Articles