FTP'd JPGs not rendered

Hi all, I'm a zen newbie with a fresh install of 1.2, here's my problem:

1. use admin interface to updload one image to http://www.cornellier.com/zenphoto/index.php?album=test
2. so far so good!
3. FTP more images to the albums/test dir
4. refresh metadata.
5. view the gallery, none of the FTP'd images is shown, just place holders (please have a look for yourself)

Any thoughts?
Thanks,
John

Comments

  • Take a look at the permissions for the images you uploaded. Unless you have configured your FTP program, or your shell account to change the permissions of uploaded files automatically, they probably will not be accessible by the web server and therefore zenphoto. Try resetting the permissions for those files to 777 just to test the theory.
  • Just created a new install of 1.2 and I am having the same problem on my local server. I understand permissions, even tried uploading through the admin, images do not display, just the "title". I have permissions set at 777 for albums and cache. tried it on my other mac, same issue. Even made every file and folder in zenphoto 777 on the local site, can't get images to show.
  • code Member
    Try to pre-cashe images, see if you get any off results, this happened to be on last version, fixed with re-install. I didnt care to fix it by editing code... I dunno what I did...reinstall fixed me. Im not saying it will fix yours... Just a newbie suggestion :P
  • Thanks for the replies!

    The dirs created by Zen (including the cache) have perms set to 777, the file I uploaded with Zen was 666. The files I uploaded with FTP were 644. I set everything to 777, purged and recached, but no joy.

    I don't know if it's related, but this file is also not displaying: zp-core/images/zen-logo.gif (it's set to 644).

    After I reset the perms I purged the cache and recached, the FTP'd files do not get cached (although the "uploaded via UI" file does). I know this because I looked into the actual cache directory.

    PHP safe_mode is off.

    public_html/.htaccess has zero bytes.

    Tried a few other hacks like moving a "bad" image to a "good" directory, but it still doesn't display.

    So to summarise, the problem is that images uploaded via the Zen web interface display OK, FTP'd images don't, in spite of resetting permissions.

    Any more ideas? Anything I can test?
    Thanks
    John
  • trisweb Administrator
    C'mon guys, we've got a debug switch just for this...

    http://www.cornellier.com/zenphoto/zp-core/i.php?a=test&i=tree.jpg&s=thumb&debug

    Here's the error:

    `Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: gd-jpeg, libjpeg: recoverable error: Corrupt JPEG data: 732 extraneous bytes before marker 0x41 in /home/cornell/public_html/zenphoto/zp-core/functions-image.php on line 65

    Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: gd-jpeg: JPEG library reports unrecoverable error: in /home/cornell/public_html/zenphoto/zp-core/functions-image.php on line 65

    Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: '/home/cornell/public_html/zenphoto/albums/test/tree.jpg' is not a valid JPEG file in /home/cornell/public_html/zenphoto/zp-core/functions-image.php on line 65`
  • trisweb Administrator
    What that means, especially since it's coming straight from the PHP image function, is most likely that the image is somehow corrupt.

    If you upload the same image via the web interface, does it work?

    Are the FTP transfers always completing 100%?
  • Tris:

    You should add this to the troubleshooting guide.
  • sbillard: yes I did check the troubleshooting after you pointed to it the first time; comments above.

    trisweb: correct, the *same* jpg file renders when uploaded via the web, but *not* when uploaded via FTP. This was OS X / Cyberduck. Haven't had any FTP errors.

    I'd like to add that I tested Zen last week with the previous release and the same files and had no problems.

    Bizarrely I am now on XP / WinSCP and I have more success with FTP; a smaller number fail.

    Note that the files I was uploading were created in 1998 with an Agfa ePhoto 1280 (I was an early adopter :-)) So yeah, maybe they got corrupted ...

    I just tried a batch of newer files and they are 100 per cent OK.

    Thanks for the help debugging so far.
  • trisweb Administrator
    Yep, looks like they're corrupted. It still worries me that the same files uploaded via web do work, but maybe something different is happening in PHP file handling than in FTP. It could be something as simple as touching the file with a new mtime that fixes the issue.

    For the 'corrupt' files I'd recommend resizing them or just reprocessing them in a batch photo resizer or editor program (Picasa, photoshop, whichever) and re-uploading them. I'm sure if they can read the file, they would be able to write it in a more correct JPEG format that GD would handle just fine.

    I will add something about this to the troubleshooting guide.
  • I had the same problem. It seems that my ftp client was set to "ASCII" transfer which resulted in corrupted jpg files. Change your ftp client to "binary" transfers and the images should work fine.
Sign In or Register to comment.