Jump to content

[TIPS] Error saat input data


caparuni

Recommended Posts

saat kita saat kita input/import data kadang muncul error yang ga tawu alasannya... nah hal yang peling pertama harus di lakukan adalah... coba periksa mungkin ada kata yang di blacklist ama ps...
bisa di liat .../classes/Db.php (line 49)

private static $_blacklist = 'UNION|LOAD_FILE|OUTFILE|DUMPFILE|ESCAPED|TERMINATED|CASCADE|INFILE|X509|TRIGGER|REVOKE';



ini bakalan di cek dlm mode regex yah, jd kata tersebut dan berbagai varian/kombinasi nya, misalnya union, reunion, dsb
gw abisin waktu ampir seminggu untuk cari tawu kenapa data import gw ga bisa2.... :)

Link to comment
Share on other sites

jgn sampe di produk kita ada kata2 dlm blacklist... di field mana pun, mulai dr name, desc, meta, cms... smua pokoknya, cobain deh... ;)
yah kalo make pma ga ngaruh. nah kalo gw blom dpt jawaban knp ada blacklist ini & blom cobain kalo kata2 tsb diganti, kalo dah tawu nanti gw share deh.

Link to comment
Share on other sites

yoi... maka na gw modif Db.php nya

dari :

public static function blacklist(&$query)
{
   return eregi(self::$_blacklist, $query) ? true : false;
}



ke :

public static function blacklist(&$query)
{
   eregi_replace( "(self::$_blacklist)", "`\\1`", $query);
   return;
}



:: cmiiw ::

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...