tree: 9fd52ebf8eef3f796e77fcc7558a54e60ed9eb79 [path history] [tgz]
  1. tests/
  2. byte_buffer.c
  3. byte_buffer.h
  4. call.c
  5. call.h
  6. call_credentials.c
  7. call_credentials.h
  8. channel.c
  9. channel.h
  10. channel_credentials.c
  11. channel_credentials.h
  12. completion_queue.c
  13. completion_queue.h
  14. config.m4
  15. CREDITS
  16. LICENSE
  17. package.xml
  18. php_grpc.c
  19. php_grpc.h
  20. README.md
  21. server.c
  22. server.h
  23. server_credentials.c
  24. server_credentials.h
  25. timeval.c
  26. timeval.h
src/php/ext/grpc/README.md

gRPC PHP Extension

Requirements

Installation

Install PHP 5

$ sudo apt-get install git php5 php5-dev php-pear unzip

Compile gRPC Core Library

Clone the gRPC source code repository

$ git clone https://github.com/grpc/grpc.git

Build and install the gRPC C core libraries

$ cd grpc
$ git checkout --track origin/release-0_11
$ git pull --recurse-submodules && git submodule update --init --recursive
$ make
$ sudo make install

Note: you may encounter a warning about the Protobuf compiler protoc 3.0.0+ not being installed. The following might help, and will be useful later on when we need to compile the protoc-gen-php tool.

$ cd grpc/third_party/protobuf
$ sudo make install   # 'make' should have been run by core grpc

Install the gRPC PHP extension

Quick install

$ sudo pecl install grpc

Note: before a stable release, you may need to do

$ sudo pecl install grpc-beta

OR

Compile from source

$ # from grpc
$ cd src/php/ext/grpc
$ phpize
$ ./configure
$ make
$ sudo make install