|
Joined: Jan 2009
Posts: 94
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
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
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
newbie
|
newbie
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
Former Developer
|
Former Developer
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
newbie
|
newbie
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
|
Joined: Jun 2006
Posts: 16,354 Likes: 125 |
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 ...
|
|
|
|
Joined: Mar 2008
Posts: 327
Enthusiast
|
Enthusiast
Joined: Mar 2008
Posts: 327 |
|
|
|
|
Joined: Jun 2006
Posts: 33
newbie
|
newbie
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
stranger
|
stranger
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 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
Former Developer
|
Former Developer
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
stranger
|
stranger
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
Former Developer
|
Former Developer
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.
|
|
|
|
|