[
https://issues.apache.org/jira/browse/THRIFT-1898?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tarik Yilmaz updated THRIFT-1898:
---------------------------------
Environment: Ubuntu 12.04 32Bit + Apache2 + PHP 5.5 (with thrift_protocol
Extension) + Thrift 0.9 + Cassandra 1.2.0
> PHP Thrift Internal error processing
> ------------------------------------
>
> Key: THRIFT-1898
> URL: https://issues.apache.org/jira/browse/THRIFT-1898
> Project: Thrift
> Issue Type: Bug
> Affects Versions: 0.8, 0.9
> Environment: Ubuntu 12.04 32Bit + Apache2 + PHP 5.5 (with
> thrift_protocol Extension) + Thrift 0.9 + Cassandra 1.2.0
> Reporter: Tarik Yilmaz
>
> I used this client with Java Loop & PHP Loop. In Java Loop is everything ok
> but PHP has problems
> PHP Client :
> ------------------------------
> public function __construct($host = '127.0.0.1', $port = 32002){
> try{
> $socket = new Thrift\Transport\TSocket($host, $port);
> $socket->setSendTimeout(1000);
> $socket->setRecvTimeout(1000);
> $this->transport = new Thrift\Transport\TBufferedTransport($socket,
> 1024, 1024);
> $this->cli = new question\CassandraClient(new
> Thrift\Protocol\TBinaryProtocolAccelerated($this->transport));
> $this->transport->open();
> }catch(Thrift\Exception\TException $t){}
> }
> ------------------------------
> Java Server :
> ------------------------------
> ServerHandler handler = new ServerHandler();
> Cassandra.Processor processor = new Cassandra.Processor(handler);
> TServerTransport serverTransport = new TServerSocket(32002);
> TServer server = new TThreadPoolServer(new
> TThreadPoolServer.Args(serverTransport).processor(processor));
> System.out.println("Starting the server..." + sdf.format(cl.getTime()));
> server.serve();
> ------------------------------
> PHP Code :
> ------------------------------
> for($i=0, $size = count($array); $i<$size; $i++){
> ....
> $vote = $client->getAnsNum($ansID[$i]);
> ....
> }
> ------------------------------
> PHP Error Output in For Loop :
> ------------------------------
> exception 'Thrift\Exception\TApplicationException' with message 'Internal
> error processing getAnsNum' in
> /home/tarik/Server/web_incl/rpc/gen-php/question/Cassandra.php:102
> Stack trace:
> #0 /home/tarik/Server/web_incl/rpc/gen-php/question/Cassandra.php(69):
> question\CassandraClient->recv_getAnsNum()
> #1 /home/tarik/Server/web_incl/rpc/client/cassandraClient.php(46):
> question\CassandraClient->getAnsNum('a7295b2d')
> #2 /home/tarik/Server/web_incl/incl/users/request/myasks.php(28):
> cassandraClient->getAnsNum('a7295b2d')
> #3 /home/tarik/Server/web/tr/users/getjs/_myask_que_jlts.php(18):
> require_once('/home/tarik/Ser...')
> #4 {main}exception 'Thrift\Exception\TApplicationException' with message
> 'Internal error processing getAnsNum' in
> /home/tarik/Server/web_incl/rpc/gen-php/question/Cassandra.php:102
> Stack trace:
> #0 /home/tarik/Server/web_incl/rpc/gen-php/question/Cassandra.php(69):
> question\CassandraClient->recv_getAnsNum()
> #1 /home/tarik/Server/web_incl/rpc/client/cassandraClient.php(46):
> question\CassandraClient->getAnsNum('725a0530')
> #2 /home/tarik/Server/web_incl/incl/users/request/myasks.php(28):
> cassandraClient->getAnsNum('725a0530')
> #3 /home/tarik/Server/web/tr/users/getjs/_myask_que_jlts.php(18):
> require_once('/home/tarik/Ser...')
> ....
> --------------------------------
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira