0

I'm going to use google cloud spanner database with my web project. So i wnat to install composer. When i run composer install command in cmd it shows this message.

  Problem 1
    - Installation request for google/cloud-spanner ^1.27.1 -> satisfiable by google/cloud-spanner[v1.27.1].
    - google/cloud-spanner v1.27.1 requires ext-grpc * -> the requested PHP extension grpc is missing from your system.

I think this is a problem with my PHP version of some file is missing. Am i right? how to solve this?

Martin Zeitler
  • 1
  • 19
  • 155
  • 216
ManulMad
  • 92
  • 9
  • The error message is right there: `google/cloud-spanner v1.27.1 requires ext-grpc * -> the requested PHP extension grpc is missing from your system.` You have to install grpc extension on your computer. – catcon Apr 14 '20 at 23:38
  • Here is the tutorial from Google: https://cloud.google.com/php/grpc – catcon Apr 14 '20 at 23:38
  • i download the gPRC zip file. Is there are any special way to install it. I have gRPC zip file. – ManulMad Apr 15 '20 at 20:19

1 Answers1

1

You need to install gRPC for PHP in the first place.

On Windows, you'd have to install the DLL manually into PHP extension_dir:

In what directory PHP should look for dynamically loadable extensions.

File-type .tgz might need eg. WinRAR to unpack.

Enable it with extension=php_grpc.dll in php.ini.

For more information, see grpc.io.

Martin Zeitler
  • 1
  • 19
  • 155
  • 216
  • When i'm going to register the dll file it shows an error. **The module** "php_grpc.dll " **failed to load. The specific module cannot be found** . I installed it in **windows\system32** path and used the **regsvr32** command to register it. – ManulMad Apr 15 '20 at 20:22
  • Not exactly sure what your setup is but if we move the php_grpc.dll from wherever you currently have it (windows\system32) into the ext folder in the php directory it should be able to find it. – Lakshmi Pallikila Apr 20 '20 at 16:06