Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-1579

PHP Extention - function thrift_protocol_read_binary not working from TBinarySerializer::deserialize

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 0.8
    • 0.9.2
    • PHP - Library
    • None
    • "Ubuntu Server Cloud Guest 11.10 (Oneiric Ocelot)" - this for AWS
      Nginx + PHP5-FPM

    Description

      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);

      Attachments

        Activity

          People

            Unassigned Unassigned
            mastercode Sergei Labutin
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: