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/quickstart/php.html).
7 gRPC PHP installation instructions for Google Cloud Platform is in
8 [cloud.google.com](https://cloud.google.com/php/grpc).
14 * `php` 5.5 or above, 7.0 or above
19 **Install PHP and PECL on Ubuntu/Debian:**
24 $ sudo apt-get install php5 php5-dev php-pear phpunit
30 $ sudo apt-get install php7.0 php7.0-dev php-pear phpunit
34 $ sudo apt-get install php php-dev php-pear phpunit
37 **Install PHP and PECL on CentOS/RHEL 7:**
39 $ sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
40 $ sudo rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
41 $ sudo yum install php56w php56w-devel php-pear phpunit gcc zlib-devel
44 **Install PHP and PECL on Mac:**
46 $ brew install homebrew/php/php56-grpc
47 $ curl -O http://pear.php.net/go-pear.phar
48 $ sudo php -d detect_unicode=0 go-pear.phar
53 $ curl -sS https://getcomposer.org/installer | php
59 $ wget https://phar.phpunit.de/phpunit-old.phar
60 $ chmod +x phpunit-old.phar
61 $ sudo mv phpunit-old.phar /usr/bin/phpunit
64 ## Install the gRPC PHP extension
66 There are two ways to install gRPC PHP extension.
68 * `build from source`
79 sudo pecl install grpc-1.12.0
87 You can download the pre-compiled gRPC extension from the PECL
88 [website](https://pecl.php.net/package/grpc)
90 ### Build from Source with gRPC C core library
95 $ git clone -b $(curl -L https://grpc.io/release) https://github.com/grpc/grpc
98 #### Build and install the gRPC C core library
102 $ git submodule update --init
107 #### Build and install gRPC PHP extension
109 Compile the gRPC PHP extension
112 $ cd grpc/src/php/ext/grpc
119 This will compile and install the gRPC PHP extension into the
120 standard PHP extension directory. You should be able to run
121 the [unit tests](#unit-tests), with the PHP extension installed.
124 ### Update php.ini
127 to your `php.ini` file, (e.g. `/etc/php5/cli/php.ini`,
128 `/etc/php5/apache2/php.ini`, or `/usr/local/etc/php/5.6/php.ini`),
129 depending on where your PHP installation is.
135 **Add the gRPC PHP library as a Composer dependency**
152 * `grpc_php_plugin: Generates PHP gRPC service interface out of Protobuf IDL`
159 grpc version you installed. If you build grpc.so from the souce, you can check
165 --- | ---
208 $ sudo pecl install protobuf-3.5.1.1
211 Add this to your `php.ini` file:
217 #### 2. PHP implementation (for easier installation)
227 ### PHP Protoc Plugin
229 You need the gRPC PHP protoc plugin to generate the client stub classes.
237 You can also just build the gRPC PHP protoc plugin by running:
240 $ git clone -b $(curl -L https://grpc.io/release) https://github.com/grpc/grpc
242 $ git submodule update --init
248 you build this plugin.
255 $ git clone -b $(curl -L https://grpc.io/release) https://github.com/grpc/grpc
257 $ git submodule update --init
263 $ cd grpc/src/php
277 $ cd grpc/src/php
287 $ cd grpc/src/php
307 $ cd grpc/src/php
311 ## Use the gRPC PHP extension with Apache
316 $ sudo apt-get install apache2
319 Add this line to your `php.ini` file, e.g. `/etc/php5/apache2/php.ini`
320 or `/etc/php/7.0/apache2/php.ini`
340 Make sure you have run `composer install` to generate the `vendor/autoload.php` file
343 $ cd grpc/src/php
353 Copy the `math_client.php` file into your Apache document root, e.g.
356 $ cp tests/generated_code/math_client.php /var/www/html
361 ```php
362 include 'vendor/autoload.php';
365 Connect to `localhost/math_client.php` in your browser, or run this from command line:
368 $ curl localhost/math_client.php
371 ## Use the gRPC PHP extension with Nginx/PHP-FPM
373 Install `nginx` and `php5-fpm`, in addition to `php5` above
376 $ sudo apt-get install nginx php5-fpm
380 $ sudo apt-get install nginx php7.0-fpm
383 Add this line to your `php.ini` file, e.g. `/etc/php5/fpm/php.ini`
389 Uncomment the following lines in your `/etc/nginx/sites-available/default` file:
392 location ~ \.php$ {
393 include snippets/fastcgi-php.conf;
394 fastcgi_pass unix:/var/run/php5-fpm.sock;
398 Restart nginx and php-fpm
402 $ sudo service php5-fpm restart
413 Make sure you have run `composer install` to generate the `vendor/autoload.php` file
416 $ cd grpc/src/php
426 Copy the `math_client.php` file into your Nginx document root, e.g.
429 $ cp tests/generated_code/math_client.php /var/www/html
434 ```php
435 include 'vendor/autoload.php';
438 Connect to `localhost/math_client.php` in your browser, or run this from command line:
441 $ curl localhost/math_client.php