Ask your Symfony questions! Pay money and get answers fast! (more info)

appDevDebugProjectContainer.php points to wrong Memcache class Symfony

I am working on a project that was built with Symfony 2.0 and then later it was partially upgraded to 2.1, at least in the sense that it now uses composer.phar to manage dependencies.

But if I go here with my browser:

http://iws.d/app_dev.php

(which is mapped to localhost and then a particular directory) I get:

Fatal error: Class 'Memcache' not found in /Users/lk/projects/bonsai/internal-web-service/app/cache/dev/appDevDebugProjectContainer.php on line 1110

If I do this:

grep -iR "class Memcache" *

I get:

common/src/Evo_Green/Component/Routing/Storage/MemcacheStorage.php:class MemcacheStorage implements StorageInterface

common/tests/Evo_Green/Component/Routing/Storage/MemcacheStorageTest.php:class MemcacheStorageTest extends \PHPUnit_Framework_TestCase

pagebuilder/root/platform/lib/task/memcacheFlushTask.class.php:class memcacheFlushTask extends sfBaseTask

vendor/doctrine/common/lib/Doctrine/Common/Cache/MemcacheCache.php:class MemcacheCache extends AbstractCache

vendor/doctrine/common/tests/Doctrine/Tests/Common/Cache/MemcacheCacheTest.php:class MemcacheCacheTest extends CacheTest


There is no class that matches.

If I look here:

bonsai/iws/app/config/parameters.ini

I see:

orm_cache_type = memcache
orm_cache_host = memcache01
orm_cache_port = 11211
orm_cache_instance_class = Memcache
orm_cache_class = Doctrine\Common\Cache\MemcacheCache

Clearly, the "Memcache" looks like an error. But if I change it to a class that exists:

orm_cache_instance_class = MemcacheCache

I get:

Fatal error: Class 'MemcacheCache' not found in /Users/lk/projects/bonsai/internal-web-service/app/cache/dev/appDevDebugProjectContainer.php on line 1110

That is a surprise, since such a file does exist.

If I open appDevDebugProjectContainer.php, then I see:>


/**
* Gets the 'doctrine.orm.taxonomy_memcache_instance' service.
*
* This service is shared.
* This method always returns the same instance of the service.
*
* @return MemcacheCache A MemcacheCache instance.
*/
protected function getDoctrine_Orm_TaxonomyMemcacheInstanceService()
{
$this->services['doctrine.orm.taxonomy_memcache_instance'] = $instance = new \MemcacheCache();

$instance->connect('memcache01', '11211');

return $instance;
}




Any idea why this would throw an error? Why does it not autoload?

Answers (1)

2013-05-22

Florian Klein answers:

Hello!

Yes the solution seems really simple: The \Memcache class is only available if you enable the php's memcache extension:

[[LINK href="http://php.net/manual/fr/book.memcache.php"]]http://php.net/manual/fr/book.memcache.php[[/LINK]]

The easyest is to install it either with pear/pecl:

pecl install memcache

OR using your distribution's package manager. On ubuntu it would be:

sudo apt-get-install php5-memcache

Don't forget to enable this if needed in your php.ini:

extension=memcache.so


Lawrence Krubner comments:

In php.ini I have:

extension=/usr/lib/php/extensions/no-debug-non-zts-20090626/apc.so

extension=/usr/lib/php/extensions/no-debug-non-zts-20100525/memcache.so

If I do:

ls -al /usr/lib/php/extensions/no-debug-non-zts-20100525/memcache.so

I get:

-rwxrwxrwx 1 root staff 70916 May 17 16:31 /usr/lib/php/extensions/no-debug-non-zts-20100525/memcache.so

If I do:

ps aux | grep memcache

I get:

lk 691 0.0 0.0 2464252 724 ?? S Tue06AM 0:03.04 /usr/local/opt/memcached/bin/memcached -l localhost

If I do:

sudo lsof -i -P

(on a Mac) I get:

