class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
more info about the class
$this->error = $this->translate('temp_file');
$this->log .= '- ' . $hash; $this->error = $this->translate('temp_file');
Can you add the first line, as following:
Then check that the filename displayed can be created.
As I said before, it should work on Windows, but I cannot support the class on this OS. I can't even test it on Windows...