Search code examples
php

PHP intl extension not loading after enabling it


Just when I tried to use the NumberFormatter class in my code which requires the php intl extension in order to use the class. I enabled the extension by un-commenting it in the php.ini configuration file but still won't work. I changed this

;extension=intl

to this

extension=intl

but still doesn't work even after restarting my server.


Solution

  • I found a way to do that which works for me. What I did is to copy the all the files containing this name icu****.dll from my php directory into the Apache bin directory then restart my server.

    The icu****.dll files are up to 4 in my own php directory. I tried this using php version 7.4.9

    To see the loaded extensions, run the code below on your server.

    <?php
    $extensions = get_loaded_extensions();
    print_r($extensions);
    ?>
    

    The solution was got from this github issue