Page 1 of 1

php_log table filled with CAPTCHA error

Posted: Thu May 10, 2012 10:14 am
by fulgan
Support Request Template
What version of phpBB are you using? phpBB 3.0.10
What is your board's URL? http://forums.fulgan.com
Who do you host your board with? self-hosted
How did you install your board? I used the download package from phpBB.com
What is the most recent action performed on your board? Update from a previous version of phpBB3
Is registration required to reproduce this issue? Yes
Do you have any MODs installed? No
What version of phpBB3 did you update from? phpBB 3.0.8
What styles do you currently have installed? prosilver, subsilver2
What language(s) is your board currently using? EN
Which database type/version are you using? MS SQL Server
What is your level of experience? Comfortable with PHP and phpBB
What username can be used to view this issue? No answer given
What password can be used to view this issue? No answer given
When did your problem begin? Right after upgrading PHPBB to 3.0.10 and PHP to 5.4.3
Please describe your problem. The phpbb3_log table is filling with the following error log:

Error while creating image
?? Error in [ROOT]/includes/captcha/captcha_non_gd.php on line 124: String offset cast occured

This occures several dozen times a minute. The table grew to be gigabyte-sized.

I'm in the process of cleaning up the DB but I don't know the source cause for this.
Generated by SRT Generator

Re: php_log table filled with CAPTCHA error

Posted: Thu May 10, 2012 12:32 pm
by Oyabun1
Try replacing the whole of the /includes/captcha/ folder with the one from the Latest Version package.

Re: php_log table filled with CAPTCHA error

Posted: Thu May 10, 2012 12:44 pm
by fulgan
Thank you for answering and your suggestion.

I have done that but it doesn't solve the issue (I have temporarily disabled CAPTCHA in order to keep the DB size under control).

I should have mentionned it in my initial post but, of course, no CAPTCHA actually works on my board at the moment.

Re: php_log table filled with CAPTCHA error

Posted: Thu May 10, 2012 1:00 pm
by T0ny
if line 124 in your /includes/captcha/captcha_non_gd.php is

Code: Select all

$pixel = ord($scanline{$i});
Then change line 122 from

Code: Select all

for ($i = floor($width/2); $i < $end; $i++)
to

Code: Select all

for ($i = (int)floor($width/2); $i < $end; $i++)
i.e. add the (int). That fixed the errors for me.

Re: php_log table filled with CAPTCHA error

Posted: Thu May 10, 2012 1:13 pm
by fulgan
Thanks a lot: that fixed it for me as well.

Re: php_log table filled with CAPTCHA error

Posted: Thu May 10, 2012 1:20 pm
by Mick
fulgan wrote:no CAPTCHA actually works on my board at the moment.
While this won't fix your immediate problem you shouldn't be using any of the visual CAPTCHAs anyway, they were defeated ages ago. You should read the sticky at the top of this forum Preventing Spam in phpBB3 and then I suggest you adopt the Q&A CAPTCHA using a GOOD non-searchable Q&A.

Re: php_log table filled with CAPTCHA error

Posted: Thu May 10, 2012 1:29 pm
by fulgan
Thank you for your suggestion.

I do not have too many issues with my board any more: blocking half of Russia, Asia, India and South America from sending registrations to my board cut the load down to a very low amount and now i do not have any spam problem any more (it's not an issue since this is purely a local BB)

Maybe I do not need the CAPTCHA at all but it used to work that way (and well) so I didn't want to simply suppress the functionality.

Anyway, I will keep your suggestion in mind shall I need to adjust this again. Thank you

Re: php_log table filled with CAPTCHA error

Posted: Wed Jan 09, 2013 6:59 am
by Oleg