2017-02-06 63 views
1

我在Ubuntu上試圖用PHP連接Cassandra。我已經安裝了Datastax PHP驅動程序和所有的依賴,但我在嘗試運行testfile的,當這個錯誤:Datastax - Cassandra php-driver:Uncaught Cassandra Exception LogicException:

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,我可以看到我設置的表。 PHP代碼似乎並沒有工作。任何想法爲什麼?

+0

你是否從git中取出驅動程序?我認爲最後的一些提交可能會被破壞,因爲我有與你一樣的問題,但使用提交f50c93d(此提交從11月22日)工作沒有問題 –

+0

https://github.com/datastax/php-driver/commits/master –

+0

使用11月22日提交的完美工作,非常感謝@AlexandruCircus! – Paikz

回答

3

我們有同樣的問題。這對我有用。 非常感謝@AlexandruCircus!

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