Previous Thread
Next Thread
Print Thread
Hop To
Joined: Jan 2009
Posts: 94
whk
Offline
Journeyman
Journeyman
Joined: Jan 2009
Posts: 94
I had a new user report that they couldn't get a CAPTCHA image to show when trying to register on the forum. I tried creating a test account and verifed the problem exists. I was using Imagemagick and it was working in 7.4.2. The CAPTCHA image is now a rectangle with a red x. I've temporarily turned off CAPTCHA for new registrations.

I've never been able to get GD2 to display a correct CAPTCHA image - it's always a black marble looking image with nothing readable. Imagemagick paths in the control panel are /usr/local/bin/convert and /usr/local/bin/mogrify

Anyone else see this problem after the upgrade to 7.5? Any ideas on how I can fix GD2 (not related to the upgrade)?

Joined: Dec 2003
Posts: 6,624
Likes: 84
Joined: Dec 2003
Posts: 6,624
Likes: 84
Works fine for me on a linux/apache server with imagemagick.

I saw this one other time on Gizmo's site, the old red x then poof it was working again.
Giz never changed anything.

What about the gallery is it working using Imagemagick?
If not possibly your host changed something?


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Jan 2009
Posts: 94
whk
Offline
Journeyman
Journeyman
Joined: Jan 2009
Posts: 94
In the control panel the "avatars" and "forum images" are all blank except for some custom images I uploaded. The "posting icons", "graemlins","new images" and "moods" are all there.

When I look in the /ubbthreads/images/avatars/default/ directory, all the images are there.

I'm stumped!

Joined: Dec 2003
Posts: 6,624
Likes: 84
Joined: Dec 2003
Posts: 6,624
Likes: 84
Could it be corrupted files/images when you upgraded.
Test some images not working directly from the browser and see if the image appears.
For instance /forums/images/avatars/default/4.jpg.
That is the stock locomotive.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Jan 2009
Posts: 94
whk
Offline
Journeyman
Journeyman
Joined: Jan 2009
Posts: 94
Yup - that was it. I uploaded all the images again, including the CAPTCHA backgrounds. It's now working with Imagemagick. GD2 is still broke, but that's another issue, and as long as Imagemagick works, I'm ok.

Thanks for the Help!

Joined: Dec 2003
Posts: 6,624
Likes: 84
Joined: Dec 2003
Posts: 6,624
Likes: 84
Just as a note. I had a problem with captcha a couple years ago and it was due to my ftp program was uploading a file transfer log file. The extra file in the captcha folder broke the feature.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Jun 2006
Posts: 33
D
newbie
newbie
D Offline
Joined: Jun 2006
Posts: 33
Captcha is broken here with 7.5. I've tried the prior suggestions but don't have an answer. Was working with GD2 here on 7.4.2 (Windows server). Imagemagick is not installed.

Other images are fine, and the backgrounds can be loaded directly in a browser, but only a red x appears in IE or a blank box in FireFox.

The properties of the non-displaying image say that the URL is forums/ubbthreads.php?ubb=captcha&id= followed by what look like the entire source listing of the main forum page.

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
No changes were done to Captcha whatsoever for this release. I'd double check both the backgrounds and fonts directories within the captcha directory. Make sure that they are both readable and that they only contain the image/font files.

On some servers you can get a bit of debugging info by going to a url like:

.../forums/ubbthreads.php?ubb=captcha&t=gd&test=1

Joined: Dec 2003
Posts: 6,624
Likes: 84
Joined: Dec 2003
Posts: 6,624
Likes: 84
Don when I had my problem I was using GD2.
Try the same thing first make sure there are no extra files in the directory and then bring up the two background images in a browser.
See if one of the files are corrupted.
Sorry Don did not really read your whole post that you already tried same.

Last edited by Ruben; 02/25/2009 6:40 PM.

Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Jun 2006
Posts: 33
D
newbie
newbie
D Offline
Joined: Jun 2006
Posts: 33
Problem was apparently the hack done earlier today to stop island display for non-registered users. Restoring the default copy of ubbthreads.php fixed captcha.

Joined: Dec 2003
Posts: 6,624
Likes: 84
Joined: Dec 2003
Posts: 6,624
Likes: 84
Okay I just now tried and the captcha was working. You probably just changed it at the same time.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Jun 2006
Posts: 16,354
Likes: 125
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,354
Likes: 125
Originally Posted by DonB
Problem was apparently the hack done earlier today to stop island display for non-registered users. Restoring the default copy of ubbthreads.php fixed captcha.
And this is precisely why mods aren't really kosher on stock installs tongue...


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Mar 2008
Posts: 327
D
Enthusiast
Enthusiast
D Offline
Joined: Mar 2008
Posts: 327

Joined: Jun 2006
Posts: 33
D
newbie
newbie
D Offline
Joined: Jun 2006
Posts: 33
Thanks, fix worked. I don't mind being the guinea pig, since I haven't opened the forum yet.

Joined: Sep 2007
Posts: 15
M
stranger
stranger
M Offline
Joined: Sep 2007
Posts: 15
It's a bug!
---------------

"Someone" changed the name of the variable in a java script. In 7.2 the name of this variabele was "baseurl" and in 7.5 it's "script", but "script" is not defined. We changed it back to "baseurl" and MAGIC wink the captcha image appears again!

Refer to image.js:


function newCaptcha(type) {
if (image_pending) return;
image_pending = 1;
get_object('ajax_wait').style.display = "";
//var url = script + "?ubb=captcha&init=1&t=" + type;
var url = baseurl + "?ubb=captcha&init=1&t=" + type;
var ajax = new ubbtAJAX(url, updateCaptcha);
ajax.sendData("GET");
}

function updateCaptcha(responseXML) {
id = responseXML;
obj = get_object('captcha_image');
//obj.src = script + "?ubb=captcha&id=" + id;
obj.src = baseurl + "?ubb=captcha&id=" + id;
image_pending = 0;
get_object('ajax_wait').style.display = "none";
}

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
script should be defined and we actually use it in just about every javascript file. Take a look at the html source of each page. You'll see a section in the header area where it defines some javascript variables. For example, here it is:

var script = "https://www.ubbcentral.com/forums/ubbthreads.php";

Joined: Sep 2007
Posts: 15
M
stranger
stranger
M Offline
Joined: Sep 2007
Posts: 15
\You are right. My bad.
Putting the js variables in a template seems a bit unlogical to me though.

Last edited by mikey81; 02/27/2009 11:55 AM.
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
All of the javascript variables in the header template are dynamic and need to be created at execution time, so we can't put them into a staic .js.


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Is this a cookie usse?
by Baldeagle - 10/05/2024 2:01 PM
Search button not there
by ehill - 10/02/2024 2:56 PM
Change the Order of the buttons in a post
by Unixspot - 09/19/2024 10:04 PM
How do I get rid of this?
by Baldeagle - 09/12/2024 6:30 PM
Purging logs does not work
by Baldeagle - 09/12/2024 5:16 PM
Who's Online Now
4 members (Gizmo, Ravenfreak, Ruben, Baldeagle), 308 guests, and 71 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)