为本地主机安装gRPC [英] Installing gRPC for localhost
问题描述
我正在使用 Google Cloud Firestore 的PHP库,这需要我安装并启用 gRPC扩展. >
I'm working with PHP library of Google Cloud Firestore, it requires me to install and enable the gRPC extension.. I've read the guide which says
Windows用户可以从 PECL 下载并启用DLL.支持 Windows是实验性的
Windows users can download and enable DLLs from PECL. Support for Windows is experimental
在 PECL 网站上,我可以看到许多指向tgz
和DLL
的链接文件,但没有任何关于如何在XAMPP中作为本地主机使用或激活它们的说明
In the PECL site I can see many links to tgz
and DLL
files but without any explanation of how to use or activate them in the XAMPP as a localhost
推荐答案
With the help of this link.. I found that these steps will activate gRPC
-
从 PECL 网站(或
From PECL site (or windows.php.net which has the exact same files) .. choose DLL of the latest stable release
根据您拥有的PHP版本:
According to the PHP version you have :
-
对于具有 PHP> 7.2.15 的XAMPP..选择线程安全(TS)x64
For XAMPP with PHP > 7.2.15 .. choose Thread Safe (TS) x64
对于较早的XAMPP ..选择线程安全(TS)x86
For older XAMPP .. choose Thread Safe (TS) x86
下载ZIP文件,然后提取其内容
Download the ZIP file then extract its contents
在您的php.ini
文件中启用扩展名:
Enable the extension in your php.ini
file :
-
对于 PHP 7.2版及更高版本.添加
extension=grpc
对于旧PHP ..添加extension=php_grpc.dll
这篇关于为本地主机安装gRPC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!