Bug #18375 Updated: addslashes doesn't fit for multibyte string

From: Date: Sat, 20 Jul 2002 07:49:08 +0000
Subject: Bug #18375 Updated: addslashes doesn't fit for multibyte string
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-14681@lists.php.net to get a copy of this message
ID: 18375 Updated by: georg@php.net Reported By: Xuefer@21cn.com -Status: Open +Status: Closed Bug Type: MySQL related Operating System: win2k PHP Version: 4.2.1 New Comment: To escape data please use mysql_real_escape_string function, which is implemented in the current cvs version. http://www.php.net/manual/en/function.mysql-real-escape-string.php. Previous Comments: ------------------------------------------------------------------------ [2002-07-17 02:48:51] Xuefer@21cn.com tested with latest build still can't pass also checkout cvs source it's not libmysql 4 ------------------------------------------------------------------------ [2002-07-17 01:53:06] sniper@php.net Everyplace where php_addslashes is used, it's only used if the magic_quotes_* stuff is turned on (magic_quotes_runtime)..or is there someplace where it is used anyway? ------------------------------------------------------------------------ [2002-07-17 01:41:20] xuefer@21cn.com there're some other things to say. i always get my code runnign under magic_quote_* off but php_addslashes()(PHPAPI) is widely used internally there is a configuration flag "magic_quotes_sybase" for special to sybase, will there a flag for warping php_addslashes to mysql_escape_string ? ------------------------------------------------------------------------ [2002-07-17 01:39:36] sniper@php.net Can you please try this snapshot: http://snaps.php.net/win32/php4-win32-latest.zip The bundled mysql lib was updated recently..unfortunately I'm not able to test this as I don't have windowds machine to test it.. About magic_quotes_*: I personally would like to see them removed altogether... ------------------------------------------------------------------------ [2002-07-17 01:34:32] Xuefer@21cn.com of cos magic_quote_* can be turned off, but how about turnning on? and the binary version os php or bundled libmysql in php is out dated both addslashes() and mysql_escape_string() didn't help me to insert binary data into mysql databse :( may be a bug of mysql 4 ?.... after all, i'm not expert to those sources :( ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/18375 -- Edit this bug report at http://bugs.php.net/?id=18375&edit=1

« previous php.bugs (#14681) next »