Attempted to call function \"imagecreatefromstring\" from namespace \"Zxing\"
k0v4back opened this issue · comments
Vadim Kosolapov commented
My code:
`<?php
use Zxing\QrReader;
$qrcode = new QrReader('http://qrcoder.ru/code/?lalala&4&0');
$text = $qrcode->text(); //return decoded text from QR Code
echo $text;
I have error: Attempted to call function "imagecreatefromstring" from namespace "Zxing"
`
How to fix problem?
Celo Gomes commented
Check if you have GD lib extension activated in PHP
Thiago Copano commented
Check if you have GD lib extension activated in PHP
This solved for me, uncommenting extension GD on php.ini file.