thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Jones <Dave.Jo...@spilgames.com>
Subject RE: How to use the thrift native PHP extension?
Date Tue, 22 Jun 2010 12:19:27 GMT
Thank you for the quick reply, problem resolved, your answer was much appreciated!

-----Original Message-----
From: yaw [mailto:yawyway@gmail.com] 
Sent: dinsdag 22 juni 2010 14:14
To: thrift-user@incubator.apache.org
Subject: Re: How to use the thrift native PHP extension?

Hello,
I've followed this how-to :
https://wiki.fourkitchens.com/display/PF/Using+Cassandra+with+PHP


To use native thrift protocol, you will have to call
TBinaryProtocolAccelerated class
instead of TBinaryProtocol.


*8. "Ensure that the PHP is using TBinaryProtocolAccelerated and not
TBinaryProtocol as the protocol."

*

*$cassandraSocket = new TSocket($cassandraHost, $cassandraPort);*

*$cassandraTransport = new TBufferedTransport($cassandraSocket, 1024, 1024);
*

*$cassandraProtocol = new TBinaryProtocolAccelerated($cassandraTransport);*
*...*




2010/6/22 Dave Jones <Dave.Jones@spilgames.com>

> Hi,
>
> We've installed Cassandra 0.6.2 and Thrift 0.2.0, and have generated the
> PHP Cassandra bindings using
> thrift -gen php cassandra.thrift
>
> After this, we followed these steps to build the native php extension:
>
> phpize
> ./configure --enable-thrift_protocol
> make
>
> sudo cp modules/thrift_protocol.so /usr/lib/php/modules/
>
> Created /etc/php.d/thrift_protocol.ini, with contents:
> extension=thrift_protocol.so
>
> So far, so good.
>
> However, we're not sure how to actually use the native extension.  Nothing
> found in the source of Casssndra.php.
>
> Any ideas?    Does anyone know where we can find documentation about using
> the php extension?
>
> Thanks, Dave
>

Mime
View raw message