maybe you'd have more luck discussing this on the phpcassa list?
https://groups.google.com/forum/#!forum/phpcassa

more experience there with PHP and Cassandra ...

Are you able to validate the query works when not using PHP?

On Thu, May 26, 2011 at 8:51 PM, Kwasi Gyasi - Agyei
<kwasi.gyasiag...@4things.co.za> wrote:
> got system in debug mode
>
> the following query fails
> -------------------------------
>
> CREATE COLUMNFAMILY magic (KEY text PRIMARY KEY, monkey ) WITH comparator =
> text AND default_validation = text
>
> PHP error reads
> -------------------------
>
> #0
> /Volumes/DATA/Project/libs/php/phpCQL/vendor/cassandra/cassandra.Cassandra_execute_cql_query_result.php(52):
> TBase->_read('Cassandra_execu...', Array, Object(TBinaryProtocol)) #1
> /Volumes/DATA/Project/libs/php/phpCQL/vendor/cassandra/cassandra.Cassandra.client.php(1771):
> cassandra_Cassandra_execute_cql_query_result->read(Object(TBinaryProtocol))
> #2
> /Volumes/DATA/Project/libs/php/phpCQL/vendor/cassandra/cassandra.Cassandra.client.php(1731):
> CassandraClient->recv_execute_cql_query() #3
> /Volumes/DATA/Project/libs/php/phpCQL/test/index.php(34):
> CassandraClient->execute_cql_query('CREATE COLUMNFA...', 2) #4 {main}
>
> Cassandra logs read
> ------------------------------
>
> DEBUG 20:48:10,659 Disseminating load info ...
> DEBUG 20:49:10,661 Disseminating load info ...
> DEBUG 20:49:22,867 CQL statement type: USE
> DEBUG 20:49:22,870 logged out: #<User allow_all groups=[]>
>
>
> here is the code I'm using to test
> --------------------------------------------
>
> phpCQLAutoloader::register();
>
> $socketPool          = new TSocketPool();
> $socketPool->addServer( "127.0.0.1", 9160 );
> $socketPool->setDebug( true );
>
> $framedTransport  = new TFramedTransport( $socketPool, true, true );
> $bufferedProtocol = new TBinaryProtocol( $framedTransport, true, true );
> //new TBinaryProtocolAccelerated( $framedTransport );
> $cassandraClient  = new CassandraClient( $bufferedProtocol,
> $bufferedProtocol );
>
> try{
>
>     echo "opening connection <br>";
>     $framedTransport->open();
>
>     try{
>
>         echo "settign keyspace to use <br/>";
>         $result = $cassandraClient->execute_cql_query( "use nnduronic" ,
> cassandra_Compression::NONE);
>          print_r( $result );
>
>     }catch( cassandra_InvalidRequestException $exrs ){
>
>         echo "USE error occuired -- <br> " . $exrs->getTraceAsString() . "
> <br>";
>     }
>
>     try{
>
>             echo "Executing create column query <br/>";
>             $query  = "CREATE COLUMNFAMILY magic (KEY text PRIMARY KEY,
> monkey ) WITH comparator = text AND default_validation = text";
>             $result = $cassandraClient->execute_cql_query( $query ,
> cassandra_Compression::NONE );
>
>             echo "|". print_r($result) . "|" . "<br>";
>
>     }catch( cassandra_InvalidRequestException $exrs ){
>         echo "COLUMNFAMILY error occuired -- <br> " .
> $exrs->getTraceAsString() . " <br>";
>     }
>         echo "closing connnection <br>";
>     $framedTransport->close();
>
>
> I'm lost :(
>
> On Thu, May 26, 2011 at 9:17 AM, aaron morton <aa...@thelastpickle.com>
> wrote:
>>
>> Cool, this may be a better discussion for the client-dev list
>> http://www.mail-archive.com/client-dev@cassandra.apache.org/
>>
>> I would start by turning up the server logging to DEBUG and watching your
>> update / select queries.
>>
>> Cheers
>> -----------------
>> Aaron Morton
>> Freelance Cassandra Developer
>> @aaronmorton
>> http://www.thelastpickle.com
>> On 26 May 2011, at 16:15, Kwasi Gyasi - Agyei wrote:
>>
>> Hi,
>>
>> I have manged to generate thrift interface for php along with implementing
>> auto-loading of both Cassandra and thrift core class.
>>
>> However during my testing the only query that works as expected is the
>> create keyspace cql query... all other queries don't do or return any
>> results nor do they throw exceptions even in try catch statement I get
>> nothing.
>>
>> --
>> 4Things
>> Multimedia and Communication | Property | Entertainment
>> Kwasi Owusu Gyasi - Agyei
>>
>> cell        (+27) (0) 76 466 4488
>> website www.4things.co.za
>> email     kwasi.gyasiag...@4things.co.za
>> skype    kwasi.gyasiagyei
>> role        Developer.Designer.Software Architect
>>
>
>
>
> --
> 4Things
> Multimedia and Communication | Property | Entertainment
> Kwasi Owusu Gyasi - Agyei
>
> cell        (+27) (0) 76 466 4488
> website www.4things.co.za
> email     kwasi.gyasiag...@4things.co.za
> skype    kwasi.gyasiagyei
> role        Developer.Designer.Software Architect
>



-- 
Sasha Dolgy
sasha.do...@gmail.com

Reply via email to