When trying to use gRPC from Windows with PHP, I could find Windows binaries for "protoc.exe" and "php_grpc.dll" but I have not been able to find any "grpc_php_plugin" (exe or dll?) and thus have not succeeded to use gRPC from Windows/PHP.
Documentation page:
https://grpc.io/docs/quickstart/php/
The current documentation at the above paqe is unix-oriented (with "make grpc_php_plugin" and "bins/opt" paths in flags such as --plugin=protoc-gen-grpc=bins/opt/grpc_php_plugin).
However, it kind of seems as Windows should be supported since the page does mention "Install on Windows You can download the pre-compiled grpc.dll extension from the PECL website."
On the other hand, if only two of the three needed binaries are available, then it is not enough, since as far as I understand, the following three binaries are needed:
- "protoc.exe" (indeed available in "protoc-3.11.4-win64.zip" )
- "php_grpc.dll" (indeed is available in "php_grpc-1.28.0-7.4-nts-vc15-x64.zip" ) (and I am using 64 bit Windows 10 with nts/non-thread-safe PHP 7.4.4)
- "grpc_php_plugin" (exe or dll?) NOT (?) available for Windows?
When trying to use the example at the quickstart page, you find this example command:
protoc --proto_path=examples/protos --php_out=examples/php --grpc_out=examples/php --plugin=protoc-gen-grpc=bins/opt/grpc_php_plugin ./examples/protos/helloworld.proto
The problem is the plugin flag "--plugin=protoc-gen-grpc=bins/opt/grpc_php_plugin".
When using Windows, you have not compiled with "make grpc_php_plugin" but need to download a binary for Windows and put it in a Windows path instead of the "bins/opt/grpc_php_plugin".
So, if anyone has actually been able to use gRPC for PHP with Windows 10, then please explain to make it work regarding the "grpc_php_plugin" which seems to be needed but not available.