aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/php/ext/grpc/README.md
blob: 0ac09e183538ed5e8f58bb39a2438a363a7f7fe8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
gRPC PHP Extension
==================

# Requirements

 * PHP 5.5+
 * [gRPC core library](https://github.com/grpc/grpc) 0.9.1

# 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 Protocol Buffers compiler (protoc)

```
$ # from grpc
$ git checkout --track origin/release-0_9
$ git pull --recurse-submodules && git submodule update --init --recursive
$ cd third_party/protobuf
$ ./autogen.sh
$ ./configure
$ make
$ make check
$ sudo make install
```

Build and install the gRPC C core library

```sh
$ # from grpc
$ make
$ sudo make install
```

## Install the gRPC PHP extension

Quick install

```sh
$ sudo pecl install grpc
```

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

```sh
$ sudo pecl install grpc-0.5.0
```

OR

Compile from source

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