SMF Support > SMF 2.0.x Support
error message that says mysql_real_escape_string() expects parameter 2....
Quexinos:
Okay so even though my forum isn't that busy, I sometimes get an error that says it can't connect to the database because it might be too busy. My host said it was probably too many people contacting the database at once, but this seems weird to me because it's not that busy of a forum :-\
The only thing I noticed was in my error logs it says:
[21-Feb-2011 16:00:15] PHP Warning: mysql_real_escape_string() expects parameter 2 to be resource, boolean given in /home/nepta/public_html/equestriaforums.com/Sources/Subs-Db-mysql.php on line 143
over and over and over and over and many many many times . I'm wondering if this is somehow causing the issue... does anyone know how to fix this?
Quexinos:
Bump. You know what? All these errors started the day I installed the 4.0 Security Patch ... maybe there's something wrong with it?
Arantor:
There isn't, since I'm also running just that patch (mind you I made it work on my modified RC3) but the patch is not something that would cause DB errors, it fixes issues in SSI and manage news.
What mods do you have?
mabley:
I have the same problem! We were getting so many database errors that our 10 or so users couldn't really use the forums. We've taken the measures to get rid of spammers such as Arantor's fix, Honeypot and HttpBL, and that has solved our log-out issues, but our database errors continue to be a problem.
I asked my host about it and they responded with this message:
--- Quote --- It appears that you are currently using FastCGI. The first thing to do would be to make sure that both Mediawiki and SMF are compatible with running php as FastCGI. Some programs aren't. For example, I know some third party components for Joomla don't work that way. If that's the case, you'll need to run PHP5 (Single php.ini). Also, I looked at the end of the error_log and saw this:
"[22-Feb-2011 09:50:16] PHP Warning: mysql_real_escape_string() expects parameter 2 to be resource, boolean given in /home3/absitome/public_html/Sources/Subs-Db-mysql.php on line 143"
So, it looks like there's a problem with the syntax of the code. I would investigate that error since it is repeated over and over again.
--- End quote ---
I don't know what this means, honestly. :( Can anyone help?
Details about my forum:
--- Quote ---Powered by SMF 2.0 RC4
SimplePortal 2.3.3
SubAccounts Mod
Add Honey Pot to Track IP
Bad Behavior Mod
Login Detector
HttpBL
Stop Spammer
Order Custom Profile Fields
Custom Form Mod
Footnotes
Drafts
Signature Image Rotator
Bakers Dozen Pages
SMF Links
Tagging System
--- End quote ---
Arantor:
SMF is compatible running through FastCGI - a number of the larger board owners are doing so.
I am beginning to get a bit concerned about these mysql_real_escape_string errors though.
Navigation
[0] Message Index
[#] Next page
Go to full version