When you try to install Krayin and run the command “composer create-project krayin/laravel-crm” or after installing the Krayin you will get this issue “Class ‘NumberFormatter’ not found”. The reason behind this error is PHP intl extension is not enable that’s why this error will occur. Here we will discuss “How to resolve PHP intl issue in Krayin?
Source: https://www.dotkernel.com/php-troubleshooting/where-is-the-intl-php-extension-problem-solved/
What Is Intl?
Internationalization(Intl) is a design process for a product(application) to make sure that the application accepts various languages without change to the source code of the application.
Maybe you installed an unbundled PHP version, then intl extension is not available there. But if you have the bundled PHP version, the extension might be there but not enabled.
Note:- For this solution, you have root access. If you don’t have root access ask your service provider to install/enable the PHP Intl extension.
Source: https://stackoverflow.com/questions/33869521/how-can-i-enable-php-extension-intl
Solution For Linux Server
Make Sure The Php_intl.So File Exists Within Your PHP Extensions Directory, Find The Extensions Directory By:
- Using phpinfo()
- Running this command:
php -r "echo ini_get('extension_dir');"
- Note: Both options get the extension_dir right from the PHP runtime configuration.
If The File Exists:
- Search for the config file (php.ini, usually /etc/php.ini) and open it.
- Make sure the line “extension=php_intl.so” is existing and not commented.
- Restart the webserver (usually sudo service https restart).
- Check if the extension is enabled using phpinfo()
If The File Doesn’t Exist:
- Check your PHP version by running the “php -v” command.
- For PHP 5 install the php-intl package using your package manager – package managers and commands
- Most common: apt-get install php-intl (for ubuntu-based linux) or yum install php-intl (for CentOS)
- For PHP 7, install the php7.x-intl (depending on your php version)
- Repeat the steps for the case in which the file exists.
Solution For Windows Server:
Make Sure The Php_intl.Dll File Exists Within Your PHP Extensions Directory:
- For separately installed PHP: C:\path\to\php\ext\
- For xampp: C:\path\to\xampp\php\ext
- Note:- your drive letter might be different.
If The File Exists:
- Search for the config file (php.ini, usually in the same folder as the php executable) and open it.
- Make sure the line “extension=php_intl.dll” is existing and not commented.
- Restart the web server (usually apache).
- Check if the extension is enabled using phpinfo()
If The File Doesn’t Exist:
- Check your php version by running the “php -v” command.
- Download the PHP version that corresponds to yours from the PHP Downloads Page (TS/NTS, x86/x64)
- To find thread safety for php, run: php -i | findstr “Thread” , source & more info.
- Search for the php_intl.dll file in the ext folder in that version and copy it in your php\ext folder.
- Repeat the steps for the case in which the file exists.
That’s all about “How to resolve PHP intl issue in Krayin CRM?”. Hope it will be helpful for you.
If you have any issue feel free to raise a ticket at https://webkul.uvdesk.com/en/ or email us on support@krayincrm.com