Captcha Problems

I'm having trouble using captcha with the new version of ZenPhoto (1.1.5). I'm not installing the nightly builds...

What's happening is that when I use a theme that supports captcha and I enable it, I get a broken image link for the captcha image.

I've got zenphoto installed in a /gallery folder and I'd prefer to keep it like this. I edited the webpath to point to this folder and everything is working fine except captcha.

Any idea what could be causing this??

http://www.richmondaltphoto.com/gallery

I've got an old sterile theme setup right now but I'd like to switch to something different and use captcha.

Thanks for the help!
«1

Comments

  • J0B00 Member
    bump
  • zp-core\images\code.png is writable?
  • J0B00 Member
    I looked in that directory and there was no file named code.png

    The zp-core\images folder itself was set to 755, so I've changed it to 777.

    I guess I've got to track down code.png...
  • J0B00 Member
    Ok, I was looking in the wrong place by accident. I found cache.png and changed its permissions to 777 from 644. Still no go...I just get a blank square with a red x in it, like any image that fails to load in IE.

    *edit* Oh wait...I'm looking for "code.png"...nope, thats still not there.
  • With zenphoto 1.1.5 there is no longer a file on disk for the captcha image. It is served "on the fly".

    Looks like you have disabled captcha on your site, so I can't investigate any further.
  • J0B00 Member
    I'll go switch it back...by the time you read this, it should be back up.
  • The HTML looks correct, so we need to check a couple of other things.

    First, is there a file `c.php` in your zp-core folder?
    Second, are there any CGI errors in your server log?
    Third, do protected full images (have to set the option so that images are protected) show when you click on the image on the image page?
  • J0B00 Member
    1. There definately IS a c.hph file in my zp-core folder

    2. I'll have to check on CGI errors...

    3. When I click on an image on the image page (right click), it goes to the next image. When I left-click, it brings up the usual left click menu. Ichecked on the image display settings in zenphoto, and YES "protect full images" is checked.
  • J0B00 Member
    Just checked the error log that is available to me, and no errors except for a few 404 errors from a bot or something trying to access something unrelated to zenphoto.
  • I should have paid attention to the theme you are running. In stopdesign you have to click on the full image link on the left of the image to get what I wanted to see. But, I tried it and it worked. Can you try turning on watermarking to see if the full image will display with a watermark? That path uses the same techinque to display the image as is used to display the captcha.
  • J0B00 Member
    Ok, I turned on watermarking but didn't go thru all the steps to put a watermark image .png file in the zp-core/watermark directory. Whats happening now is that its not displaying thre image at all on the image page, I'm guessing that this is because the watermark image can't be found. I'll finish setting it up and see what happens, but so far it looks like its working.
  • J0B00 Member
    edit....ok, so there WERE watermark images there aready, but its not working...the images won't load when watermarking is turned on...and captcha is doing the same thing...

    progress??

    I was curious is the .htaccess file has anything to do with this. I didn't edit the new one before I uploaded everything, and while everything else is working, sould the path in the .htaccess file be causing a problem??
  • J0B00 Member
    nope, that wasn't it...uploaded a fresh .htaccess file and changed the rewrite base to /gallery which is where my gallery is located. Everything is still working, except with watermarks turned on, images won't load on the image page, and captcha still isn't working.

    Some system specs might help, but I think everything is a current version:

    Apache 1.3.37 (unix) webserver
    PHP version 5.0.5
    MySQL version 5.0.27-standard-log
  • Progress is a relative term. We at least know what is not working but not why. The image creation/pass thru is not working on your site. Both watermarking and captcha make use of this capability. Nothing unusual about your system specs. The error probably has something to do with the GD support, but setup did a check on what we know is required.

    Maybe Tris will note this thread and have something to add. I don't know what is wrong.
  • J0B00 Member
    Hmm....

    Ok, got any ideas tris?
  • trisweb Administrator
    Looks like this is the output of the captcha image generation script - but this just means it's not outputting a valid image.



    The output is actually this...

    `Transfer-Encoding: chunked

    Content-Type: image/png

    200 OK`

    `‰PNG



    ���

    IHDR���A������¯Ú¸’`

    I'm not sure if that's a valid PNG or not, I can't read binary, but the browser definitely says its invalid. It looks like the header is correct (content-type: image/png) but maybe there's something else going on...

    It's definitely a problem with GD or the output function, not with the zenphoto configuration. c.php (the captcha creator) doesn't have the same kind of error reporting that i.php does, so it's nearly impossible to debug from its output alone..

    The only thing I can think of is maybe the fonts can't be found? Or some other configuration error. I really can't say.
  • J0B00 Member
    This may be a long shot, but when I uploaded these files, I'm not sure if my ftp program was set to binary or ascii...would this have made a difference??
  • I believe the same problem is occuring with watermarked images on the image page generated by i.php. Maybe JOB00 can re-enable watermarking and you can look at those.
  • J0B00 Member
    Watermarking is still enabled, and I plan on leaving the gallery as it is until we get this thing going.

    Thanks for all the help guys!
  • Interestning.

    Two things I observe on your site now. The first time I view an image page, the image does not show up, but when I return to view it after going to the next page, it is there! Just refreshing makes it show up. (Unfortunately, if you refresh the image page, the captcha is regenerated.)

    Then, viewing the full image gives an error saying the watermark image is not a valid PNG file. I presume it is the one that came with the zenphoto install, that was valid at least when it left the 'factory'. All told, looks like there is a problem with PNG files on your system. (The captcha is a png image.)
  • J0B00 Member
    Hmmm...

    Well, it doesn't do that for me...weird.

    Its almost like the image is loading before it has been generated/cached, so a refresh makes it show up...Since the captcha is done on the fly, a refresh doesn't help the problem.

    If there's any information I could fetch and relay that might lead in the right direction, let me know!
  • I just moved to a new host and captcha doesn't seem to be working.

    http://www.jasetaro.com/gallery/
  • You should check your error logs. At least one host is treating the Captcha image as a 'threat'. On that site the user was locked out of logging onto his web management because of this. We have no idea why a simple PNG image was considered a threat.

    Anyway, somehow the image is not getting generated. So we need to see why.
  • There's nothing in the error log but the raw access log show this:

    406 Not Acceptable
    /gallery/zp-core/c.php
    http://www.jasetaro.com/gallery/random-photos/West_Point01.jpg.php

    Oddly enough I just in the with my one hosts tech support guys and asked them take a look at the gallery... He said he could see the captcha image with both IE7 and Firefox 2.
  • The 406 error seems to be from some kind of filtering on the data. Not sure what this would be, since c.php just serves a PNG image it creates on the fly.
  • Yeah, I just talked to one of my hosts tier 1 tech weenies he says it's ModSecurity that doesn't like the something that the captcha script is doing. I'm not sure what it could be though.
  • Well, maybe the techs can figure out. If is is something we can change, then we will do so. But again, it is just a png image!
  • Thanks Mate, I'll open a support ticket with them and see what they can come up with.
  • Just to follow-up here's the response I received from Inmontion hostings tier 2 support:

    "The way the captcha works isn't very secure, and our security module running on apache is blocking the Captcha image. This rule has been disabled from the server, and the Captcha is now correctly functioning."

    The captcha is working now but I'd like to now exactly what it is they consider insecure.
  • acrylian Administrator, Developer
    I guess we would like to know that, too.
Sign In or Register to comment.