libern / qr-code-reader

Simple PHP QR Code Reader / Decoder
92 stars 28 forks source link

ImageMacigckException #19

Open yopicon2 opened 3 years ago

yopicon2 commented 3 years ago

Hi!

Thanks in advanced for the code!

I run it locally and it has no trouble.

But when a uset in a Ubuntu 20.04 with nginx or amazon lambda, it throws this exception:

ImagickException Object ( [message:protected] => Invalid filename provided [string:Exception:private] => [code:protected] => 1 [file:protected] => /var/www/qr.saas.com.ar/vendor/khanamiryan/qrcode-detector-decoder/lib/QrReader.php [line:protected] => 32 [trace:Exception:private] => Array ( [0] => Array ( [file] => /var/www/qr.saas.com.ar/vendor/khanamiryan/qrcode-detector-decoder/lib/QrReader.php [line] => 32 [function] => readimage [class] => Imagick [type] => -> ) [1] => Array ( [file] => /var/www/qr.saas.com.ar/vendor/libern/qr-code-reader/src/QRCodeReader.php [line] => 21 [function] => __construct [class] => Zxing\QrReader [type] => -> ) [2] => Array ( [file] => /var/www/qr.saas.com.ar/index.php [line] => 13 [function] => decode [class] => Libern\QRCodeReader\QRCodeReader [type] => -> ) ) [previous:Exception:private] => ) 1

Any clue?

I am not using any framework. i've installed it with composer.

yopicon2 commented 3 years ago

I'm using this example on Ubuntu 20.04 decoder.saas.html.zip

IacopoOrtis commented 3 years ago

One sec I will download a zip file posted from a stranger... The print_r is very messy without format. Have you already installed imagick on your server with apt install ?