【问题标题】:Cassandra not working with phpCassandra 不使用 php
【发布时间】:2012-04-27 04:29:41
【问题描述】:

我正在使用 cassandra 和 php。 cassandra 服务器和客户端。两者都已启动。它抛出以下错误:

Fatal error: Call to a member function write() on a non-object in C:\cassandra\thrift\Thrift.php on line 715

Call Stack
#   Time    Memory  Function    Location
1   0.0010  395808  {main}( )   ..\cassandra_testFile.php:0
2   0.0409  3143872 CassandraClient->insert( )  ..\cassandra_testFile.php:46
3   0.0409  3143872 CassandraClient->send_insert( ) ..\Cassandra.php:606
4   0.0412  3146072 cassandra_Cassandra_insert_args->write( )   ..\Cassandra.php:625
5   0.0412  3146136 TBase->_write( )    ..\Cassandra.php:2761

在调用堆栈中,在第 2 步。行号。 46 是:

$client->insert($keyspace, $keyUserId, $columnPath, $value, $timestamp, $consistency_level);

如何解决这个错误?

【问题讨论】:

    标签: php nosql cassandra


    【解决方案1】:

    很多很多人在 Thrift 面前使用客户端。对于 PHP,最常见的是PHPCassa

    【讨论】:

      【解决方案2】:

      不推荐通过 Thrift 进行连接。

      PHP library for Cassandra database via a binary protocol.

      【讨论】:

        猜你喜欢
        • 2017-11-04
        • 2015-09-01
        • 1970-01-01
        • 2016-07-24
        • 2016-07-31
        • 2014-04-11
        • 2011-07-06
        • 2015-05-19
        • 2017-01-13
        相关资源
        最近更新 更多