How to move Inbound Multipart form-data file from tmp directory
Try just
$local = $inboundFaxLocation;
$_FILES['attachment']['tmp_name']
should already contain a full path to the temporary file, there's no need to add the original name as well.
P.S. Normally in PHP people use move_uploaded_file()
specifically for the purpose of transferring an uploaded file from its temporary uploaded location to a more permanent one - there's no point in copying really, because the temp file will be removed anyway after a period of time when the script ends.
Final code that worked for me.
move_uploaded_file($_FILES['attachment']['tmp_name'], "/var/www/html/new_home/" . $_FILES['attachment']['name']);