Avatar Verification

Started by Akyhne, October 18, 2009, 09:32:39 PM

Previous topic - Next topic

Akyhne

Guess it's a bug in your browser, as the 5 browsers I use don't have the errors.

JulesW

Just happened to me with chrome as well, and presumably with other peoples browsers too, as I regularly have these errors in the log of the forum.

Screenshot of chrome:
And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17

butchs

I am getting complaints that images are x'ed out (I know one has IE8) and have several pages of the following errors in the log:

index.php?PHPSESSID=b431a0564614d0414bd57157379695fe&action=verificationsimages&avatar=f6b339aa2714e3d97416c9fc540cefc3&type=22: Invalid argument supplied for foreach()File: ...Sources/Subs-CaptchaAvatar.php
Line: 16


index.php?PHPSESSID=b431a0564614d0414bd57157379695fe&action=verificationsimages&avatar=f6b339aa2714e3d97416c9fc540cefc3&type=28: Undefined index: AvatarsToShowFile: .../Sources/Subs-CaptchaAvatar.php
Line: 16

I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

butchs

I like this mod so much I tried to fix it.  Attached is my attempt to get rid of the errors.

It does look like it is working on RC3.
:)
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

Akyhne

Thanks. Hopefully it will help people.

Akyhne

Finally got time to update for RC3 support. Added butchs' fix - hope it solves peoples problem as I can't generate those errors myself.

Bugo

It's a visual bug => look at screenshot

Akyhne

Small visual error. I'll fix it soon.

Akyhne

I corrected the visual error and made a small update. It's not nessescary to update, unless you don't like to see the error.

societyofrobots

After installing I noticed my error log is getting filled with this:

Quote
2: imagedestroy(): supplied argument is not a valid Image resource
File: /home/a_folder/public_html/forum/Sources/Subs-CaptchaAvatar.php
Line: 144

Further investigating the IPs revealed its caused by search engine spiders like microsoft and google.

Any way to prevent this error from occurring?

Akyhne

It happens because the search engines/spiders follows old links. Because the links on the images are unique from one visit to the next, the spiders follow links that are not valid anymore.
I never really figured a way to prevent it from happening, then again it's not that often that spiders visit those links.

societyofrobots

Quote from: Akyhne on May 06, 2010, 06:09:25 PM
I never really figured a way to prevent it from happening, then again it's not that often that spiders visit those links.
This mod causes ~3 pages of errors per day . . . spiders like my website . . .

butchs

What about "nofollow", SMF uses it for some links.  I am sure you can copy it from the source.   8)
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

Akyhne

nofollow doesn't give any guaranties. So if you want the mod error free, another solution is needed.

Arantor

Hang on, why is visiting old links causing imagedestroy errors exactly?

If you're attempting to load images into resources, and that fails, check for it before calling imagedestroy.
Holder of controversial views, all of which my own.


Akyhne

Quote from: Arantor on May 09, 2010, 05:55:21 AM
Hang on, why is visiting old links causing imagedestroy errors exactly?

If you're attempting to load images into resources, and that fails, check for it before calling imagedestroy.
If you click the register page, the mod fetches some random pictures and generates an array with the images. The array is used to decide what images are used.
If you click an old link to the verification without that array created, you get the errors.

Arantor

Then surely you should be able to check whether the array is created before using it?
Holder of controversial views, all of which my own.


Akyhne


Arantor

Holder of controversial views, all of which my own.


butchs

Something like?

if (is_array($???))  // Is this an array
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

Advertisement: