Go Back   Pligg CMS Forum > Pligg Development > Bug Report

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-11-2006, 12:38 AM
Casual Pligger
 
Join Date: May 2006
Posts: 36
Thanks: 8
Thanked 13 Times in 4 Posts
Exclamation CAPTCHA Image Problems : Some Tips

Hello all,

I just got done with a 5 hour debug stretch trying to get the CAPTCHA image to appear during the user registration process. I finally got it to work so I want to share some of what I learned while it is still fresh in my mind.

If a CAPTCHA image does not appear during the registration process it is most likely because the open source GD library is not installed or configured properly on your system. If you have Zend Studio installed, and you see debug notifications that ImageFontHeight() and ImageFontWidth() are undefined functions, it is because the GD extension DLL is not loaded and those symbols have not been resolved.

I like to run a complete install of Pligg on my local Windows 2000 box with "localhost" as my base URL. I went through hell getting image verification to work and here are some tips.

Make sure you are running PHP 4.4.4 or greater. This version has GD bundled with it. If this your case, follow the instructions on the URL below (ZEND USERS SHOULD READ THIS WHOLE POST):

Around the middle of that FAQ page you'll see the very simple instructions on how to enable the bundled GD 2 DLL. Follow the instructions.

NOTE: Run phpinfo.php to find out the true full path to your PHP.INI file; or you may waste a lot of time chasing down the wrong PHP.INI file. They seem to multiply like rabbits. You'll see the full path to the PHP.INI file that was loaded at the top of the phpinfo.php dump.

Linux users may have to go through some extra hoops, perhaps recompiling PHP with GD support and making sure certain graphics libraries are installed. Windows users should not have to compile anything at all.

THE BIG KICKER FOR SOME ZEND USERS

Ok. So I did all of the above and still GD would not load no matter what I did! I was really going crazy at this point. No matter what I did, when I debugged in Zend, GD never showed up in the module list when I executed phpinfo.php.

Then I found the problem.

I have Zend's WinEnabler package installed on my system. WinEnabler is a replacement DLL for the PHP DLL that usually loads with Apache called php4apache.dll. It's a lot faster and more stable which is why they recommend you install it.

But here's the problem. It doesn't seem to respect PHP.INI or at least, it doesn't know how to load extensions like GD properly. I went back to an old HTTD.CONF, and used php4apache.dll instead:

Quote:
LoadModule php4_module c:/PHP/sapi/php4apache.dll
Bingo! GD showed up in the phpinfo.php dump and in Pligg during the CAPTCHA verifcation used in registration.

NOTE: If the WinEnabler problem applies to you, SAVE your existing HTTD.CONF before trying to revert to php4apache.dll! You may also need to copy php4ts.dll into a directory on your system path. I copied it into C:\WINNT. You can find it in the directory that you installed PHP in.

If you are running Zend WinEnabler on a live Windows server then I don't know what to tell you except to beat on Zend technical support for the exact instructions to get GD working with Zend and Apache. For a live public server it's just not worth it to go back to php4apache.dll, the stock setup. I'm running locally for testing so I don't care.

Good luck! I need a nap.
Reply With Quote
The Following 3 Users Say Thank You to roschler For This Useful Post:
  #2 (permalink)  
Old 10-11-2006, 12:44 AM
kbeeveer46's Avatar
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,547
Thanks: 254
Thanked 649 Times in 513 Posts
I'm really glad that you were able to solve this. Like I said before, I have never seen this but I am really glad you took the time to make the thread for anyone in the future who may come across this.
__________________
I accept donations for my time helping users like you on the forum and IRC.
Reply With Quote
  #3 (permalink)  
Old 07-29-2007, 07:54 PM
New Pligger
 
Join Date: Jul 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
GD is not installed

I can't get the captcha working. The installer troubleshooter says : "GD is not installed".

However, GD is installed and I can see that in phpinfo.
GD Support enabled
GD Version bundled (2.0.28 compatible)
GIF Read Support enabled
GIF Create Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled

Any idea how to troubleshoot this ?

Thanks
Reply With Quote
  #4 (permalink)  
Old 07-29-2007, 08:15 PM
New Pligger
 
Join Date: Jul 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Well, never mind.

This also required jpeg support. I reconfigured php with "--with-jpeg-dir" and that fixed the problem.

Thanks
Reply With Quote
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
Pligg Captcha Yankidank Wiki Articles 1 08-13-2008 02:25 AM
Miising loading image in image upload/thickbox module Peter General Help 5 12-06-2007 02:24 AM
how to resize uploaded image like in indianpad jitu "Mollio-Beat" 1 10-19-2007 10:31 AM
Insert image problems SoapTaco General Help 21 03-06-2007 10:58 PM
Captcha problems, enable_captcha variable joeboxer35 Installation and Upgrade Help 2 01-27-2007 01:42 PM


Search Engine Friendly URLs by vBSEO 3.2.0