We recently had a client who was having trouble uploading documents into Vtiger. As we researched it, we determined it was a Vtiger bug of sorts. We were surprised that we haven’t heard about this from more clients since it should impact all Vtiger 6.4 builds on PHP >= 5.3. Our developers were able to create workaround code to fix this issue for the client.
The issue was that Vtiger uses a function that has been deprecated in recent PHP versions, ‘mime_content_type’. This has been replaced with a php extension called ‘fileinfo’ in php versions >= 5.3
If you encounter this issue, here’s a way to get around it:
Enable the fileinfo php extension (debian/ubuntu):
$ apt-get install php5-fileinfo
And/or
$ php5enmod fileinfo
Modify index.php, add this at the bottom:
function _mime_content_type($filename) { $result = new finfo(); if (is_resource($result) === true) { return $result->file($filename, FILEINFO_MIME_TYPE); } return false; }