Support for php GMP extension

What issue or error are you experiencing?

I have a site that requires the GMP core extension - PHP: GMP - Manual
I’m unable to get this installed for local app.

What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc

I’m aware of guidance for PECL extensions (How do I compile additional PHP extensions?) however I am not seeing any support on how to go about enabling core extensions like GMP.

Here is a related item with no resolution:

System Details

  • Local Version:
    Version 8.2.0+6554

  • Operating System (OS) and OS version:
    MacOS Ventura 13.5

Local Logs

Attach your Local Logs here (Help Doc - Retrieving Local’s Log)

Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

Hey @jquiroz - thanks for reaching out!

We don’t compile GMP with our PHP versions - we use bcmath instead. Can you tell me more about how your site is using GMP? Is there a reason you need GMP and can’t leverage another math package like bcmath?

Those older instructions for enabling PHP extensions are outdated and probably don’t work. On the thread you linked - intl has been added to all of our PHP versions, but we should clean up the old post. Thanks for finding that!

Adding GMP though should be relatively straightforward - I can turn this into a feature request and ask the engineering team to take a look!

1 Like

Hello thank you for the prompt response!

Yes I need GMP because bcmath does not have a gcd alternative → PHP: gmp_gcd - Manual

Thank you for any effort to include GMP by default - in the meantime is there any guidance for me to enable this?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.