ID:               24383
 Updated by:       [EMAIL PROTECTED]
 Reported By:      baglan at ankara dot edu dot tr
-Status:           Open
+Status:           Bogus
 Bug Type:         Unknown/Other Function
 Operating System: Win32/Linux/OpenBSD
 PHP Version:      4.3.1
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

See comment by Marco


Previous Comments:
------------------------------------------------------------------------

[2003-06-29 08:27:04] marcot at tabini dot ca

Works fine on my Linux system. You probably have magic_quotes_runtime
on, and the string is escaped twice.

------------------------------------------------------------------------

[2003-06-29 08:01:08] baglan at ankara dot edu dot tr

Description:
------------
I write and test PHP scripts on WinXP with Apache 1.3.x and
pre-compiled PHP 4.3.2. Sites where I host my pages are Linux and
OpenBSD running Apache 1.3.x and PHP 4.3.1. In both cases I use MySQL.
Both PHP installations have the same configuration except for the file
paths.

Program I wrote stores HTML pages in database so the text in SQL
statement has to be escaped. Under WinXP I have to write code like
this:

$string = "'".addslashes($string)."'";

Under Linux and OpenBSD installations when I run the same code I get
the string escaped TWICE. I presume that the string is escaped again
during concantenation.

Reproduce code:
---------------
$string = '<IMG SRC="http://example.com/Arrow.gif";>';
$string = "'".addslashes($string)."'";

// Under WinXP I get:
// <IMG SRC=\"http://example.com/Arrow.gif\";>

// Under Linux & OpenBSD I get
// <IMG SRC=\\\"http://example.com/Arrow.gif\\\";>



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=24383&edit=1

Reply via email to