mysql_real_escape_string error

robhamm - March 25, 2008 - 22:52
Project:Akismet
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:duplicate
Description

I believe this is just a conflict with the phpBB forum integration module at http://drupal.org/project/phpbbforum, which is why I listed it as normal instead of critical. I'll cross-post this there.

With only core and the phpBBforum modules enabled, I get the following error on my admin/modules page when I enable Akismet--

warning: mysql_real_escape_string() expects parameter 1 to be string, array given in /home/sage/public_html/intexp/includes/database.mysql.inc on line 321.

I am running:
Apache 2.2.8
CENTOS Enterprise 3.9
mySQL 5.0.45
PHP 5.2.5

#1

superjacent - March 25, 2008 - 23:10

Immediately after activating this module, on the next page refresh, therefore still at the 'modules' page, I get this error, similar to above (it's listed 11 times). I do not have phpBBforum activated.

warning: mysqli_real_escape_string() expects parameter 2 to be string, array given in /mounted-storage/.../prime357.com/drupal-6.1/includes/database.mysqli.inc on line 323.

#2

jeffsensat - March 28, 2008 - 17:25

Thanks for pointing me to this thread, Steven. I’m in the same boat as you guys with Drupal 6.1. I get this:

warning: mysql_real_escape_string() expects parameter 1 to be string, array given in /home/.jammie/my.web.site/includes/database.mysql.inc on line 321.

It appears 40 times in succession when I access http://my.web.site/admin/build/modules

Running update.php doesn’t fix it. Even disabling Akismet (if it is, indeed, the culprit), doesn’t fix it. I haven’t run update.php since disabling. I’ll try that. If that doesn’t fix it, can this be manually, or otherwise, fixed? (I’m an SQL neophite.)

I actually tested out phpBB forum a few weeks ago but disabled it after I couldn’t get it to work properly. I installed Akismet 6.x-1.x-dev last night and ... BAM. This mess.

#3

jeffsensat - March 28, 2008 - 17:33

After disabling Akismet 6.x-1.x-dev, and running update.php, the errors went away. Phew.

#4

stevendshelton - April 2, 2008 - 22:54

I get the same error but do not have PHPBB installed. Disabled Aksimet and ran update.php and error went away.

#5

drewish - April 7, 2008 - 05:00
Status:active» duplicate

see #242336: 'access callback' needs to be string

#6

jensen - May 19, 2008 - 07:22

"Akismet spam protection requires a WordPress.com API key to function. Obtain a key by signing up for a free account at WordPress.com, then enter the key on the Akismet settings page."

Problem went away yesterday but came back today. The error message mysql_real_escape_string() blablabla line 321 appears on the modules page only

#7

dfranney - January 8, 2010 - 01:02

I just installed 6.15 and got this error when I run update.php. I'm not running either PHBB or Akismet. Has anyone found the real solution to this problem?

 
 

Drupal is a registered trademark of Dries Buytaert.