Fatal error: Cannot instantiate non-existent class: memcache

Junaid Ali Shah sjunaidalishah at gmail.com
Tue Dec 26 05:21:47 UTC 2006


I just want to inquire about the memcached for win32. I download >Memcached
for Win32
from http://jehiah.cz/projects/memcached-win32/ and php_memcached.dll from
http://pecl4win.php.net/list.php

Now I place php_memcached.dll in my php folder that is in C:\php\extension.
And also enter php_memcached.dll in php.ini.

One important thing I am using PHP 4.4

Well I am trying to test this code

<?php
$memcache = new Memcache;
$memcache->connect('localhost', 11211) or die ("Could not connect");

$version = $memcache->getVersion();
echo "Server's version: ".$version."<br/>\n";

$tmp_object = new stdClass;
$tmp_object->str_attr = 'test';
$tmp_object->int_attr = 123;

$memcache->set('key', $tmp_object, false, 10) or die ("Failed to save data
at the server");
echo "Store data in the cache (data will expire in 10 seconds)<br/>\n";

$get_result = $memcache->get('key');
echo "Data from the cache:<br/>\n";

var_dump($get_result);

?>

While run this code in browser system gives me following error

*Fatal error:* Cannot instantiate non-existent class: memcache in *
c:\inetpub\wwwroot\aaa\config.php* on line *3*



I don't know from where Memcache class exists. I mean where the definition
of this class lies. And how to solve this problem.


Please help me in this problem.


I am very thankful to you all.



-- 
Junaid Ali
IT Executive
CyberVision International
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/memcached/attachments/20061226/0d098ec7/attachment.html


More information about the memcached mailing list