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.
After upgrading to PHP 5.4, there are errors on preg_match function, any idea on how to edit it? Thanks!
Warning: preg_match(): Compilation failed: invalid range in character class at offset 7 in D:\AppServ\www\laura\foundationreview\func\class.upload.php on line 2525
Warning: preg_match(): Compilation failed: invalid range in character class at offset 7 in D:\AppServ\www\laura\foundationreview\func\class.upload.php on line 2543
HI, im also getting the same error. Ive class.upload.php to version 0.32, however im still getting the same problem....does the actual upload class (referring to $handle etc) need to be edited also?Reply
HI, im also getting the same error. Ive class.upload.php to version 0.32, however im still getting the same problem....does the actual upload class (referring to $handle etc) need to be edited also?Reply
PHP 5.4+ versions are very sensitive to regular expressions and in this case gives warning message on not valid range expression part [\.-\w] Dash symbol means some kind of range like a-z or 0-9, but here symbols "." to "w" does not make any sense. I assume that dash should come on first or last position inside brackets. Search for all "preg_match" expressions through "class.upload.php" file and change [\.-\w] to [\.\w-] and it will work for all newer PHP versions.
After upgrading to PHP 5.4, there are errors on preg_match function, any idea on how to edit it? Thanks!
Warning: preg_match(): Compilation failed: invalid range in character class at offset 7 in D:\AppServ\www\laura\foundationreview\func\class.upload.php on line 2525
Warning: preg_match(): Compilation failed: invalid range in character class at offset 7 in D:\AppServ\www\laura\foundationreview\func\class.upload.php on line 2543
25380.jpg
PHP 5.4+ versions are very sensitive to regular expressions and in this case gives warning message on not valid range expression part [\.-\w]
Dash symbol means some kind of range like a-z or 0-9, but here symbols "." to "w" does not make any sense. I assume that dash should come on first or last position inside brackets.
Search for all "preg_match" expressions through "class.upload.php" file and change [\.-\w] to [\.\w-] and it will work for all newer PHP versions.
It worked more me already.