2

For a project I want to test the new database from Firebase, Firestore with PHP. But before i can use it, I need a couple of tools. I am trying for a day now to get it work, but no success. I'm stuck on gRPC. I installed is, and it's working on my Mac and I can install Firestore with Composer, but I can't get it to work with XAMPP. When I load a page I get

Fatal error: Uncaught Google\Cloud\Core\Exception\GoogleException: The requested client requires the gRPC extension. Please see https://cloud.google.com/php/grpc for installation instructions. in /vendor/google/cloud-core/src/ClientTrait.php:75 Stack trace: #0 /vendor/google/cloud-firestore/src/FirestoreClient.php(115): Google\Cloud\Firestore\FirestoreClient->requireGrpc() #1 /app/firebase.php(18): Google\Cloud\Firestore\FirestoreClient->__construct() #2 /app/firebase.php(21): App\initialize() #3 /template.php(688): require_once('/Applications/X...') #4 /template.php(647): load_template('/Applications/X...', true) #5 /App in /vendor/google/cloud-core/src/ClientTrait.php on line 75

I added extension=grpc.so to the php.ini that is loaded by XAMPP. But no success.

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
user1664803
  • 293
  • 1
  • 7
  • 22

2 Answers2

0

Try to use DLL file, download from here https://pecl.php.net/package/gRPC

Giangimgs
  • 952
  • 1
  • 12
  • 16
0

Open your php.ini file and uncomment the line extension_dir="ext", add extension="grpc". Then go to the environment variables in the properties, choose path in the system variables and add the php path you are using. I am using C:\xampp\php that's where all the magic will happen it's been a tag of war.

Jsowa
  • 9,104
  • 5
  • 56
  • 60