Cassandra not working with php

我只是一个虾纸丫 提交于 2019-12-13 01:28:33

问题


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

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

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

How can this error be resolved?


回答1:


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

  • Which PHP client library to use with Cassandra?
  • Cassandra via PHP



回答2:


Connection via Thrift deprecated.

PHP library for Cassandra database via a binary protocol.



来源:https://stackoverflow.com/questions/10164034/cassandra-not-working-with-php

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!