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