douyong8801 2011-10-09 18:44
浏览 25
已采纳

尝试存储阵列时CHDB缓存错误

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!

  • 写回答

2条回答 默认 最新

  • dou760663 2011-11-11 19:49
    关注

    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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!