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

PHP Connection Refused Problem

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.8
    • Fix Version/s: None
    • Component/s: None

      Description

      PHP Code :

      $GLOBALS['THRIFT_ROOT'] = 'rpc/files/php';
      require_once $GLOBALS['THRIFT_ROOT'].'/Thrift.php';
      require_once $GLOBALS['THRIFT_ROOT'].'/protocol/TBinaryProtocol.php';
      require_once $GLOBALS['THRIFT_ROOT'].'/transport/TSocket.php';
      require_once $GLOBALS['THRIFT_ROOT'].'/transport/THttpClient.php';
      require_once $GLOBALS['THRIFT_ROOT'].'/transport/TBufferedTransport.php';

      require_once $GLOBALS['THRIFT_ROOT'].'/packages/hello/hello.php';
      try{
      $socket = new TSocket('localhost', 9090);
      $transport = new TBufferedTransport($socket);
      $protocol = new TBinaryProtocol($transport);
      $client = new hello_helloClient($protocol);
      $transport->open();

      } catch (TException $tx) {
      echo "Thrift Exception: ".$tx->getMessage()."\n";
      }

      ---------------
      PHP Output :

      ThriftException: TSocket: Could not connect to localhost:9090 (Connection refused [111])

      ---------------

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              trkylmz Tarik Yilmaz
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: