When you use php to execute shell script to handle file, the filename may have to be preprocessing due to a few special characters.
$fileAttr = $_FILES['fileObj'];
$target_dir = "upload";
$chars=array("/【/", "/】/", "/:/", "/!/", "/?/", "/ /", "/\(/", "/\)/", "/(/", "/)/", "/,/", "/,/", "/-/", "/-/");
$fileName = preg_replace( $chars, '_' , $fileAttr["name"] );
$target_basename = basename($fileName);
$upload_file = $target_dir . "/" . $target_basename;
It’s better to set character encoding before running shell command.
$cmdStr = 'export LANG=en_US.UTF-8; handle ' . $upload_file