本文介绍了Datastax-Cassandra php驱动程序:未捕获的Cassandra\Exception\LogicException:的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在正在Ubuntu上,尝试使用PHP连接到Cassandra。我已经安装了Datastax php-driver及其所有依赖项,但是尝试运行测试文件时出现此错误:

I'm on Ubuntu right now trying to connect to Cassandra with PHP. I have installed Datastax php-driver and all of its dependencies but i get this error when trying to run a testfile:

    PHP Fatal error:  Uncaught Cassandra\Exception\LogicException: Not    implemented in /home/philip/Documents/test.php:3
Stack trace:
#0 /home/user/Documents/test.php(3): Cassandra\Cluster\Builder->build()
#1 {main}
  thrown in /home/user/Documents/test.php on line 3

代码如下:

 <?php
// Connect to the cluster and keyspace "killrvideo"
$cluster  = Cassandra::cluster()->build();
$keyspace  = 'killrvideo';
$session  = $cluster->connect($keyspace);

我设法使用shell cqlsh连接到cassandra,我可以看到已设置的表。的PHP代码似乎无法正常工作。知道为什么吗?

I manage to connect to cassandra using the shell cqlsh and i can see the table i have setup. The php code doesnt seem to work though. Any ideas why?

推荐答案

我们有同样的问题。这对我有用。
非常感谢@AlexandruCircus!

We have the same issue. This works for me.Thanks a lot @AlexandruCircus!


git clone https://github.com/datastax/php-driver.git
git reset --hard f50c93da3ea73ad8fcf8b181d0313d437e559256
cd php-driver/ext
./install.sh

这篇关于Datastax-Cassandra php驱动程序:未捕获的Cassandra\Exception\LogicException:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 05:42