PDA

View Full Version : memcache doesn't show up in phpinfo()


jautukas87
4th September 2008, 02:21
so i've installed memcached, and PECL but memcache doesn't seem to be showing up in phpinfo()

I've installed everything like shown in here, but can't make php.ini parse memcache.so, and also not sure where exactly should memcache.so be?

I'm using debian distro, my phpinfo() http://allofw.net/phpinfo.php

I also used these links as guides, they are very simila one to another.

http://www.lullabot.com/articles/how_install_memcache_debian_etch
http://ubuntuforums.org/showthread.php?t=440526
http://bipinb.com/?p=86

falko
4th September 2008, 17:01
You must add
extension=memcache.so
to /usr/local/lib/php.ini and restart Apache.

jautukas87
5th September 2008, 01:45
You must add
extension=memcache.so
to /usr/local/lib/php.ini and restart Apache.

The end of my php.ini file, which is located at /usr/local/lib/php.ini

[soap]
; Enables or disables WSDL caching feature.
soap.wsdl_cache_enabled=1
; Sets the directory name where SOAP extension will put cache files.
soap.wsdl_cache_dir="/tmp"
; (time to live) Sets the number of second while cached file will be used
; instead of original one.
soap.wsdl_cache_ttl=86400

; Local Variables:
; tab-width: 4
; End:
extension=memcache.so


To add:

1. I've reinstalled newer version of libevent-1.4.7-stable -- no errors.
2. I've also installed memcached-1.2.6 -- no errors.
3. Ran couple of tests with memcached, which worked -- no errors.

everything done exactly as at http://www.lullabot.com/articles/how_install_memcache_debian_etch

4. I've installed memcache-2.2.3 PECL:

JTP003:/usr/local/src/memcache-2.2.3# make
/bin/sh /usr/local/src/memcache-2.2.3/libtool --mode=install cp ./memcache.la /usr/local/src/memcache-2.2.3/modules
cp ./.libs/memcache.so /usr/local/src/memcache-2.2.3/modules/memcache.so
cp ./.libs/memcache.lai /usr/local/src/memcache-2.2.3/modules/memcache.la
PATH="$PATH:/sbin" ldconfig -n /usr/local/src/memcache-2.2.3/modules
----------------------------------------------------------------------
Libraries have been installed in:
/usr/local/src/memcache-2.2.3/modules



JTP003:/usr/local/src/memcache-2.2.3# make install
Installing shared extensions: /usr/local/lib/php/extensions/no-debug-non-zts-20060613/

I also have extension=memcache.so in php.ini

So everything should work ok now after restarting apache, but it doesn't.

Also I cannot find these files:
/etc/php5/conf.d/memcache.ini
/etc/php5/apache2/conf.d/memcache.ini
/etc/php5/cli/conf.d/memcache.ini

I think the problem is that php cannot find memcache.so

PS: i've just found this
JTP003:/usr/local/lib/php/extensions/no-debug-non-zts-20060613# ls
memcache.so

So now really dont know why it's not working.
Tried to search but everythere is same things written, i must be missing something really small.

Please help

falko
5th September 2008, 13:50
Can you try the full path in php.ini?
extension=/usr/local/lib/php/extensions/no-debug-non-zts-20060613/memcache.so

jautukas87
6th September 2008, 00:41
works perfectly, thanks a lot.