function _acidfree_file_mime($f) {
if (ini_get('safe_mode'))
return 'safe_mode';
$f = escapeshellarg($f);
$ret = explode(' ', trim( `file -biN $f` ));
return $ret[count($ret)-1];
}
The function checks if safe mode is on in order to see if "file -biN $f" can be executed. It does not check if the function shell_exec is disabled while not-in-safe-mode. If that is the case, the systems returns an error that shell_exec is disabled when uploading or importing pictures.
Comments
Comment #1
vhmauery commentedhow do you disable shell_exec when not in safe mode? What is the ini configuration directive so I can check for that with ini_get()?
Comment #2
vhmauery commentedTry the latest acidfree. It has better mime type handling. If that doesn't fix your problem, I am not sure how to. Other than reconfiguring php to let you execute `file`.