问题描述
我正在使用
根据你的PHP版本:
对于带有 PHP > 7.2.15 的 XAMPP .. 选择 Thread Safe (TS) x64
对于较旧的 XAMPP .. 选择 Thread Safe (TS) x86
下载 ZIP 文件,然后提取其内容
php_grpc.dll
文件复制到XAMPP中的extensions文件夹(路径可以在php.ini
中找到)..在我的情况是 extension_dir="C:xamppphpext"
在您的 php.ini
文件中启用扩展:
对于 PHP 7.2 版 及更高版本.. 添加
extension=grpc
对于旧 PHP .. 添加
extension=php_grpc.dll
phpinfo()
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
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
From PECL site (or windows.php.net which has the exact same files) .. choose DLL of the latest stable release
According to the PHP version you have :
For XAMPP with PHP > 7.2.15 .. choose Thread Safe (TS) x64
For older XAMPP .. choose Thread Safe (TS) x86
Download the ZIP file then extract its contents
- Copy the
php_grpc.dll
file to the extensions folder in XAMPP (you can find the path inphp.ini
) .. in my case it wasextension_dir="C:xamppphpext"
Enable the extension in your
php.ini
file :For PHP version 7.2 and up .. add
extension=grpc
For older PHP .. add
extension=php_grpc.dll
- Restart XAMPP and the extension will be activated as showed in
phpinfo()
这篇关于为本地主机安装 gRPC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!