Question

Intl extension is not loaded how can i Install and enable the intl extension (used for validators).

Posted April 10, 2020 13.3k views
ApacheArch Linux

Dear sir/Madam
how can i fix this issue.
Intl extension is not loaded how can i Install and enable the intl extension (used for validators). when install prestashop theme on ubantu 18.4 digitalocean drouplet ?
php 7.2

Plz help

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hello, @lalkajitamang

Have you tried to install the intl package directly using apt-get? You can try doing so using the following command:

sudo apt-get install -y php-intl

You can then check if the extension is installed using this command:

php -m | grep intl

If you see the extension listed but you’re still getting an error it’s not loaded you can create an info.php file and check if it’s loaded. If it’s not you can open the main pph.ini file or the one that the website is used and add the following line:

extension=intl.so

Let me know how it goes.

Regards,
Alex

  • Well done !
    Really Thanks to
    @alexdo

  • Hi @alexdo,
    it seems like I have the same problem:
    Class “NumberFormatter” not found

    I’m using Laravel v8.62.0 (PHP v8.0.14) on Digitalocean’s Apps platform.

    How can I install / enable intl in an DO App?

    • Hello there,

      A similar question was asked here:

      https://www.digitalocean.com/community/questions/gd-library-extension-on-app-platform

      And answer by Sri

      Yes, you can install the PHP extension on the App Platform.

      When using PHP apps in App Platform we recommend using Composer to configure them. This would allow you to specify GD Library in your composer.json file and have it installed.

      If composer is set to include the GD option then it should pull the image with it enabled. If composer isn’t an option you can use a Dockerfile instead and have it install GD library during the build process.

      To install php GD you would need to use Composer with your app to specify that version.

      Something like this should work:

      • {
      • "require": {
      • "ext-intl": "*"
      • }
      • }

      That would be configured in your composer.json file. As we use Heroku build packs typically composer is the recommended route for anything PHP.

      You cannot use the App console for this. The local filesystem on the host instances running App Platform containers is ephemeral. When deployments happen or containers are replaced the local disk storage will be LOST and not recoverable.

      Hope this helps!
      Regards,
      Alex