634c634,635
< 	if( ! $method && function_exists('getmyuid') && function_exists('fileowner') ){
---
> 	$getuid_function = function_exists('getmyuid') ? 'getmyuid' : function_exists('posix_getuid') ? 'posix_getuid' : NULL;
> 	if( ! $method && $getuid_function && function_exists('fileowner') ){
641c642
< 			if ( getmyuid() == fileowner($temp_file_name) )
---
> 			if ( $getuid() == fileowner($temp_file_name) )
646a648
> 	unset( $getuid_function );
