php-qrcode-detector-decoder icon indicating copy to clipboard operation
php-qrcode-detector-decoder copied to clipboard

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 50331656 bytes) in

Open 532731032 opened this issue 7 years ago • 8 comments

When i decode the qrcode,why report this error ? is image too large?

532731032 avatar Oct 15 '18 07:10 532731032

i had the same wrong i think that the Imagick is the problem use gd is ok

kdlz30 avatar Oct 31 '18 15:10 kdlz30

image i had the same wrong

Hehui1989 avatar Dec 18 '18 09:12 Hehui1989

memory size is not enough,php.ini configure file search "memory_limit = 128M",128M change 256M.try this

------------------ 原始邮件 ------------------ 发件人: "Hehui1989"[email protected]; 发送时间: 2018年12月18日(星期二) 下午5:27 收件人: "khanamiryan/php-qrcode-detector-decoder"[email protected]; 抄送: "不解之缘"[email protected]; "Author"[email protected]; 主题: Re: [khanamiryan/php-qrcode-detector-decoder] Fatal error: Allowedmemory size of 134217728 bytes exhausted (tried to allocate 50331656 bytes) in(#56)

i had the same wrong

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

532731032 avatar Dec 18 '18 09:12 532731032

i had the same wrong i think that the Imagick is the problem use gd is ok

How does one use gd instead? I have both installed.

I keep upping the memory limit and the error message just keeps increasing the amount of bytes exhausted??

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 536870920 bytes) in /var/www/html/mysite.com/vendor/khanamiryan/qrcode-detector-decoder/lib/IMagickLuminanceSource.php on line 60

aaronELBorg avatar Dec 31 '18 02:12 aaronELBorg

$file = 'F:\1wwwroot\ThinkPHP\onethink\wwwroot\Uploads\wechat\tmp/2.png'; $qrcode = new \Zxing\QrReader($file); // , \Zxing\QrReader::SOURCE_TYPE_FILE $text = $qrcode->text(); Allowed memory size of 1073741824 bytes exhausted (tried to allocate 24 bytes) 错误位置 \path\to\Vendor\khanamiryan\qrcode-detector-decoder\lib\IMagickLuminanceSource.php  LINE: 60

image size 3500x2480, 图片 宽高太大, 就会超出内存

pifeifei avatar Mar 26 '19 07:03 pifeifei

Getting the same with with GD ERROR: Fatal Error (1): Allowed memory size of 134217728 bytes exhausted (tried to allocate 134217736 bytes) in [/opt/bitnami/apache2/htdocs/vendor/khanamiryan/qrcode-detector-decoder/lib/GDLuminanceSource.php, line 79] with trivial images.

Upping to 256M works, but does this represent a leak or is it supposed to use this much memory?

Ali1 avatar May 25 '19 14:05 Ali1

Check pull request 76 to solve this issue. https://github.com/khanamiryan/php-qrcode-detector-decoder/pull/76

CeloGomesBR avatar Aug 17 '19 11:08 CeloGomesBR