Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error: Uncaught Error: Class 'IntlBreakIterator' not found #824

Closed
frandachi opened this issue Oct 25, 2019 · 12 comments
Closed

Fatal error: Uncaught Error: Class 'IntlBreakIterator' not found #824

frandachi opened this issue Oct 25, 2019 · 12 comments
Labels

Comments

@frandachi
Copy link

hallo brother, I'm new to this proyect esc/post printer, i have this problem, please give me a solution..

Fatal error: Uncaught Error: Class 'IntlBreakIterator' not found in D:\xampp\htdocs\cetak\src\Mike42\Escpos\CodePage.php:189 Stack trace: #0 D:\xampp\htdocs\cetak\src\Mike42\Escpos\CodePage.php(74): Mike42\Escpos\CodePage::encodingArrayFromData(Array) #1 D:\xampp\htdocs\cetak\src\Mike42\Escpos\CapabilityProfile.php(132): Mike42\Escpos\CodePage->__construct('TCVN-3-1', Array) #2 D:\xampp\htdocs\cetak\src\Mike42\Escpos\CapabilityProfile.php(291): Mike42\Escpos\CapabilityProfile->__construct('default', Array) #3 D:\xampp\htdocs\cetak\src\Mike42\Escpos\Printer.php(367): Mike42\Escpos\CapabilityProfile::load('default') #4 D:\xampp\htdocs\cetak\print.php(14): Mike42\Escpos\Printer->__construct(Object(Mike42\Escpos\PrintConnectors\WindowsPrintConnector)) #5 {main} thrown in D:\xampp\htdocs\cetak\src\Mike42\Escpos\CodePage.php on line 189

how i can fix?

@frandachi frandachi changed the title Esc/post Printer Fatal error: Uncaught Error: Class 'IntlBreakIterator' not found Oct 25, 2019
@mike42
Copy link
Owner

mike42 commented Oct 26, 2019

It looks like you are missing the php-intl extension.

There is some information in the README (link) which covers dependencies, as well as the supported install process - eg. I would have expected composer to complain about the missing extension.

Would you mind sharing your PHP/XAMPP version, and how you installed escpos-php?

@bringar
Copy link

bringar commented Nov 5, 2019

i too have this problem, only with web activity, command-line works flawlessly and issues no errors or warnings. php-intl is installed correctly on debian buster php is 7.3

@bringar
Copy link

bringar commented Nov 5, 2019

Ok, so I had two versions of php installed, cli was using 7.3 and web was using 7.0...doh!

@LoverBotLab
Copy link

i'm having same issue, InvalidArgumentException.php file is missing in Mike42\Escpos folder

@lesmesleiton
Copy link

lesmesleiton commented Dec 9, 2019

hi, i am trying to use this library with laravel 5.8 but was not posible i got this error "Class 'IntlBreakIterator' not found" but i have already installed and configured INTL in php.ini.
I am probed in php without problems works fine but with Laravel is not posible. thanks a lot.

@lesmesleiton
Copy link

lesmesleiton commented Dec 11, 2019

hi, i am trying to use this library with laravel 5.8 but was not posible i got this error "Class 'IntlBreakIterator' not found" but i have already installed and configured INTL in php.ini.
I am probed in php without problems works fine but with Laravel is not posible. thanks a lot.

i found the solution after 3 days with the problem in Laravel 5.8 you need install with composer with this command "composer require mike42/escpos-php" after installed you need to delete the src folder and copy the src folder with this functional example: "https://github.com/parzibyte/imprimir_ticket_php" i solved the problem. The actual code does not work in Laravel something is wrong.

@mike42
Copy link
Owner

mike42 commented Dec 11, 2019

@lesmesleiton - It looks like you are using some unofficially-sourced version 2 code. The suggested install process if you really want an older version would be:

composer require mike42/escpos-php:2.2

As above, 'IntlBreakIterator' not found is likely to mean that the intl extension is not available in you runtime. You can check your runtime information using phpinfo().

To use version 3, your PHP runtime must be version 7.0 or later, and the intl, zlib and json extensions must be available. The requirements and supported install process are documented here.

@mike42 mike42 closed this as completed Dec 11, 2019
@dpkthapa
Copy link

HI Iam facing the same problem. Iam using Ampps. Php 7.3 . Uncommented extension=php_intl.dll in php.ini. php_intl.dll file is also there.
Restarted IIS. Checked everything. But the error is not going.

@rosarose0413
Copy link

hi, I have also this problem:

Message: Class 'IntlBreakIterator' not found

In my local copy the library is working well but when I installed it in Ubuntu server I got the error.
I already check the intl extension, it is already loaded.

What would be the problem?
Can you help me fix the problem.

I'm using php7.4.
Ubuntu 18.04

Thanks

@ghost
Copy link

ghost commented Dec 15, 2020

Hi,
"Fatal error: Uncaught Error: Class 'IntlBreakIterator' not found"

Please your help with some help on this error. In previous versions it works without problems. But that is not the way.

I'm using

  • PHP 7.4.
  • Centos 7

Regards
Mauro

@philipperouchaud
Copy link

I resolved this problem, on Linux, searching intl.ini both in terminal (with php --ini command) and in phpinfo in a browser.
It appears that, using sudo apt install php7.4-intl, /etc/php/7.4/cli/conf.d/20-intl.ini was in the terminal list but not any intl.ini was in phpinfo.
I had to execute a sudo phpenmod intl and a sudo service apache2 restart to solve this problem.

@Jibaru
Copy link

Jibaru commented Jul 4, 2022

sudo apt install php7.4-intl

This works for me. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants