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

php-mbstring is not mentioned #142

Open
BlackMage2 opened this issue Apr 25, 2023 · 4 comments
Open

php-mbstring is not mentioned #142

BlackMage2 opened this issue Apr 25, 2023 · 4 comments

Comments

@BlackMage2
Copy link

BlackMage2 commented Apr 25, 2023

$ php8.1 -f my-php-qrcode-reader.php 
PHP Fatal error:  Uncaught Error: Call to undefined function Zxing\imagecreatefromstring() in /home/user/Development/my-php-qrcode-reader/vendor/khanamiryan/qrcode-detector-decoder/lib/QrReader.php:46
Stack trace:
#0 /home/user/Development/my-php-qrcode-reader/my-php-qrcode-reader.php(4): Zxing\QrReader->__construct()
#1 {main}
  thrown in /home/user/Development/my-php-qrcode-reader/vendor/khanamiryan/qrcode-detector-decoder/lib/QrReader.php on line 46

why this error occurs? did I forget something?

with that simple code:

<?php
require __DIR__ . "/vendor/autoload.php";
use Zxing\QrReader;
$qrcode = new QrReader('IMG-0069.jpg');
$text = $qrcode->text(); //return decoded text from QR Code
?>

i have executed that in the project directory:

composer require khanamiryan/qrcode-detector-decoder

@BlackMage2
Copy link
Author

BlackMage2 commented Apr 25, 2023

okay, i have now installed the apt package php8.1-gd, now

PHP Fatal error:  Uncaught Error: Call to undefined function Zxing\Qrcode\Decoder\mb_detect_encoding() in /home/sven/Development/my-php-qrcode-reader/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Decoder/DecodedBitStreamParser.php:321
Stack trace:
#0 /home/user/Development/my-php-qrcode-reader/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Decoder/DecodedBitStreamParser.php(111): Zxing\Qrcode\Decoder\DecodedBitStreamParser::decodeByteSegment()
#1 /home/user/Development/my-php-qrcode-reader/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Decoder/Decoder.php(179): Zxing\Qrcode\Decoder\DecodedBitStreamParser::decode()
#2 /home/user/Development/my-php-qrcode-reader/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Decoder/Decoder.php(50): Zxing\Qrcode\Decoder\Decoder->decodeParser()
#3 /home/user/Development/my-php-qrcode-reader/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Decoder/Decoder.php(102): Zxing\Qrcode\Decoder\Decoder->decode()
#4 /home/user/Development/my-php-qrcode-reader/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Decoder/Decoder.php(48): Zxing\Qrcode\Decoder\Decoder->decodeBits()
#5 /home/user/Development/my-php-qrcode-reader/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/QRCodeReader.php(63): Zxing\Qrcode\Decoder\Decoder->decode()
#6 /home/user/Development/my-php-qrcode-reader/vendor/khanamiryan/qrcode-detector-decoder/lib/QrReader.php(91): Zxing\Qrcode\QRCodeReader->decode()
#7 /home/user/Development/my-php-qrcode-reader/vendor/khanamiryan/qrcode-detector-decoder/lib/QrReader.php(100): Zxing\QrReader->decode()
#8 /home/user/Development/my-php-qrcode-reader/my-php-qrcode-reader.php(5): Zxing\QrReader->text()
#9 {main}
  thrown in /home/user/Development/my-php-qrcode-reader/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Decoder/DecodedBitStreamParser.php on line 321

occurs

ok, mbstring seems missing

@BlackMage2
Copy link
Author

BlackMage2 commented Apr 25, 2023

with installing apt package php8.1-mbstring all works :D

php8.1-gd was too required

@msEmmaMays
Copy link

It says GD is required in the Readme.MD - can you close this please?

@BlackMage2
Copy link
Author

no, php-gd AND php-mbstring is required. mbstring is not mentioned

@BlackMage2 BlackMage2 changed the title error with PHP8.1 error with PHP8.1, php-mbstring is not mentioned May 12, 2023
@BlackMage2 BlackMage2 changed the title error with PHP8.1, php-mbstring is not mentioned php-mbstring is not mentioned May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants