Running Osticket v1.17v2 on IIS. Office 365 email
We are getting file upload undefined 500 error when trying to attach file to ticket attachments are being received with new tickets just failing internally to upload.
Error Uploading / attaching files to ticket
Same Problem here after updating from 1.17.1 to 1.17.3. I can attach a txt or a jpg file, but not for example a zip.
Receiving a zip from a customer works.
i have three types in this field ".fil, .zip, .pfc", but the error occurs when i insert a zip file.
It happens after update to 17.3 (from 17.1).
Interesting, I'm running v1.17.3 and able to upload ZIP just fine. Are you missing any PHP extensions from Admin Panel > Dashboard > Information? Can you upload an example ZIP to this forum for us to test?
Cheers.
Missing PHP Extensions: APCu and Zend OPcache.
Take a look:
https://www.plusfakt.com/tmp/osticket.mp4
Attached a sample Zip
We do not go to 3rd party sites to view things, sorry. You can upload any screenshots directly to this forum.
Cheers.
I was able to upload this example just fine. How about right click the page, click Inspect, click Network, check the box to Preserve Logs, upload the file, click the request in the Network tab, click Response, and see what the response says.
Cheers.
It's an 8,6Mbyte MP4 file and i can't upload it here.
- Edited
Yea, you can take screenshots and upload those instead. Or make a GIF and upload that.
Cheers.
So here they are:
jothie The Response tab
Attached the response tab:
So apparently the file is invalid in your case somehow but it wasn't for me. Apparently the given MIME TYPE doesn't match the MIME Type returned from FileObject::mime_type()
:
Cheers.
You're right, i have commented out this lines:
// Make sure mime type is valid
//if (strcasecmp(FileObject::mime_type($file['tmp_name']),
// $file['type']) !== 0)
// return false;
and it works.
It have checked the old source 1.17.1 -> This lines seems to be new in 1.17.2 or 1.17.3.
Many thanks for your help.
Yes, it's a security patch. But it's very strange that I'm able to upload this and you are not. I wonder what the difference is here..
Cheers.
Can you please create a PHP file in your osTicket directory, paste the following content, visit the file in the browser, and tell me what the page displays?
<?php
var_dump('finfo_open exists: ', function_exists('finfo_open'));
Cheers.
sure ;-):
string(19) "finfo_open exists: " bool(true)
- Edited
That would be the only difference but you have that method as well so I'm not sure why you can't but I can without making any changes...so odd. Can you download the example you uploaded to the Forum and retest with the downloaded ZIP? I wonder if uploading it here fixed the MIME Type.
Cheers.
- Edited
Downloaded and tested - no change.
But i have tested it on a mac - there it works.
But on every W11 PC i tested -> failed.