Forgot to say, 0.0.0.0 is not a good idea in production... http://wiki.apache.org/cassandra/FAQ#cant_listen_on_ip_any
On 20/12/2010, at 9:12 AM, Aaron Morton <aa...@thelastpickle.com> wrote: > I've not used the PHP client, but you can test connectivity to your cluster > using the cassandra-cli command line client in the bin/ folder. > > Also check the ThriftAddress setting in your storage-config, this address is > the one that the server will be listening on. Set it to 0.0.0.0 to listen on > all. > > Aaron > > On 19/12/2010, at 8:45 AM, Rajkumar Gupta <rajkumar....@gmail.com> wrote: > >> Hi, I am trying to use phpcassa(Hoan's) with Cassandra 0.6.8 but when >> I try to run the following php script that includes phpcassa, >> >> >> <?php >> $GLOBALS['THRIFT_ROOT'] = 'Z:/wamp/bin/php/include/thrift/'; >> require_once $GLOBALS['THRIFT_ROOT'].'/packages/cassandra/Cassandra.php'; >> require_once $GLOBALS['THRIFT_ROOT'].'/transport/TSocket.php'; >> require_once $GLOBALS['THRIFT_ROOT'].'/protocol/TBinaryProtocol.php'; >> require_once $GLOBALS['THRIFT_ROOT'].'/transport/TFramedTransport.php'; >> require_once $GLOBALS['THRIFT_ROOT'].'/transport/TBufferedTransport.php'; >> >> include_once('Z:/wamp/bin/php/include/phpcassa.php'); >> include_once('Z:/wamp/bin/php/include/uuid.php'); >> >> CassandraConn::add_node('192.168.1.1', 9160); >> >> $users = new CassandraCF('Keyspace1', 'Users'); >> >> $users->insert('1', array('email' => 'hoan.tont...@gmail.com', >> 'password' => 'test')); >> ?> >> >> >> on running above script I get this error: >> >> Fatal error: Uncaught exception 'Exception' with message 'Could not >> connect to a cassandra server' in >> Z:\wamp\bin\php\include\phpcassa.php:70 Stack trace: #0 >> Z:\wamp\bin\php\include\phpcassa.php(193): CassandraConn::get_client() >> #1 Z:\wamp\www\PhpProject\index.php(38): CassandraCF->insert('1', >> Array) #2 {main} thrown in Z:\wamp\bin\php\include\phpcassa.php on >> line 70 >> >> Please let me know how can I make it work >> >> Thanks... >> --