fabianmichael/kirby-imagekit

Discovery crawler libxml error on thumbnail Create

beelaineo opened this issue · 2 comments

After migrating my Kirby site to a Digitalocean droplet running Ubuntu 16.04, whenever I try to create thumbnails using the Imagekit widget I get the following error, even though libxml is enabled (verified via command line and phpinfo()):

The discovery feature of ImageKit needs PHP with the libxml extension to run. in file: /var/www/html/site/plugins/imagekit/widgets/imagekit/lib/apicrawlerresponse.php on line: 48

I can't figure out why this is happening... memory_limit is set to 1024M. It works fine on my local development server but there don't seem to be any differences between the droplet and localhost.

Hi @beelaineo, sorry for my late reply. I’ve been on a longer vacation over the last month, but now I’m finally back!

Can you tell me which PHP version is running on the server? Might be related to that …

The apicrawlerresponse.php tests whether the necessary class DOMDocument (part of libxml) exists by calling !class_exists('\DOMDocument'). If this test fails, the Exception you saw will be thrown and thus crawling fails. Maybe you could test this condition in another script file or try to use a simple libxml example from the PHP docs to check if libxml is working properly on your server?

Just seeing this, sorry! I ended up not using ImageKit on that project but if I run into the problem again I'll follow up here.

On an unrelated (but hopefully helpful to someone) note, since starting developing sites using Kirby approximately 6 months ago, the 2 biggest frustrations I had and solved were both problems caused by my own local dev environment: 1) iCloud drive removing assets and files to the cloud in the middle of developing local sites (never use iCloud drive! LOL), 2) PHP command line server not supporting AJAX files (after moving to MAMP everything was spiffy)