aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/php
diff options
context:
space:
mode:
authorGravatar Stanley Cheung <stanleycheung@google.com>2016-03-03 19:29:11 -0800
committerGravatar Stanley Cheung <stanleycheung@google.com>2016-03-10 16:58:34 -0800
commit7212f16700f765f9acd9681d945401a7ba81081a (patch)
tree412b0561b0468a8938d841149bed3d50a5365cdd /examples/php
parentfbdf51b07e56d0794776e40bc3a4a054e1883f0e (diff)
php: fix examples ClientStub constructor
Diffstat (limited to 'examples/php')
-rw-r--r--examples/php/greeter_client.php4
-rw-r--r--examples/php/route_guide/route_guide_client.php4
2 files changed, 6 insertions, 2 deletions
diff --git a/examples/php/greeter_client.php b/examples/php/greeter_client.php
index e5e4c2651e..718ef88c64 100644
--- a/examples/php/greeter_client.php
+++ b/examples/php/greeter_client.php
@@ -36,7 +36,9 @@ require dirname(__FILE__) . '/vendor/autoload.php';
require dirname(__FILE__) . '/helloworld.php';
function greet($name) {
- $client = new helloworld\GreeterClient('localhost:50051', []);
+ $client = new helloworld\GreeterClient('localhost:50051', [
+ 'credentials' => Grpc\ChannelCredentials::createInsecure()
+ ]);
$request = new helloworld\HelloRequest();
$request->setName($name);
list($reply, $status) = $client->SayHello($request)->wait();
diff --git a/examples/php/route_guide/route_guide_client.php b/examples/php/route_guide/route_guide_client.php
index 3cd1df7254..2f9533be4b 100644
--- a/examples/php/route_guide/route_guide_client.php
+++ b/examples/php/route_guide/route_guide_client.php
@@ -37,7 +37,9 @@ require dirname(__FILE__) . '/route_guide.php';
define('COORD_FACTOR', 1e7);
-$client = new routeguide\RouteGuideClient('localhost:50051', []);
+$client = new routeguide\RouteGuideClient('localhost:50051', [
+ 'credentials' => Grpc\ChannelCredentials::createInsecure()
+]);
function printFeature($feature) {
$name = $feature->getName();