So I was going to start something with number formatter

<?php

function numbers()
{
    $format = new \NumberFormatter("en", \NumberFormatter::SPELLOUT);    
echo $format->format(700); } numbers(); ?>

However I'm getting the error Fatal error: Class 'NumberFormatter' not found

I went into php.ini after searching online and changed ;extension=php_intl.dll , however I'm still getting the error

    Did you restart your web server to get any change made to the php.ini to take effect and are you sure the php.ini that you changed is the one that php is using?

    If you are successful in enabling the extension, there should be an 'intl' section in the output from phpinfo() statement in a .php script.

      pbismad;11063379 wrote:

      Did you restart your web server to get any change made to the php.ini to take effect and are you sure the php.ini that you changed is the one that php is using?

      If you are successful in enabling the extension, there should be an 'intl' section in the output from phpinfo() statement in a .php script.

      Yeah, I triple checked still no joy. The code works on my live server so I'll use that for some random idea I had.

        Is the php_intl.dll file in the 'ext' folder? Some all-in-one WAMP packages don't put the .dll(s) into the folder unless you install extensions using the package's control panel.

        Also, there's a number ic*.dll files that must be present and be in a folder where they can found by php. Mine are in the main 'php' installation folder and un-commenting the line in the php.ini, stopping and starting the web server, got your code to work for me.

          It's there then I looked on php info to make sure the .ini file I was editing was the right one

          Loaded Configuration File 	C:\Program Files (x86)\EasyPHP-Devserver-17\eds-binaries\php\php5630vc11x86x170715201355\php.ini 
          

          Based on https://www.ostraining.com/blog/coding/phpini-file/

          Most like I'll have to buy a new computer at some point, this one can't even do virtualization

            8 months later

            arnabmunshi wrote:

            How to edit php.ini file in cPanel ?

            You can't.

            Originally posted by cpanel/frontend/x3/php/index.html?lang

            PHP Configuration
            Your server’s administrator can customize these PHP configuration settings. The system displays them for your reference only.

            If you or someone you know has access to WHM (the cPanel owner's panel), they might be able to. Otherwise it's a hack via terminal and that voids the warranty, if you know what I mean. 😉

            Keep in mind: some ini settings can be altered at runtime via ini_set().

            Finally, you should really try and figure out how to post a new thread instead of hijacking this one. Look for a button that says, "Start a Discussion" ... which is, as you might guess, green.

              Write a Reply...