• I was able to use NextGEN Gallery on a templated WordPress site and everything works fine. However, on another site I was successful in installing NextGen gallery and to create a gallery but when I try to upload a .jpg item for the gallery I get the following:

    image.jpg is no valid image

    I have no idea why I would have trouble. I double-checked to make sure the image is truly a .jpg. Any ideas?

    https://www.ads-software.com/extend/plugins/nextgen-gallery/

Viewing 4 replies - 1 through 4 (of 4 total)
  • I’ve the same problem.
    But I think the cause are the files.
    I tried to modify images simply reducing at 99% saved it and all works.
    (excuse my english)

    davoron

    (@davoron)

    Hi,

    i ran in a similar problem, also by getting the “is no valid image file”.
    I run a WordPress 1.9.1 and NextGEN 1.4.3 where I get that Problem.
    And its not important what filetype is given because .png also did not work.

    Its also seams to be a problem with versions of the NextGEN Plugin minimum above 1.1.0 because in that version everything works fine.
    (So all permissions seams to be right)

    The same blog, same server, same anything except of the NextGEN Plugin version of 1.4.3 and the error appears.

    Maybe someone can look into that.
    Thank you guys!

    davoron

    (@davoron)

    Hey I am close to the trigger.

    Its in the file nextgen-gallery/admin/functions.php
    In version 1.4.3 in line 853 and following.
    The Main problem is line 867.
    The function getimagesize triggers the error.

    Why?

    It looks like a missconfiguration or a bug.
    In my case the temp dir for uploads is set to /tmp/ !
    But in my case WordPress and its plugins is not allowed to write there!
    (And thats a right security behavior!)

    I cant find anything that changes the temp path buts its not easy for me to understand all the code of the plugin.
    Our php.ini is configured right so I think it could be a bug in NextGEN.

    Help is appreciated! thank you

    davoron

    (@davoron)

    Ok its not rely a bug of the plugin except of not printing a error…

    In our case, www-data has no write permissions for the php-tmp dir specified and the open_base_dir hase also not included it for that virtual host in the apache config.
    Because of that, php, WordPress or the NextGEN Plugin fall back to the php-tmp dir specified in the php.ini. But because of the restrictions of safe_mod the function getimagesize has no permissions to access that file.

    We have included our php-tmp dir in the open_base_dir configuration of the virtual host and set the write permissions.

    And than all works fine ^^

    it sound complicated and that I think is the result of my bad English skills but I hope my explanations can help.

    Greetings from Germany!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: NextGEN Gallery] image.jpg is no valid image file’ is closed to new replies.