How to install grpc extension in php

藏色散人
Release: 2023-03-11 07:50:02
Original
3979 people have browsed it

How to install grpc extension in php: first add grpc extension configuration in php.ini file; then install protobuf and its php extension; finally restart php-fpm.

How to install grpc extension in php

The operating environment of this article: CentOS Linux release 7.6.1810 system, PHP7.1 version, Dell G3 computer

How to install php grpc extension?

PHP71 Install Google gRPC extension

Steps to "open" gRPC

Install gRPC and its php extension

git clone -b $(curl -L https://grpc.io/release) https://github.com/grpc/grpc
cd grpc
git submodule update --init
make
make install
cd src/php/ext/grpc
phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make
make install
vi /usr/local/php/etc/php.ini
Copy after login

Add grpc extension configuration in the php.ini file: extension=grpc.so

Install protobuf and its php extension

cd ../../../../third_party/protobuf
./autogen.sh
./configure
make
make install
cd php/ext/google/protobuf
phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make
make install
vi /usr/local/php/etc/php.ini
Copy after login

Add protobuf extension configuration in the php.ini file: extension=protobuf .so

Restart php-fpm

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of How to install grpc extension in php. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template