bezhanSalleh / filament-google-analytics

Google Analytics integration with Filamentphp (FilamentAdmin)
MIT License
162 stars 28 forks source link

gmp extension not recognized when using laravel octane #57

Closed Issa-projects closed 6 months ago

Issa-projects commented 6 months ago

I am getting an error with gmp_sign function on production website. I managed to solve it locally on laravel sail by installing the gmp extension. However, installing the extension on the production server (tested it exists and work by php -m) did not help. I get the same error https://github.com/bezhanSalleh/filament-google-analytics/issues/54 . I restarted the octane server, nginx and even rebooted ubuntu still didn't help.

Tested the extension and it works

$number = '123456789';

if (extension_loaded('gmp')) {
    $result = gmp_sign($number);
    echo "Result: $result\n";
} else {
    echo "GMP extension is not loaded.\n";
}
jcsoriano commented 4 months ago

Hi @Issa-projects how did you end up fixing this? We have the same issue and we're also on Octane

RChutchev commented 4 months ago

Hi @Issa-projects how did you end up fixing this? We have the same issue and we're also on Octane

On a production server with PHP, the gmp extension is usually installed, otherwise contact your hosting provider for instructions on how to enable this extension.

For your personal environments like development, install the gmp extension for php, you can google how to install gmp for php, b/c it depends on OS etc.

jcsoriano commented 4 months ago

Thanks @RChutchev

In our case, it turned out to be related to frankenphp: https://github.com/dunglas/frankenphp/issues/623

Switching to Swoole fixed it for us