Re: upload a file directly to the proper directory

From: Date: Fri, 22 Mar 2002 03:19:23 +0000
Subject: Re: upload a file directly to the proper directory
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-89640@lists.php.net to get a copy of this message
Hi, Bogdan, Thanks for your help. It isn't a SQL error. I do not upload the file to a database. I have been able to upload a 4M file. I really think it is because the memory_limit of the server is 8M. And that means that it doesn't have enough resource to copy the uploaded file from the temporary folder to the proper one. I wanted to have confirmation about that and find a way to solve this problem. Pierre ------------- En réponse à Bogdan Stancescu <mgv@fx.ro>: > Do you get a PHP or a SQL error? I had this problem, but my problem was > > MySQL, not PHP (i.e. PHP handles uploads > 2MB and MySQL doesn't by > default). The error I got was "MySQL server has gone away" or something > > similar. > > Bogdan > > pierre.marcandella@free.fr wrote: > > >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 (#89640) next »