http://galleryproject.org/node/109994
I recently update my gallery2 server after several years. Along the way I ran into several issues. One of which was that captcha was no longer working to display the image when submitting comments. This has to be a very common issue people are facing even though I’m not seeing it in the forums as the code is broken on new systems. In particular, the arguments to ImageJPEG in modules/captcha/CaptchaImage.inc are wrong:
--- CaptchaImage.inc.orig 2012-11-25 16:12:02.838684229 -0800
+++ CaptchaImage.inc 2012-11-25 16:12:08.733601285 -0800
@@ -88,7 +88,7 @@
/* Output the image and reclaim the memory it used */
/* Use low quality jpeg compression to make the image less OCR-able */
- ImageJPEG($image, '', 50);
+ ImageJPEG($image, NULL, 50);
ImageDestroy($image);
return null;