I have two servers. One has PHPCassa with a small app, the second has Cassandra install.
Here is the error I get:
An attempt was made to connect to every server twice, but all attempts failed. The last error was: TException:TSocket: Could not connect to ...*:9160 (Connection refused [111])
Here is my code:
<?php
require('phpcassa/lib/autoload.php');
use phpcassa\ColumnFamily;
use phpcassa\ColumnSlice;
use phpcassa\Connection\ConnectionPool;
$servers = array("***.**.***.***");
try {
$pool = new ConnectionPool("test", $servers);
} catch (Exception $e)
{
echo 'Erro with the connection!';
echo $e->getMEssage();
}
echo '<pre>';
var_dump($pool);
echo '</pre>';
try {
$column_family = new ColumnFamily($pool, 'test');
} catch (Exception $e)
{
echo $e->getMessage();
}
var_dump($column_family->get('a'));
?>