SMF Support > SMF 2.0.x Support
error message that says mysql_real_escape_string() expects parameter 2....
feline:
content removed
Arantor:
--- Quote ---Lemme attach a screenshot here...
--- End quote ---
Oops. I was thinking of the wrong thing.
Admin > Main > Support and Credits.
Has a block at the top which lists like so:
--- Quote ---Version Information:
Forum version: SMF 2.0 RC4 (more detailed)
Current SMF version: SMF 2.0 RC5
GD version: bundled (2.0.34 compatible)
MySQL version: 5.1.48-community
PHP: 5.2.13
Server version: Apache/2.2.15 (Win32) PHP/5.2.13
--- End quote ---
@fel Other users are quoting this and it doesn't seem like there are mods in common at the moment, save for ones that have a reasonably high load potential.
Quexinos:
Version Information:
Forum version: SMF 2.0 RC4 (more detailed)
Current SMF version: SMF 2.0 RC5
GD version: bundled (2.0.34 compatible)
MySQL version: 5.1.52
PHP: 5.2.15
Server version: Apache mod_fcgid/2.3.6 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
there you go ^_^
BTW if you want I'll totally give you admin powers at my forum if you wanna poke around. Dunno if that'll help or not.
Arantor:
I don't think having admin access would help at this point :(
Is it still happening/ongoing, or does it happen in bursts? (I've ruled out a few things it could be now I know the PHP version, which is something)
If it happens again, it would be worth making this change, to see what's going on. This is to Subs-Db-Mysql.php as mentioned in the error, only it happens a touch earlier in the process.
--- Code: (find) --- list ($values, $connection) = $db_callback;
--- End code ---
--- Code: (replace) --- if (!is_resource($connection))
{
ob_start();
var_dump(debug_backtrace());
var_dump($connection);
$content = ob_end_clean();
die('Something very bad happened, please advise the administrator of: ' . $content);
}
list ($values, $connection) = $db_callback;
--- End code ---
$connection is the second parameter to mysql_real_escape_string and it's supposed to be a resource, but for some reason it's not. So if it's not a resource, catch it ahead of the game, grab the list of 'backtrace', which will tell us the hierarchy of function calls that got us to this point (to trace execution) and what $connection is at that point, and maybe we can make some sense of it.
It won't be very pretty, and it will end processing there and then, but with any luck it'll give us something useful to work with.
Quexinos:
Uhm...
--- Quote ---Strict Standards: smf_db_replacement__callback() [function.smf-db-replacement--callback]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Chicago' for 'CST/-6.0/no DST' instead in /home/nepta/public_html/equestriaforums.com/Sources/Subs-Db-mysql.php on line 114
Notice: Undefined variable: connection in /home/nepta/public_html/equestriaforums.com/Sources/Subs-Db-mysql.php on line 114
Something very bad happened, please advise the administrator of: 1
--- End quote ---
when I uploaded it
... also I think you gave me the wrong function, shouldn't it be
--- Code: --- if (!is_resource($connection))
{
ob_start();
var_dump(debug_backtrace());
var_dump($connection);
$content = ob_get_contents();
ob_end_clean();
die('Something very bad happened, please advise the administrator of: ' . $content);
}
--- End code ---
?
I got a stack trace with that.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version