php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3288 PHP 3.014 looses uploaded files.
Submitted: 2000-01-23 16:40 UTC Modified: 2002-10-01 15:11 UTC
From: rusty at alwaysthinking dot com Assigned:
Status: Not a bug Package: Other
PHP Version: 3.0.14 OS: Windows 98
Private report: No CVE-ID: None
 [2000-01-23 16:40 UTC] rusty at alwaysthinking dot com
Form POST related:

Using the Windows compiled binaries.

Version 3.0.14 gives a file name for uploaded files, but there is no file there.  Version 4 Beta 3 works fine.

PHP 3.0.14 output:

Warning: Unable to open 'C:\\WINDOWS\\TEMP\\php2' for reading: Unknown error in webpages/FileUtil.php3 on line 16

Warning: Unlink failed (Permission denied) in webpages/FileUtil.php3 on line 17
File uploaded as: autoexec.bat



PHP 4 output:

File uploaded as: autoexec.bat


Code Segment:

<?
	//check for file upload
    if ( 1 > strlen( $path ) ) {
        $path = ".";
    } else {
        $path = rawurldecode( $path );
    }


	if(isset($uploadedFile))
	{
        $generatedFileName = $path;
        $generatedFileName .= "/";
        $generatedFileName .=  $uploadedFile_name;

		copy( $uploadedFile, $generatedFileName );
        unlink( $uploadedFile );

        echo "<H2>File uploaded as:  ", $uploadedFile_name, "</H2>";
	}
?>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-01 15:11 UTC] hholzgra@php.net
Sorry, but the bug system is not the appropriate forum for asking
support questions. 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

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 14:01:34 2024 UTC