I believe I’ve compiled and installed everything (configure&&make&&make install for libevent-1.4.13, libmemcached-0.35, memcached-1.4.4) but I keep getting this:
[font="Courier New"]YiiBase::include(Memcached.php) <snip> YiiBase-include</a>]: failed to open stream: No such file or directory[/font]
The same happens for Memcache.php if I don’t define [font=“Courier New”]‘useMemcached’=>true[/font]
The config for cache is simple in main.php:
Where is memcache.php suppose to reside? I manually copied it to php include path, /usr/share/php with no luck. And I can’t find a memcached.php anywhere (capitalized or not). Any other suggestions to diagnose this?
I hope I’m just missing something obvious. I’ve googled and searched forums, but haven’t found much advice other than “install stuff” and “define useMemcached=true”.
I’d appreciate any thoughts or suggestions.
I have not tried to install memcached on Linux yet. In Windows, memcached runs as a service which is somewhat like a daemon. In main.php, you need to add memcache as a component.
array('host'=>'server1', 'port'=>'11211', 'weight'=>'60'),
array('host'=>'server2', 'port'=>'11211', 'weight'=>'40'),
In the above, two memcached servers are launched.
In php.conf, you need to enable the php_memcache extension.
Just did a google search. Try here:
What does phpinfo() say about Memcache?
Memcached is a PHP class that is available when the memcached extension is loaded. As Yii can’t find it, it tries to autoload the classfile by the same name.
<nods> cmx, I actually followed that tutorial to get to this point. It seems like everything should just work. <shakes head> The [font=“Courier New”]./configure && make && make install[/font] seemed to go smoothly for each component. I’m running them again now to see if I can find any errors in the output.
Mike, [font="Courier New"]php -i | grep -i memcache[/font] returns this:
PWD => /usr/src/memcached/memcached-1.4.4
OLDPWD => /usr/src/memcached
_SERVER["PWD"] => /usr/src/memcached/memcached-1.4.4
_SERVER["OLDPWD"] => /usr/src/memcached
_ENV["PWD"] => /usr/src/memcached/memcached-1.4.4
_ENV["OLDPWD"] => /usr/src/memcached[/font]
I don’t have a good comparison to what should be listed, can anyone post output from a known good server? I’m moving forward on my project without memcache/d at this point, but that’s a short term option. Any suggestions as to where to go next?
Thank you both.
Well, it looks like we’ll never know exactly what went wrong. I rebuilt everything (the 4th? time), restarted apache, and it now works like a charm. No clue as to what, if anything, I did differently this time. This kind of mystery, I’m fine having behind me.
Thanks again, your replies were the impetus I needed to go poke at it more.