Working with vm 3.0.11 (that solved my add to cart issue in 3.0.10).
But when trying to add an image to a product or a category I get a 500error. server log says the following.:
PHP Fatal error: Call to undefined function exif_imagetype() in /../administrator/components/com_virtuemart/helpers/vmuploader.php on line 270
Any one any idea where this comes from?
Thanks
In the Joomla back-end, if you look into System > System Information > php Information, is EXIF support enabled? If not, it has to be enabled in the php.ini file.
The whole EXIF isn't named in php information page
Probably you will have to contact your webhosting service and ask them to include it.
Running my own vps. But I'll contact my tech guy. Is this a chang within 3.0.11? all other sides running 3.0.10 don't have problems
Quote from: r_ekkie on October 18, 2015, 21:13:14 PM
Is this a chang within 3.0.11? all other sides running 3.0.10 don't have problems
I don't know, because all my installations (including a 3.0.11 test installation) are running on php compilations which include exif support and I didn't notice any other report with the same issue.
Hello r_ekkie,
I have the same problem!
Did you already solve this, if yes, how?
Best regards,
You may try in the vmuploader.php around line 270
EDIT: THIS IS OLD
if(function_exists('exif_imagetype')){
$type = exif_imagetype($media['tmp_name']);
} else if(vmAccess::manager('media.potdang')){
//Just small fallback
if($mediaExtension == 'jpg' or $mediaExtension == 'png' or $mediaExtension == 'gif'){
$type = $mediaExtension;
}
} else {
$type = false;
}
EDIT: Correct code here
if(function_exists('exif_imagetype')){
$type = exif_imagetype($media['tmp_name']);
} else {
$type = false;
}
Hi Milbo,
It is not clear to me if this code should be added or modified?
If modified, than the code is non existent in my vmuploader.php
vmError: Invalid media, image type does not fit to extension **.jpg
The code existing is in url /administrator/components/com_virtuemart/helpers line 270 change
$type = exif_imagetype($media['tmp_name']);
to
if(function_exists('exif_imagetype')){
$type = exif_imagetype($media['tmp_name']);
} else if(vmAccess::manager('media.potdang')){
$type = false;
}
Same problem here but virtuemart 3.0.12
After changing
$type = exif_imagetype($media['tmp_name']);
to
if(function_exists('exif_imagetype')){
$type = exif_imagetype($media['tmp_name']);
} else if(vmAccess::manager('media.potdang')){
$type = $mediaExtension;
} else {
$type = false;
}
i get error: vmError: Invalid media, image type does not fit to extension.
EXIF is not supported :S
i removed this part
if(!self::checkMediaType($type,$mediaExtension)){
vmError('Invalid media, image type does not fit to extension '.$media['name']);
return false;
}
and now its working.
Are you sure you are superadmin or have the right to upload potentially dangerous files?
Superadmin and i have right to upload files. I tested my wampserver same settings when exif is on and when exif is off results is same.
Quote from: SolopoV on November 13, 2015, 12:29:44 PM
vmError: Invalid media, image type does not fit to extension **.jpg
Same problem here, how to fix this?
Before the update this all worked fine?
I confirm, if server does not have EXIF, like my testserver, then i got blank page (errors are disabled) on uploading image.
as it will.. have you tried Max's fix? This will I assume be in the next release
http://forum.virtuemart.net/index.php?topic=131754.msg456411#msg456411
exchange in vmuploader.php the line 270
$type = exif_imagetype($media['tmp_name']);
with
if(function_exists('exif_imagetype')){
$type = exif_imagetype($media['tmp_name']);
} else {
$type = false;
}
if(function_exists('exif_imagetype')){
$type = exif_imagetype($media['tmp_name']);
} else {
$type = false;
}
This has solved the exact same issue on my installation of VMart 3.0.12.
Please be certain to incorporate it into the next release.
Thank You!
Yepp :-)
I had the same issue recently. My web host then enabled EXIF support on my account. Problem was sorted immediately.
Quote from: Milbo on November 18, 2015, 15:23:11 PM
exchange in vmuploader.php the line 270
$type = exif_imagetype($media['tmp_name']);
with
if(function_exists('exif_imagetype')){
$type = exif_imagetype($media['tmp_name']);
} else {
$type = false;
}
This works for me :)
(http://omakoduleht.ee/KilaKola/thumbs.png)
Got it working, cheers mate 8)
Hello,
i have same issue. I asked from my provider and they said i can change my php version in cpanel and after that, choose php settings. Problem is, i dont see anything exif related there. any advice where i can check for it?
Thanks!
EDIT: Problem solved by changing PHP version on cpanel (5.5 -> 5.6) and clicking "set as current". According to my provider, clicking on any version and setting as current should have done it.
It is very host dependent .. IMHO most have exif already enabled
a few require you to choose a non-native php version and there will be the exif module selection or in the non-native it is already enabled
or you have to ask them to enable if you have no php version selector.. there is no hard and fast rule
Quote from: Milbo on November 18, 2015, 15:23:11 PM
exchange in vmuploader.php the line 270
$type = exif_imagetype($media['tmp_name']);
with
if(function_exists('exif_imagetype')){
$type = exif_imagetype($media['tmp_name']);
} else {
$type = false;
}
Okay, this has solved the problem of white pages, but do not thumbnails
Quote from: Milbo on November 18, 2015, 15:23:11 PM
exchange in vmuploader.php the line 270
$type = exif_imagetype($media['tmp_name']);
with
if(function_exists('exif_imagetype')){
$type = exif_imagetype($media['tmp_name']);
} else {
$type = false;
}
You ROCK! We hope to be included in the next VM update :-)
Thanks Milbo,
You just saved me a lot of stress
Hi,
it worked on VM3.08. now i have 3.16 and it doesn`t work. When i upload image my thumbnail has name product-name.jpg_product
but full image is ok.
http://www.larixogrody.pl/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=129&virtuemart_category_id=18&Itemid=174
i`m wondering why in such great extenssion as virtuemart has such stupid bugs ?
Regards
I see that issue is with scond and later image. With the first is ok.
Quote from: Milbo on November 13, 2015, 11:11:55 AM
You may try in the vmuploader.php around line 270
EDIT: THIS IS OLD
if(function_exists('exif_imagetype')){
$type = exif_imagetype($media['tmp_name']);
} else if(vmAccess::manager('media.potdang')){
//Just small fallback
if($mediaExtension == 'jpg' or $mediaExtension == 'png' or $mediaExtension == 'gif'){
$type = $mediaExtension;
}
} else {
$type = false;
}
EDIT: Correct code here
if(function_exists('exif_imagetype')){
$type = exif_imagetype($media['tmp_name']);
} else {
$type = false;
}
Thanks! This is works for me! Joomla! 3.7.2, VirtueMart 3.2.2 & PHP Version 7.0.23