Quantcast
Channel: phpBB.com
Viewing all articles
Browse latest Browse all 2717

phpBB Custom Coding • Having problems mysql_escaping some data

$
0
0
Hi there everyone,

I'm trying to store posted data on a specific page to see how an exploit is being attempted but I'm having issue figuring out how to do so for db storage. Superglobals are enabled.

First, I tried:

Code:

$posted_data = sql_escape(utf8_clean_string(serialize($_POST)));
which resulted in a 500 error. Then I tried:

Code:

$posted_data = mysqli_real_escape_string($db, serialize($_POST));
which causes an error of:
[phpBB Debug] PHP Warning: in file [ROOT]/includes/tracker.php on line 394: mysqli_real_escape_string() expects parameter 1 to be mysqli, object given
Could someone point out how I might properly escape this data for db storage?

Thanks for your time!

Statistics: Posted by schwim — Wed May 14, 2025 4:59 pm



Viewing all articles
Browse latest Browse all 2717

Trending Articles