upload a file directly to the proper directory

From: Date: Wed, 20 Mar 2002 03:14:31 +0000
Subject: upload a file directly to the proper directory
Groups: php.general 
Request: Send a blank email to php-general+get-89271@lists.php.net to get a copy of this message
I have to upload files. My scripts don't work with large files. On the "Chapter 19. Handling file uploads" from the php.net doc I found the following comments : NOmcartmelSPAM@NOmagianSPAM.com.au 26-Feb-2002 08:24 When uploading large files, I've found that the memory limit has to be twice as large as the upload limit or else the PHP script will not be able to move/copy the file to a new destination. I guess this explain why I cannot manage large files uploading : The upload is possible but I cannot move the file from the temporary directory. As I cannot increase the memory_limit (my host does not allow it) I am wondering if it is possible to upload the file directly to its proper directory. Thanks for any help. Note : I cannot modify the upload_tmp_dir directive of the php.ini file as others scripts also use it. The manual mentions : "Setting it using putenv() from within a PHP script will not work.". Does it mean that what I want to do is not possible ? My php.ini is set up as follow : max_execution_time = 10000 post_max_size = 30M upload_max_filesize = 30M and on my script, the MAX_FILE_SIZE hidden form element is present. Pierre

« previous php.general (#89271) next »