Lines Matching +full:build +full:- +full:php
4 This directory contains source code for PHP implementation of gRPC layered on
6 tutorials can be seen at [grpc.io](https://grpc.io/docs/languages/php/quickstart).
7 gRPC PHP installation instructions for Google Cloud Platform is in
8 [cloud.google.com](https://cloud.google.com/php/grpc).
14 * `php`: version 7.0 or above (PHP 5.x support is deprecated from Sep 2020).
24 * Build from source
35 $ [sudo] pecl install grpc-1.30.0
39 specified [here](https://grpc.io/docs/languages/#official-support).
44 You can download the pre-compiled `grpc.dll` extension from the PECL
45 [website](https://pecl.php.net/package/grpc).
47 ### Build from source
52 $ git clone -b RELEASE_TAG_HERE https://github.com/grpc/grpc
56 #### Build the gRPC C core library
59 $ git submodule update --init
63 #### Build and install the `grpc` extension
69 $ cd src/php/ext/grpc
71 $ GRPC_LIB_SUBDIR=libs/opt ./configure --enable-grpc="${grpc_root}"
77 standard PHP extension directory. You should be able to run
78 the [unit tests](#unit-tests), with the `grpc` extension installed.
81 ### Update php.ini
84 `php.ini` file, depending on where your PHP installation is, to enable the
108 gRPC PHP supports
109 [protocol buffers](https://developers.google.com/protocol-buffers)
110 out-of-the-box. You will need the following things to get started:
112 * `protoc`: the protobuf compiler binary to generate PHP classes for your
123 grpc version you installed. If you build grpc.so from the souce, you can check
130 --- | --- | --- | --- | --- | ---
160 You need the `grpc_php_plugin` to generate the PHP client stub classes. This
164 You can build `grpc_php_plugin` with `cmake`:
167 $ git clone -b RELEASE_TAG_HERE https://github.com/grpc/grpc
169 $ git submodule update --init
170 $ mkdir -p cmake/build
171 $ cd cmake/build
177 in `cmake/build/third_party/protobuf/protoc` and `cmake/build/grpc_php_plugin`.
179 Alternatively, you can also build the `grpc_php_plugin` with `bazel`:
182 $ bazel build @com_google_protobuf//:protoc
183 $ bazel build src/compiler:grpc_php_plugin
187 `bazel-bin/external/com_google_protobuf/protoc`.
189 `bazel-bin/src/compiler/grpc_php_plugin`.
193 version you build this plugin.
211 $ [sudo] pecl install protobuf-3.12.2
214 And add this to your `php.ini` file:
220 #### PHP implementation (for easier installation)
231 ### Generate PHP classes from your service definition
234 in a `.proto` file and generate the corresponding PHP classes, which you can
238 $ protoc -I=. echo.proto --php_out=. --grpc_out=. \
239 --plugin=protoc-gen-grpc=<path to grpc_php_plugin>
247 $ git clone -b RELEASE_TAG_HERE https://github.com/grpc/grpc
249 $ git submodule update --init
255 $ cd grpc/src/php
269 $ cd grpc/src/php
285 $ cd grpc/src/php/tests/generated_code
295 $ cd grpc/src/php
299 ## Apache, PHP-FPM and Nginx
302 PHP-FPM and Nginx, you can check out
303 [this guide](https://github.com/grpc/grpc/tree/master/examples/php/echo).
305 end-to-end example.
311 Here's how you can specify SSL credentials when creating your PHP client:
313 ```php
323 functions, add the following lines to your `php.ini` file:
332 To turn on gRPC tracing, add the following lines to your `php.ini` file. For
338 grpc.grpc_trace=all,-polling,-polling_api,-pollable_refcount,-timer,-timer_check
355 You can customize the user agent string for your gRPC PHP client by specifying
356 this `grpc.primary_user_agent` option when constructing your PHP client:
358 ```php
361 'grpc.primary_user_agent' => 'my-user-agent-identifier',
368 `grpc.max_receive_message_length` option when constructing your PHP client:
370 ```php
379 …behavior on the client side, by specifying the following options when constructing your PHP client.
381 ```php