ID:               26597
 User updated by:  valyala at tut dot by
 Reported By:      valyala at tut dot by
-Status:           Feedback
+Status:           Closed
-Bug Type:         Scripting Engine problem
+Bug Type:         Strings related
 Operating System: Win2k sp3
 PHP Version:      4.3.4
 New Comment:

I found my error.
My script was doing something like this:
if (get_magic_quotes_gpc()) $_FILES['any_file']['tmp_name'] =
stripslashes($_FILES['any_file']['tmp_name']);
:)
But I can't understand why function stripslashes() strips all
backslashes, not only before special characters [0, \, ', "], which
escapes function addlashes().


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

[2003-12-14 20:41:43] [EMAIL PROTECTED]

Try this:

print(addslashes($_FILES['any_file']['tmp_name']));


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

[2003-12-12 04:50:43] valyala at tut dot by

Description:
------------
PHP 4.3.4 is running under apache 1.3.27 as module.

Value of $_FILES['any_file']['tmp_name'] is wrong. All slashes in the
path has been deleted. So, I cannot know the real filename of temporary
file.

Reproduce code:
---------------
/* file with name 'any_file' was posted to the script
 I want to see, where the temporary file was stored on the server:
*/
print($_FILES['any_file']['tmp_name']);

Expected result:
----------------
c:/winnt/temp/phpXX.tmp


Actual result:
--------------
c:winnttempphpXX.tmp


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


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

Reply via email to