andig / carddav2fb

Download CardDAV VCards and upload as phonebook to AVM FRITZ!Box
63 stars 19 forks source link

Image upload not working (missing installation step) [PR exists] #74

Closed derwok closed 5 years ago

derwok commented 5 years ago

A run command with parameter -iterminates with the following error:

PHP Fatal error:  Uncaught Error: Call to undefined function imagecreatefromstring() in /home/pi/bin/carddav2fb/src/functions.php:59
Stack trace:
#0 /home/pi/bin/carddav2fb/src/RunCommand.php(64): Andig\uploadImages(Array, Array)
#1 /home/pi/bin/carddav2fb/vendor/symfony/console/Command/Command.php(255): Andig\RunCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 /home/pi/bin/carddav2fb/vendor/symfony/console/Application.php(953): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /home/pi/bin/carddav2fb/vendor/symfony/console/Application.php(248): Symfony\Component\Console\Application->doRunCommand(Object(Andig\RunCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /home/pi/bin/carddav2fb/vendor/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Obj in /home/pi/bin/carddav2fb/src/functions.php on line 59

After a quick google research: It seems the installation steps (README.md) is missing a

sudo apt-get install php7.0-gd

=> I will provide a pull request for the installation steps in the README.md

andig commented 5 years ago

PR #73 contains unrelated changes which are blocking for now.

andig commented 5 years ago

Seems we're still missing the readme updates from #73 to close this one?

derwok commented 5 years ago

We can close this issue (without a respective fix), as the new implementation of the FTP image upload (see PRM https://github.com/andig/carddav2fb/pull/76) now does not re-encode the JPEG image.

So, no PHP GD lib is needed anymore. So, we don't need to list PHP GD lib as installation requirement.