I'm using copy() to upload files to a server. Small files work fine. Big files don't. The PHP configuration parameters are set as follows:
'upload_max_filesize' is set to 32Mbytes
'max_execution_time' is set to 3600
'memory_limit' is set to 64Mbytes
Yet the copy fails when the file is somewhere between 6-9 MBYtes. There is no error message. It just stops and nothing is done.
Here's the code snippet:
if ( $REQUEST[ "action" ] == 'upload' ) {
$tmpfile = $FILES["upfile"]["tmp_name"];
$newone = $where.'/'.$_REQUEST[ "newname" ];
if ( ! copy( $tmpfile, $newone )) {
echo '<p>Error in updating '.$newone.'. Please contact webmaster.</p>';
}