memcached 691 lkrubner 18u IPv6 0x148a63093f7a0c6b 0t0 TCP localhost:11211 (LISTEN)
memcached 691 lkrubner 19u IPv4 0x148a630940ef4b5b 0t0 TCP localhost:11211 (LISTEN)
memcached 691 lkrubner 20u IPv6 0x148a63093f7a088b 0t0 TCP localhost:11211 (LISTEN)
memcached 691 lkrubner 21u IPv6 0x148a63093cd2fa0b 0t0 UDP localhost:11211
memcached 691 lkrubner 22u IPv4 0x148a63093cd2f883 0t0 UDP localhost:11211
memcached 691 lkrubner 23u IPv6 0x148a63093cd2ec43 0t0 UDP localhost:11211

So Memcache is installed and listening on the correct port.


Lawrence Krubner comments:

I am on Mac OSX 10.8. Any thoughts about this:

pecl install memcache

Warning: lstat(): Lstat failed for /var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T//pear/cache/72a007f0151e3eb40d52b6de3f722f75rest.cacheid in PEAR/REST.php on line 276

Warning: lstat(): Lstat failed for /var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T//pear/cache/72a007f0151e3eb40d52b6de3f722f75rest.cacheid in /usr/local/Cellar/php54/5.4.15/lib/php/PEAR/REST.php on line 276
No releases available for package "pecl.php.net/memcache"
install failed


Lawrence Krubner comments:

Interesting. Run as root, and it still fails:

pecl install memcache

Warning: lstat(): Lstat failed for /var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T//pear/cache/72a007f0151e3eb40d52b6de3f722f75rest.cacheid in PEAR/REST.php on line 276

Warning: lstat(): Lstat failed for /var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T//pear/cache/72a007f0151e3eb40d52b6de3f722f75rest.cacheid in /usr/local/Cellar/php54/5.4.15/lib/php/PEAR/REST.php on line 276
No releases available for package "pecl.php.net/memcache"
install failed

downloading memcache-2.2.7.tgz ...
Starting to download memcache-2.2.7.tgz (36,459 bytes)
..........done: 36,459 bytes
11 source files, building
WARNING: php_bin /usr/local/Cellar/php54/5.4.15/bin/php appears to have a suffix 54/5.4.15/bin/php, but config variable php_suffix does not match
running: phpize
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
configure.in:3: warning: prefer named diversions
configure.in:3: warning: prefer named diversions
Enable memcache session handler support? [yes] : building in /private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/memcache-2.2.7
running: /private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/memcache/configure --enable-memcache-session=yes
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... i386-apple-darwin12.3.0
checking host system type... i386-apple-darwin12.3.0
checking target system type... i386-apple-darwin12.3.0
checking for PHP prefix... /usr/local/Cellar/php54/5.4.15
checking for PHP includes... -I/usr/local/Cellar/php54/5.4.15/include/php -I/usr/local/Cellar/php54/5.4.15/include/php/main -I/usr/local/Cellar/php54/5.4.15/include/php/TSRM -I/usr/local/Cellar/php54/5.4.15/include/php/Zend -I/usr/local/Cellar/php54/5.4.15/include/php/ext -I/usr/local/Cellar/php54/5.4.15/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/Cellar/php54/5.4.15/lib/php/extensions/no-debug-non-zts-20100525
checking for PHP installed headers prefix... /usr/local/Cellar/php54/5.4.15/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking whether to enable memcache support... yes, shared
checking whether to enable memcache session handler support... yes
checking for the location of ZLIB... no
checking for the location of zlib... /usr
checking for session includes... /usr/local/Cellar/php54/5.4.15/include/php
checking for memcache session support... enabled
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... no
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 196608
checking command to parse /usr/bin/nm output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking if cc supports -fno-rtti -fno-exceptions... yes
checking for cc option to produce PIC... -fno-common
checking if cc PIC flag -fno-common works... yes
checking if cc static flag -static works... no
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin12.3.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no

creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/memcache-2.2.7/libtool --mode=compile cc -I/usr/local/Cellar/php54/5.4.15/include/php -I. -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/memcache -DPHP_ATOM_INC -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/memcache-2.2.7/include -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/memcache-2.2.7/main -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/memcache -I/usr/local/Cellar/php54/5.4.15/include/php -I/usr/local/Cellar/php54/5.4.15/include/php/main -I/usr/local/Cellar/php54/5.4.15/include/php/TSRM -I/usr/local/Cellar/php54/5.4.15/include/php/Zend -I/usr/local/Cellar/php54/5.4.15/include/php/ext -I/usr/local/Cellar/php54/5.4.15/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/memcache/memcache.c -o memcache.lo
mkdir .libs
cc -I/usr/local/Cellar/php54/5.4.15/include/php -I. -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/memcache -DPHP_ATOM_INC -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/memcache-2.2.7/include -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/memcache-2.2.7/main -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/memcache -I/usr/local/Cellar/php54/5.4.15/include/php -I/usr/local/Cellar/php54/5.4.15/include/php/main -I/usr/local/Cellar/php54/5.4.15/include/php/TSRM -I/usr/local/Cellar/php54/5.4.15/include/php/Zend -I/usr/local/Cellar/php54/5.4.15/include/php/ext -I/usr/local/Cellar/php54/5.4.15/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/memcache/memcache.c -fno-common -DPIC -o .libs/memcache.o
/bin/sh /private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/memcache-2.2.7/libtool --mode=compile cc -I/usr/local/Cellar/php54/5.4.15/include/php -I. -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/memcache -DPHP_ATOM_INC -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/memcache-2.2.7/include -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/memcache-2.2.7/main -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/memcache -I/usr/local/Cellar/php54/5.4.15/include/php -I/usr/local/Cellar/php54/5.4.15/include/php/main -I/usr/local/Cellar/php54/5.4.15/include/php/TSRM -I/usr/local/Cellar/php54/5.4.15/include/php/Zend -I/usr/local/Cellar/php54/5.4.15/include/php/ext -I/usr/local/Cellar/php54/5.4.15/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/memcache/memcache_queue.c -o memcache_que
ue.lo
cc -I/usr/local/Cellar/php54/5.4.15/include/php -I. -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/memcache -DPHP_ATOM_INC -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/memcache-2.2.7/include -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/memcache-2.2.7/main -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/memcache -I/usr/local/Cellar/php54/5.4.15/include/php -I/usr/local/Cellar/php54/5.4.15/include/php/main -I/usr/local/Cellar/php54/5.4.15/include/php/TSRM -I/usr/local/Cellar/php54/5.4.15/include/php/Zend -I/usr/local/Cellar/php54/5.4.15/include/php/ext -I/usr/local/Cellar/php54/5.4.15/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/memcache/memcache_queue.c -fno-common -DPIC -o .libs/memcache_queue.o
/bin/sh /private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/memcache-2.2.7/libtool --mode=compile cc -I/usr/local/Cellar/php54/5.4.15/include/php -I. -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/memcache -DPHP_ATOM_INC -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/memcache-2.2.7/include -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/memcache-2.2.7/main -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/memcache -I/usr/local/Cellar/php54/5.4.15/include/php -I/usr/local/Cellar/php54/5.4.15/include/php/main -I/usr/local/Cellar/php54/5.4.15/include/php/TSRM -I/usr/local/Cellar/php54/5.4.15/include/php/Zend -I/usr/local/Cellar/php54/5.4.15/include/php/ext -I/usr/local/Cellar/php54/5.4.15/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/memcache/memcache_standard_hash.c -o memc
ache_standard_hash.lo
cc -I/usr/local/Cellar/php54/5.4.15/include/php -I. -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/memcache -DPHP_ATOM_INC -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/memcache-2.2.7/include -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/memcache-2.2.7/main -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/memcache -I/usr/local/Cellar/php54/5.4.15/include/php -I/usr/local/Cellar/php54/5.4.15/include/php/main -I/usr/local/Cellar/php54/5.4.15/include/php/TSRM -I/usr/local/Cellar/php54/5.4.15/include/php/Zend -I/usr/local/Cellar/php54/5.4.15/include/php/ext -I/usr/local/Cellar/php54/5.4.15/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/memcache/memcache_standard_hash.c -fno-common -DPIC -o .libs/memcache_standard_hash.o
/bin/sh /private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/memcache-2.2.7/libtool --mode=compile cc -I/usr/local/Cellar/php54/5.4.15/include/php -I. -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/memcache -DPHP_ATOM_INC -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/memcache-2.2.7/include -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/memcache-2.2.7/main -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/memcache -I/usr/local/Cellar/php54/5.4.15/include/php -I/usr/local/Cellar/php54/5.4.15/include/php/main -I/usr/local/Cellar/php54/5.4.15/include/php/TSRM -I/usr/local/Cellar/php54/5.4.15/include/php/Zend -I/usr/local/Cellar/php54/5.4.15/include/php/ext -I/usr/local/Cellar/php54/5.4.15/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/memcache/memcache_consistent_hash.c -o me
mcache_consistent_hash.lo
cc -I/usr/local/Cellar/php54/5.4.15/include/php -I. -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/memcache -DPHP_ATOM_INC -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/memcache-2.2.7/include -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/memcache-2.2.7/main -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/memcache -I/usr/local/Cellar/php54/5.4.15/include/php -I/usr/local/Cellar/php54/5.4.15/include/php/main -I/usr/local/Cellar/php54/5.4.15/include/php/TSRM -I/usr/local/Cellar/php54/5.4.15/include/php/Zend -I/usr/local/Cellar/php54/5.4.15/include/php/ext -I/usr/local/Cellar/php54/5.4.15/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/memcache/memcache_consistent_hash.c -fno-common -DPIC -o .libs/memcache_consistent_hash.o
/bin/sh /private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/memcache-2.2.7/libtool --mode=compile cc -I/usr/local/Cellar/php54/5.4.15/include/php -I. -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/memcache -DPHP_ATOM_INC -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/memcache-2.2.7/include -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/memcache-2.2.7/main -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/memcache -I/usr/local/Cellar/php54/5.4.15/include/php -I/usr/local/Cellar/php54/5.4.15/include/php/main -I/usr/local/Cellar/php54/5.4.15/include/php/TSRM -I/usr/local/Cellar/php54/5.4.15/include/php/Zend -I/usr/local/Cellar/php54/5.4.15/include/php/ext -I/usr/local/Cellar/php54/5.4.15/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/memcache/memcache_session.c -o memcache_s
ession.lo
cc -I/usr/local/Cellar/php54/5.4.15/include/php -I. -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/memcache -DPHP_ATOM_INC -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/memcache-2.2.7/include -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/memcache-2.2.7/main -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/memcache -I/usr/local/Cellar/php54/5.4.15/include/php -I/usr/local/Cellar/php54/5.4.15/include/php/main -I/usr/local/Cellar/php54/5.4.15/include/php/TSRM -I/usr/local/Cellar/php54/5.4.15/include/php/Zend -I/usr/local/Cellar/php54/5.4.15/include/php/ext -I/usr/local/Cellar/php54/5.4.15/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/memcache/memcache_session.c -fno-common -DPIC -o .libs/memcache_session.o
/bin/sh /private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/memcache-2.2.7/libtool --mode=link cc -DPHP_ATOM_INC -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/memcache-2.2.7/include -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/memcache-2.2.7/main -I/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/memcache -I/usr/local/Cellar/php54/5.4.15/include/php -I/usr/local/Cellar/php54/5.4.15/include/php/main -I/usr/local/Cellar/php54/5.4.15/include/php/TSRM -I/usr/local/Cellar/php54/5.4.15/include/php/Zend -I/usr/local/Cellar/php54/5.4.15/include/php/ext -I/usr/local/Cellar/php54/5.4.15/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -o memcache.la -export-dynamic -avoid-version -prefer-pic -module -rpath /private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/memcache-2.2.7/modules memcache.lo memcache_queue.lo memcache_standard_hash.lo
memcache_consistent_hash.lo memcache_session.lo
cc ${wl}-flat_namespace ${wl}-undefined ${wl}suppress -o .libs/memcache.so -bundle .libs/memcache.o .libs/memcache_queue.o .libs/memcache_standard_hash.o .libs/memcache_consistent_hash.o .libs/memcache_session.o
dsymutil .libs/memcache.so || :
creating memcache.la
(cd .libs && rm -f memcache.la && ln -s ../memcache.la memcache.la)
/bin/sh /private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/memcache-2.2.7/libtool --mode=install cp ./memcache.la /private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/memcache-2.2.7/modules
cp ./.libs/memcache.so /private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/memcache-2.2.7/modules/memcache.so
cp ./.libs/memcache.lai /private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/memcache-2.2.7/modules/memcache.la
----------------------------------------------------------------------
Libraries have been installed in:
/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/memcache-2.2.7/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `DYLD_LIBRARY_PATH' environment variable
during execution

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

Build complete.
Don't forget to run 'make test'.

running: make INSTALL_ROOT="/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/install-memcache-2.2.7" install
Installing shared extensions: /private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/install-memcache-2.2.7/usr/local/Cellar/php54/5.4.15/lib/php/extensions/no-debug-non-zts-20100525/
running: find "/private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/install-memcache-2.2.7" | xargs ls -dils
14821553 0 drwxr-xr-x 3 root staff 102 May 22 13:20 /private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/install-memcache-2.2.7
14821923 0 drwxr-xr-x 3 root staff 102 May 22 13:20 /private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/install-memcache-2.2.7/usr
14821924 0 drwxr-xr-x 3 root staff 102 May 22 13:20 /private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/install-memcache-2.2.7/usr/local
14821925 0 drwxr-xr-x 3 root staff 102 May 22 13:20 /private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/install-memcache-2.2.7/usr/local/Cellar
14821926 0 drwxr-xr-x 3 root staff 102 May 22 13:20 /private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/install-memcache-2.2.7/usr/local/Cellar/php54
14821927 0 drwxr-xr-x 3 root staff 102 May 22 13:20 /private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/install-memcache-2.2.7/usr/local/Cellar/php54/5.4.15
14821928 0 drwxr-xr-x 3 root staff 102 May 22 13:20 /private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/install-memcache-2.2.7/usr/local/Cellar/php54/5.4.15/lib
14821929 0 drwxr-xr-x 3 root staff 102 May 22 13:20 /private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/install-memcache-2.2.7/usr/local/Cellar/php54/5.4.15/lib/php
14821930 0 drwxr-xr-x 3 root staff 102 May 22 13:20 /private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/install-memcache-2.2.7/usr/local/Cellar/php54/5.4.15/lib/php/extensions
14821931 0 drwxr-xr-x 3 root staff 102 May 22 13:20 /private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/install-memcache-2.2.7/usr/local/Cellar/php54/5.4.15/lib/php/extensions/no-debug-non-zts-20100525
14821932 144 -rwxr-xr-x 1 root staff 71260 May 22 13:20 /private/var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T/pear/temp/pear-build-rootbj6M9U/install-memcache-2.2.7/usr/local/Cellar/php54/5.4.15/lib/php/extensions/no-debug-non-zts-20100525/memcache.so

Build process completed successfully
Installing '/usr/local/Cellar/php54/5.4.15/lib/php/extensions/no-debug-non-zts-20100525/memcache.so'
install ok: channel://pecl.php.net/memcache-2.2.7
configuration option "php_ini" is not set to php.ini location
You should add "extension=memcache.so" to php.ini
root 13:20:06 : /Users/lk/projects $ Warning: lstat(): Lstat failed for /var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T//pear/cache/72a007f0151e3eb40d52b6de3f722f75rest.cacheid in PEAR/REST.php on line 276
sh: syntax error near unexpected token `('
root 13:20:06 : /Users/lk/projects $
root 13:20:06 : /Users/lk/projects $ Warning: lstat(): Lstat failed for /var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T//pear/cache/72a007f0151e3eb40d52b6de3f722f75rest.cacheid in /usr/local/Cellar/php54/5.4.15/lib/php/PEAR/REST.php on line 276
sh: syntax error near unexpected token `('
root 13:20:06 : /Users/lk/projects $ No releases available for package "pecl.php.net/memcache"
sh: No: command not found
root 13:20:06 : /Users/lk/projects $ install failed
usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
[-o owner] file1 file2
install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
[-o owner] file1 ... fileN directory
install -d [-v] [-g group] [-m mode] [-o owner] directory ...


Florian Klein comments:

So, this is more an devops question than a symfony one, but you can see if your memcache extension is loaded by doing:


php -m | grep memcache

If not loaded, try to install a clean php / pecl / pear install using homebrew or [[LINK href="http://php-osx.liip.ch/"]]http://php-osx.liip.ch/[[/LINK]]

Also, I don't know why your pecl setup fails, but its hard to know from here.
Have you tried to

pecl upgrade

or pear upgrade

?


Lawrence Krubner comments:

This:

php -m | grep memcache

gives me:

memcache

See screenshot.