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

PHP Connection Refused Problem

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.8
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: