• Home
  • Raw
  • Download

Lines Matching 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:**
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
64 ## Install the gRPC PHP extension
66 There are two ways to install gRPC PHP extension.
88 [website](https://pecl.php.net/package/grpc)
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`
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:
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
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
383 Add this line to your `php.ini` file, e.g. `/etc/php5/fpm/php.ini`
392 location ~ \.php$ {
393 include snippets/fastcgi-php.conf;
398 Restart nginx and php-fpm
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