Hi there everyone,
Over the past couple days, I have converted my website to use the encoding of UTF8, via head code, form enctype and database conversion. Also during this time, php was upgraded from 5.2 to 5.6. I don't know which one(if either) is causing this issue.
I utilize class.upload.php. It has worked great up to this point.
Today, during image upload, I received these errors:
PHP Warning: in file /home/schw/public_html/includes/upload/class.upload.php on line 2945: preg_match(): Compilation failed: invalid range in character class at offset 7
PHP Warning: in file /home/schw/public_html/includes/upload/class.upload.php on line 2999: preg_match(): Compilation failed: invalid range in character class at offset 7
PHP Warning: in file /home/schw/public_html/includes/upload/class.upload.php on line 3017: preg_match(): Compilation failed: invalid range in character class at offset 7
The file I uploaded was Upload.php. During the process, it gets converted to a png with the linknumber with a timestamp, so the converted name would look like 123-45345345.png.
Here's my form:
<form name='image' enctype='multipart/form-data' method='POST' action='/?action=overlord&do=link-image&id=".$link_id."'>
<input type='file' size='50' name='link_image' value='Browse' /><br />
AND<br />
<input type='submit' name='Submit' value=' Upload ' /></form>
Here's the three lines mentioned in class.upload.php:
if (preg_match("/^([\.-\w]+)\/([\.-\w]+)(.*)$/i", $this->file_src_mime)) {
if (preg_match("/^([\.-\w]+)\/([\.-\w]+)(.*)$/i", $this->file_src_mime)) {
if (preg_match("/^([\.-\w]+)\/([\.-\w]+)(.*)$/i", $this->file_src_mime)) {
The image did upload successfully. These errors are all I saw to let me know something was wrong.
Could someone help me figure out what happened and what I need to do to fix this?
Thanks for your time!