skip to Main Content

After about a week of trying to install grpc for Firestore with PHP, I managed to get it working, however only when ran in terminals / cmd. This php.ini / environment is on my desktop in a folder and when executing files with firestore commands it works. No errors.

However, when in WAMP, it crashes the page with:

      Fatal error: Uncaught GoogleCloudCoreExceptionGoogleException: The requested client requires the gRPC extension. Please see https://cloud.google.com/php/grpc for installation instructions. in D:wamp64wwwkarmavendorgooglecloud-coresrcClientTrait.php:76 Stack trace: #0 D:wamp64wwwkarmavendorgooglecloud-firestoresrcFirestoreClient.php(139): GoogleCloudFirestoreFirestoreClient->requireGrpc() #1 D:wamp64wwwkarmafunctions.php(32): GoogleCloudFirestoreFirestoreClient->__construct(Array) #2 D:wamp64wwwkarmaFirestore.php(8): Firestore->__construct('test') #3 {main} thrown in D:wamp64wwwkarmavendorgooglecloud-coresrcClientTrait.php on line 76

Now what is really weird is that I copied the directory from desktop and literally pasted it into the WAMP PHP area and there is no difference. It even says in the config that php_grpc is loaded! I dont think the bottom dlls are needed so I don’t think its an issue they’re missing but I find it incredibly strange the same directory on the desktop will run php files from the command line but not in WAMP. WAMP is 64 bit and so is the plugin. PHP version of wamp was 7.0.1 but I replaced the whole 7.0.1 folder with the new 7.4.x version as with the plugin of that version.

grpc active

Why would it say its loaded and yet say it isnt?

2

Answers


  1. Chosen as BEST ANSWER

    I had to completely reinstall wamp to fix this error, in a new directory, reinstall php and made sure I had the correct grpc version. I have no idea what caused the error, but try every recent grpc version (I think there is four) and ensure that in your config file every addition copies the format.

    I had a new php install outside of WAMP which worked, but as wamp has it's own that was bugged for me


  2. I too have have the same issue.I tried all possible ways to fix it.The extension is loaded in waamp but the php shows missing error.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search