Cassandra无法使用PHP [英] Cassandra not working with php

查看:69
本文介绍了Cassandra无法使用PHP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将cassandra与php一起使用.cassandra服务器和客户端.两者都已经开始.它引发以下错误:

I am using cassandra with php. cassandra server and client. both have been started. It throws following error :

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是:

In call stack, at step 2. Line no. 46 is :

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

如何解决此错误?

推荐答案

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

Many, many, many people use a client in front of Thrift. For PHP, the most common is PHPCassa

这篇关于Cassandra无法使用PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