1

Good day! I am new to web application development but I am familiar with PHP. I am hoping to develop a web application while using Google Firebase so I installed tatter/firebase through composer (I also followed everything from the documentations). While installing tatter/firebase in my project folder, the command tells me that PHP cannot find the php_grpc.dll file even if it exists in the right folder location and enabled it in php.ini.

I need serious and immediate help, and I can't find any solutions to this on the web.

This is the screenshot of the command window in Git Bash enter image description here

This is the folder containing the DLL file: enter image description here

This is the ini file:

enter image description here

Running the composer setup again and changing the php.exe to the xampp one, and the error is much worse.

This is the error everytime I am starting Apache serve: enter image description here

Still related to php_grpc.dll

HeroreH29
  • 79
  • 8
  • 1
    [For windows OS] Add this line in your php.ini file: `extension=php_grpc.dll` - see the [offical_documentation](https://cloud.google.com/php/grpc#windows_2) please – Ken Lee Dec 31 '21 at 04:25
  • @KenLee I tried it just now, but still, the error exists. Any ideas why is this happening? – HeroreH29 Dec 31 '21 at 04:27
  • 1
    Make sure you re-start your system after updating php.ini – Ken Lee Dec 31 '21 at 04:28
  • @KenLee I just restarted my system, and tried installing tatter/firebase again but the error still exists – HeroreH29 Dec 31 '21 at 04:33
  • 1
    Does this resolves your issue https://stackoverflow.com/questions/50222772/installing-grpc-for-localhost/50222981 – Riosant Dec 31 '21 at 04:42
  • @Riosant I already followed this before posting my own question. In short, the existing solution did not work on my end :( – HeroreH29 Dec 31 '21 at 04:46
  • 1
    A typical xampp php.ini contains lines for extension like `extension=xxxx.dll` (most of them remarked so will look like `;extension=xxxx.dll` ). Please see picture in this [SO_post](https://stackoverflow.com/questions/33869521/how-can-i-enable-php-extension-intl) . Hence, I am quite doubtful whether you have amended a correct php.ini in your system. – Ken Lee Dec 31 '21 at 06:01
  • @KenLee So I have run the composer setup again to change which `php.exe` it can communicate to. I have changed it to the `php.exe` of xampp but then the error is much worse than before – HeroreH29 Dec 31 '21 at 06:13
  • You error shows that the system is trying to load the DLL (so one step forward already -- instead of saying unable to load) , but find that there is no related entry point for a particular procedure. So (1) check whether the dll is corrupted (and / or is the correct version). and (2) if still in doubt, make sure all the things (xampp, dll) are up-to-date – Ken Lee Dec 31 '21 at 06:46
  • @KenLee I just recently re-downloaded and re-installed xampp and the DLL. I am pretty sure that all of what I need is in **correct** and **updated** versions. – HeroreH29 Dec 31 '21 at 06:50
  • 1
    Did you try installing composer with --ignore-platform-req=ext-grpc ? (i.e., use `composer require tatter/firebase --ignore-platform-req=ext-grpc` ) – Ken Lee Dec 31 '21 at 07:03
  • @KenLee yes but that prevents me from having access to the firebase libraries since gRPC is required to connect the PHP and Google Firebase – HeroreH29 Dec 31 '21 at 07:07
  • 1
    OK, then visit this link: https://pecl.php.net/package/gRPC and choose the version (I believe the latest , stable one), click "DLL" (since you are using Win OS) , and choose the one suitable for your PHP version, and re-download the correct DLL (if you do not know your sytem architecture then try them one-by-one) and re-try – Ken Lee Dec 31 '21 at 07:13

1 Answers1

1

This problem has been bothering me these past few days, and the solution is simple. I am not entirely sure if it is going to work for the others but I installed a downgraded version of XAMPP (8.1.1 before, now 7.4), and it magically worked.

I will thank Ken Lee for helping me with this problem. I deeply appreciate the effort!

HeroreH29
  • 79
  • 8