U
U
unlik2015-04-06 21:52:10
PHP
unlik, 2015-04-06 21:52:10

Cassandra + PHP + Debian?

In PHP script
<?
$dsn = "cassandra:host=server IP; port=9160";
$db = new PDO($dsn);
$db->exec("USE Keyspace1");
$stmt = $db->prepare("UPDATE users SET full_name = :name WHERE key = :key;");
$stmt->bindValue(':key', 'mikko');
$stmt->bindValue(':name', 'mikko k');
$stmt->execute();
$stmt = $db->prepare("SELECT key, full_name FROM users WHERE key = :key;");
$stmt->bindValue(':key', 'mikko');
$stmt->execute();
var_dump($stmt->fetchAll());
?>
Throw an error
Fatal error: Uncaught exception 'PDOException' with message 'CQLSTATE[08006] [8] TTransportException: Transport not open' in /home/index.php(6): PDO->__construct('cassandra:host=...') #1 {main} thrown in /home/index.php on line 6
What could be the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Supme, 2015-04-06
@Supme

https://code.google.com/a/apache-extras.org/p/cass...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question