[
https://issues.apache.org/jira/browse/THRIFT-1798?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tarik Yilmaz updated THRIFT-1798:
---------------------------------
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])
---------------
was:
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', 9160);
$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:9160 (Connection
refused [111])
---------------
> PHP Connection Refused Problem
> ------------------------------
>
> Key: THRIFT-1798
> URL: https://issues.apache.org/jira/browse/THRIFT-1798
> Project: Thrift
> Issue Type: Bug
> Affects Versions: 0.8
> Reporter: Tarik Yilmaz
> Priority: Minor
> Labels: 111, connection, php, refused, tsocket
>
> 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])
> ---------------
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira