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:


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>';
echo '</pre>';
    try {
            $column_family = new ColumnFamily($pool, 'test');
    } catch (Exception $e)
            echo $e->getMessage();


Simple. Just need to change the rpc_address value from localhost to


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.