[PHP-DEV] Bug #12083 Updated: addslashes

2001-10-20 Thread sander

ID: 12083
Updated by: sander
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Bogus
Bug Type: Strings related
Operating System: Win32
PHP Version: 4.0.5
New Comment:

addslashes() works fine for me on binary data...
Unlikely to be a bug: ask support questions on the appropriate mailinglist (see 
http://www.php.net/support.php).

Previous Comments:


[2001-07-13 00:46:49] [EMAIL PROTECTED]

$image_file=fopen($HTTP_POST_FILES['imagefile']['tmp_name'],rb);
unset($upload);
while(!feof($image_file)) $upload.=fread($image_file,65535);
fclose($image_file);
$upload=str_replace(\\,,$upload);
$upload=addslashes($upload);
$query_str=INSERT INTO images (id, image_type, image) VALUES('', 
'.$HTTP_POST_FILES['imagefile']['type'].', '$upload');
$insert=mysql_query($query_str, $link);

Function addslashes don't add slashes '\' before '\', and result is corrupt image.



[2001-07-12 03:05:03] [EMAIL PROTECTED]

Please post a short example to show what goes wrong and why.

Derick



[2001-07-12 02:41:51] [EMAIL PROTECTED]

addslashes() don't properly work.
Before use it, need add this:
   $str_any=str_replace(\\,,$str_any);
and only then:
   $str_any=addslashes($str_any);





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


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12083 Updated: addslashes

2001-08-19 Thread sniper

ID: 12083
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old Status: 
Status: Open
Old Bug Type: Unknown/Other Function
Bug Type: Strings related
Operating System: Win32
PHP Version: 4.0.5


Previous Comments:


[2001-07-12 03:05:03] [EMAIL PROTECTED]

Please post a short example to show what goes wrong and why.

Derick



[2001-07-12 02:41:51] [EMAIL PROTECTED]

addslashes() don't properly work.
Before use it, need add this:
   $str_any=str_replace(\\,,$str_any);
and only then:
   $str_any=addslashes($str_any);





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


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12083 Updated: addslashes

2001-07-12 Thread derick

ID: 12083
Updated by: derick
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Feedback
Bug Type: Unknown/Other Function
Operating System: Win32
PHP Version: 4.0.5
New Comment:

Please post a short example to show what goes wrong and why.

Derick

Previous Comments:


[2001-07-12 02:41:51] [EMAIL PROTECTED]

addslashes() don't properly work.
Before use it, need add this:
   $str_any=str_replace(\\,,$str_any);
and only then:
   $str_any=addslashes($str_any);





ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=12083edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12083 Updated: addslashes

2001-07-12 Thread xyrix

ID: 12083
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Feedback
Bug Type: Unknown/Other Function
Operating System: Win32
PHP Version: 4.0.5
New Comment:

$image_file=fopen($HTTP_POST_FILES['imagefile']['tmp_name'],rb);
unset($upload);
while(!feof($image_file)) $upload.=fread($image_file,65535);
fclose($image_file);
$upload=str_replace(\\,,$upload);
$upload=addslashes($upload);
$query_str=INSERT INTO images (id, image_type, image) VALUES('', 
'.$HTTP_POST_FILES['imagefile']['type'].', '$upload');
$insert=mysql_query($query_str, $link);

Function addslashes don't add slashes '\' before '\', and result is corrupt image.

Previous Comments:


[2001-07-12 03:05:03] [EMAIL PROTECTED]

Please post a short example to show what goes wrong and why.

Derick



[2001-07-12 02:41:51] [EMAIL PROTECTED]

addslashes() don't properly work.
Before use it, need add this:
   $str_any=str_replace(\\,,$str_any);
and only then:
   $str_any=addslashes($str_any);





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


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]