[ 
https://issues.apache.org/jira/browse/THRIFT-1579?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jens Geyer resolved THRIFT-1579.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 0.9.2

Committed. Thanks for the patch, Tobias!

> PHP Extention - function thrift_protocol_read_binary not working from 
> TBinarySerializer::deserialize
> ----------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-1579
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1579
>             Project: Thrift
>          Issue Type: Bug
>          Components: PHP - Library
>    Affects Versions: 0.8
>         Environment: "Ubuntu Server Cloud Guest 11.10 (Oneiric Ocelot)" - 
> this for AWS
> Nginx + PHP5-FPM
>            Reporter: Sergei Labutin
>            Priority: Critical
>             Fix For: 0.9.2
>
>         Attachments: thrift-091-fix-php-binary-serialization.patch
>
>
> I copy class TBinarySerializer and change code:
>     $transport = new TMemoryBuffer();
>     $protocol = new TBinaryProtocolAccelerated($transport);
>     $transport->write($string_object);
>     $object = new $class_name();
>     $object->read($protocol);
>     return $object;
> This code is work. Function thrift_protocol_read_binary can't deserealize.
> 2012/04/16 17:38:52 [error] 1252#0: \*126088457 FastCGI sent in stderr: "PHP 
> Fatal error:  Uncaught exception 'TTransportException' with message 
> 'TMemoryBuffer: Could not read 512 bytes from buffer.' in 
> /usr/lib/php/transport/TMemoryBuffer.php:58
> Stack trace:
> #0 /usr/lib/php/transport/TBufferedTransport.php(126): 
> TMemoryBuffer->read(512)
> #1 [internal function]: TBufferedTransport->read(8192)
> #2 /usr/lib/php/protocol/TBinarySerializer.php(62): 
> thrift_protocol_read_binary(Object(TBinaryProtocolAccelerated), '\*\*\*\*\*', 
> false)
> #3 /*****/www/index.php(77): 
> TBinarySerializer::deserialize('???????????????...', '\*\*\*\*\*')
> #4 {main}
>   thrown in /usr/lib/php/transport/TMemoryBuffer.php on line 58" while 
> reading response header from upstream, client: \*\*\*\*\*, server: localhost, 
> request: "GET /?\*\*\*\*\* HTTP/1.1", upstream: "fastcgi://\*\*\*\*\*", host: 
> "\*\*\*\*\*"
> \*\*\*\*\* - private information, but here can't any mistake =)
> Object serelize from java.
> new TSerializer().serialize(request);



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to