Re: [PHP] HTTP POST FILE UPLOAD HELP - REVISITED

2002-11-09 Thread Jason Wong
On Saturday 09 November 2002 18:39, [EMAIL PROTECTED] wrote:
 Sorry about that guys, here is a bit more info that might be useful:

 I forgot to tell you that I'm working on a Windows XP box with full rights,
 which means the default temporary directory is C:\WINDOWS\Temp and there
 are no limitations on what I can and cannot access on the system (running
 as system administrator). I did change that default to C:\PHP\tmp_uploads.
 I ran this script with the default temp directory as well, same result.

Assuming that you webserver really does have access to write to those 
directories then ...

[snip 'simplified' code]

 Here is what's happening:

 2. When the submit button is pushed, the files are uploaded through the
 form but the temporary file is never created on the system. I did a search
 on the entire C: drive for the temporary file that should have been
 created, but it's not there.

... you didn't read the manual like I suggested. Because otherwise you'll know 
that the file will be deleted from the temporary directory at the end of the 
request if it has not been moved away or renamed.

If you didn't 'simplify' the example and removed the all important copy() or 
move_uploaded_file() then you would have had something that worked!

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
Mount St. Helens should have used earth control.
*/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] HTTP POST FILE UPLOAD HELP - REVISITED

2002-11-09 Thread @ Darwin

You're absolutely correct. The script works perfectly fine now, and I have
you to thank. I went back to Handling file uploads and re-read the entire
thing. I guess I missed the part that said the following before the actual
script example. My fault and my apologies. Thanks Jason, and thanks to all
the others who replied as well.

...Whatever the logic, you should either delete the file from the temporary
directory or move it elsewhere.
The file will be deleted from the temporary directory at the end of the
request if it has not been moved away or renamed.






 -Original Message-
 From: Jason Wong [mailto:php-general;gremlins.com.hk]
 Sent: Saturday, November 09, 2002 5:01 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] HTTP POST FILE UPLOAD HELP - REVISITED


 On Saturday 09 November 2002 18:39, [EMAIL PROTECTED] wrote:
  Sorry about that guys, here is a bit more info that might be useful:
 
  I forgot to tell you that I'm working on a Windows XP box with
 full rights,
  which means the default temporary directory is C:\WINDOWS\Temp and there
  are no limitations on what I can and cannot access on the
 system (running
  as system administrator). I did change that default to
 C:\PHP\tmp_uploads.
  I ran this script with the default temp directory as well, same result.

 Assuming that you webserver really does have access to write to those
 directories then ...

 [snip 'simplified' code]

  Here is what's happening:
 
  2. When the submit button is pushed, the files are uploaded through the
  form but the temporary file is never created on the system. I
 did a search
  on the entire C: drive for the temporary file that should have been
  created, but it's not there.

 ... you didn't read the manual like I suggested. Because
 otherwise you'll know
 that the file will be deleted from the temporary directory at
 the end of the
 request if it has not been moved away or renamed.

 If you didn't 'simplify' the example and removed the all
 important copy() or
 move_uploaded_file() then you would have had something that worked!

 --
 Jason Wong - Gremlins Associates - www.gremlins.com.hk
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development *

 /*
 Mount St. Helens should have used earth control.
 */


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php