I’m trying to use CHDB (hash table caching) for PHP (http://pecl.php.net/package/chdb).
I end up with this error:
Fatal error: Uncaught exception ‘Exception’ with message ‘Error
generating ‘d.chdb’: Cannot allocate memory’ in
/var/www/b/site/test.php:18 Stack trace: #0
/var/www/b/site/test.php(18): chdb_create(‘d.chdb’, Array) #1 {main}
thrown in /var/www/site/b/test.php on line 18
Does anyone know where this error comes from? Is it from the PHP framework itself or from somewhere else?
I manually installed CHDB in PHP on Fedora 11.
My code is very straightforward:
$data = array('key1' => "val1");
chdb_create("d.chdb", $data);
Any helpful tips welcome!
The programmer of chdb answered my question and the problem is that cmph library used by chdb does not allow hashing of arrays with size one. I used one entry just to test…
Simple as that :-).
Obviously the error message is a bit unclear.