phplist3 icon indicating copy to clipboard operation
phplist3 copied to clipboard

Unknown image format/encoding

Open ghost opened this issue 6 years ago • 7 comments

I activated CKEditor as suggested here.

However when I try to upload an image I get the following error:

Unknown image format/encoding.

Apparently after trying a second time the editor sends a request to a non existent file:

http://lists.domain.org/admin/plugins/CKEditorPlugin/kcfinder/plugins/CKEditorPlugin/kcfinder/upload.php

any ideas? Has this anything to do with the apache mime types?

ghost avatar Oct 09 '19 08:10 ghost

@jucajuca It looks like you have the wrong path to KCFinder on the Settings page. Unless you have moved the CKEditor plugin then the path should be left as plugins/CKEditorPlugin/kcfinder

image

bramley avatar Oct 15 '19 14:10 bramley

I just checked and the path is correct.

Only the second request has a wrong URL.

The fisrt request returns:

Unknown image format/encoding.

image

ghost avatar Oct 16 '19 07:10 ghost

Thanks. Can you check whether the php GD extension is enabled.

Also, for the second point, what are the values in config.php for $pageroot and PLUGIN_ROOTDIR

bramley avatar Oct 16 '19 07:10 bramley

These are the values of the variables:

$pageroot = ''; define("PLUGIN_ROOTDIR","plugins");

Here is an animation:

error-screen

ghost avatar Oct 16 '19 08:10 ghost

Can you try uploading from the image browser window instead to see whether that has the same problem? How do I suspend the animation, it is going too fast to look at?

bramley avatar Oct 16 '19 08:10 bramley

after digging into it I found the problem.

in the config file of kcfinder I had to change the drivers for images. Apparently I do not have imagemagick or gmagick. I think phplist should check if the software is installed.

admin/plugins/CKEditorPlugin/kcfinder/conf/config.php

    'imageDriversPriority' => "gd", //"imagick gmagick gd"  <<< I changed this.
    'jpegQuality' => 90,
    'thumbsDir' => ".thumbs",

ghost avatar Oct 17 '19 18:10 ghost

Thanks for looking into this. The imagick and gmagick are optional and file uploading works when they are not present. Are you sure that you didn't change anything else?

But the plugin should test whether the GD extension is installed, and not allow image upload if it is not. I will look into that.

If GD is not installed then a different error message is displayed as imagick and gmagick are not standard php extensions so will usually not be installed anyway.

Cannot find any of the supported PHP image extensions!

I'm trying to work out how the error message that you had can be produced

Unknown image format/encoding.

What is the php version and phplist release?

bramley avatar Oct 17 '19 19:10 bramley

Closing as the raiser's account no longer exists.

bramley avatar Nov 14 '23 10:11 bramley