Captcha image problem

I see you error with the link provided but I cannot re-create the problem. I have tried with the same settings on a couple of different servers and they all seem to work.

I'm trying to work out what could cause two different results, do you know what PHP version you are running? I'm clutching at straws here though.
 
Info

1) Is there any possibility that it relates to the template used (Rockettheme).
2) I have left the link available
3) Here are the settings.
PHP Built On Linux hp18.hostpapa.com 2.6.18-274.17.1.el5 #1 SMP Tue Jan 10 17:25:58 EST 2012 x86_64
Database Version 5.1.63-cll
Database Collation utf8_general_ci
PHP Version 5.3.10
Web Server Apache
WebServer to PHP Interface cgi-fcgi
Joomla! Version Joomla! 2.5.6 Stable [ Ember ] 19-June-2012 14:00 GMT
Joomla! Platform Version Joomla Platform 11.4.0 Stable [ Brian Kernighan ] 03-Jan-2012 00:00 GMT
User Agent Mozilla/5.0 (Windows NT 6.0) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11
 
I already tried loading your website with the atomic template earlier but I know from the work I did a couple of weeks ago this is a PHP thing.

I'll just have to think why this would blow up on your server and not mine.
 
PHP settings are attached

I have attached the PDF settings. I will leave the site unchanged until tomorrow. The I will try recaptcha. I am working on the email test.
 

Attachments

  • PDF Settings.pdf
    255.4 KB · Views: 557
Can you try changing a line of code.

\plugins\fabrik_element\captcha\forms\image.php

Around line 98'ish. change

ob_end_clean();

to

ob_end_flush();


I managed to find a server which replicates what you are seeing. The above code change works for me but I have yet to work out why it works on some and not others.

There seems to be a few factors that may be causing this which I'll write up separately.
 
Image.php was not in the forms folder but one up. I put the fix in and it worked like a charm. In a previous post, I have sent you the complete php settings stuff in a pdf. Perhaps you can check to see what the difference in libraries is.
 
I worked on this with Felix for a little while yesterday. It is a really weird issue, that as far as I can tell can only be a PHP thing. Seems that ob_end_clean() and ob_get_clean() is simply broken on some PHP implementations. It doesn't even seem to be version specific, it seems to be a combination of PHP version, and OS version. Probably some kind of POSIX compat issue deep in the guts of the kernel.

Looks like using ob_end_flush() is a valid workaround, so I wouldn't worry about trying to track the problem any further.

-- hugh
 
same problem here, with half image showing.
- disabling SEF doesn't solve the problem
- google's recaptcha also has some cropping problems sometimes (I kept refreshing until I got the attached)
 

Attachments

  • Screen Shot 2012-08-03 at 7.39.14 AM.png
    Screen Shot 2012-08-03 at 7.39.14 AM.png
    27.5 KB · Views: 288
-- just updated from latest git (3.0.5-983-g682fa28), captcha looks good, recaptcha still has some problems sometimes

thanks
 
Hmm that's interesting Aldan as the first image shows re-capcha whilst the issue has been captcha.

There was a patch last night that I put through to sort out the captcha issue, which I think you have now discovered.

I need to finish checking pkjoshi's site about the SEF issue.

It seems that many factors can cause this issue but it's strange that they have all suddenly developed at once. As Hugh mentioned earlier we were working on this the other night and I was scratching my head until 6am!
 
well, felixcat, you as a developer, can continue scratching your head, me, as a consumer, I'm happy with captcha working, so I'm done...:) isn't that what software developing is all about? :)
 
I always recommend Recaptcha anyway, as it directly benefits us all by helping to digitize the world's history of printed literature.

But of course we want the vanilla CAPTCHA to work as well, so thank you to both of you for improving that.

-- hugh
 
well, felixcat, you as a developer, can continue scratching your head, me, as a consumer, I'm happy with captcha working, so I'm done...:) isn't that what software developing is all about? :)


Ha ha, me a developer, no chance, I'm just the monkey boy.

The captcha events will make me scratch my head until it's raw, I can't be satisfied that it's working until I work out what the original problem was.
Ditto with Hugh though, digitising the books is a great thing, as long as you spell it right!!! tsk.. expats going native!! :D
 
Captcha problem - another fix

I've been experiencing the same incomplete-image captcha problem described here and have found a fix (for my site - which I've just updated to Fabrik 3.0.6) which is different from all those mentioned above (none of those worked - including SEF on/off).

I did some experimenting with the image alone i.e. loaded /plugins/fabrik_element/captcha/image.php?foo=whatever_firebug_listed into Firefox directly. Noticed that (a) if I changed the image type in image.php to gif or png the problem persisted but the image truncated at a different point and (b) that if I saved the image, I got more of it that way than by loading it into the browser. So on a hunch, I commented out this line in image.php:
Code:
header('Content-Length: '. JString::strlen($img));
on the naive assumption that if the system didn't know how big the image was, it might just carry on regardless.

And it works - absolutely reliably!!

Reporting this here in case it helps anyone else, or contributes to understanding what's going on.
 
PHP 5.3.10 (the site is on shared hosting, and this isn't under my control).
But this morning's update to Fabrik 3.0.6.1 has fixed it anyway. I think it's possible that I had mismatched versions after the upgrade to 3.0.6, forgetting that I had installed a few extras from Github - captcha included - and that they would need updating separately. Now that I've got all of Fabrik showing the latest version, all is well and that may have been the root of my problems all along.
 
Thanks for the update, I was getting worried there. :)

Myself and Hugh looked at this one for a while, the recent fix works, (thankfully confirmed by you), but neither of us could work out why the original code didn't.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top