views:

50

answers:

1

Hi everybody,

I wanted to make a tryout this weekend with Cassandra + PHP in my testing environment. So after a few hours of headache trying to install it, I finally succeeded and got it running.

However, I've tried out the different PHP wrappers for cassandra, and I have totally failed to connect with anyone. SimpleCassie which I want to use, gives the following error when I run the following code:

  /*
  * setting new column (and key if not exist)
  * @return - (false) on failure
  */
   $cassie->keyspace('MyApp')->cf('Users')->key('user1')->column('name')->set('Marcin');
   $cassie->column('surname')->set('Rosinski');

Error:

cassandra_InvalidRequestException: in /var/www/cassie/SimpleCassie.php on line 7257

What Can I do to make it work? Thanks!

+2  A: 

"Invalid request could mean keyspace or column family does not exist, required parameters are missing, or a parameter is malformed. why contains an associated error message."

My qualified guess is that you have forgot to add a keyspace called 'MyApp', and inside that keyspace create a column family called 'Users'

Schildmeijer
Hi! That would of course make a lot of sense. I guessed that I could add keyspaces and column families inside the storage-conf.xml, which was correct, so I will try that. Do you have any good source on where I can learn about these things and the necessities of Cassandra?
Industrial
http://wiki.apache.org/cassandra/
Schildmeijer