I am trying to use khanamiryan's php library for reading QR codes from image files; https://github.com/khanamiryan/php-qrcode-detector-decoder
Currently I am unable to get it working on Debian Stretch (specifically Raspbian Stretch on a Raspberry Pi 3B). I can only get HTTP 500 errors.
Clean install of Raspbian Stretch, then the following in a terminal;
sudo apt-get install apache2 php libapache2-mod-php php7.0-gd composer
cd /var/www/html
composer require khanamiryan/qrcode-detector-decoder
Here's the php I am trying to run;
<?php
require __DIR__ . "/vendor/autoload.php";
$qrcode = new QrReader('test.png');
$text = $qrcode->text();
print($text);
?>
Expected result is the text from the QR code in the image test.png is written to the response but I always get HTTP 500 error.
Any suggestions? Do I need to install some underlying C++ or Java library?