I use class.upload
Version 0.32 and it works correctly on my localhost server, but it does not work on my web server.
The web server log file shows this error:
PHP Warning: preg_match(): Compilation failed: invalid range in character class at offset 7 in.
PHP version on web server: 5.4.39
PHP version on localhost: 5.5.15
if (preg_match("/^([\.-\w]+)\/([\.-\w]+)(.*)$/i", $this->file_src_mime)) {
$this->file_src_mime = preg_replace("/^([\.-\w]+)\/([\.-\w]+)(.*)$/i", '$1/$2', $this->file_src_mime);
$this->log .= '- MIME validated as ' . $this->file_src_mime . '<br />';
} else {
$this->file_src_mime = null;
}