WebsiteBaker Community Forum

WebsiteBaker Support (2.8.x) => Bakery Shop => Topic started by: scratch on October 23, 2011, 09:00:45 PM

Title: PHP Warning: getimagesize(…) view_cart.php on line 86
Post by: scratch on October 23, 2011, 09:00:45 PM
Having problems with a slow loading basket in Bakery..

The server log states the following error:

PHP Warning: getimagesize(…) view_cart.php on line 86

Can anyone help?

Many thanks
Title: Re: PHP Warning: getimagesize(…) view_cart.php on line 86
Post by: freeSbee on October 23, 2011, 09:40:23 PM
Hi Scratch

The function getimagesize() does only work with urls if your server configuration (php.ini) has set the option allow_url_fopen = 1:
http://php.net/manual/de/function.getimagesize.php
Ask your hosting provider to do so.

Alternatively you can modify the Bakery file view_cart.php on line 83:
Code: [Select]
$items[$i]['thumb_url'] = WB_URL.MEDIA_DIRECTORY.$thumb_dir.$items[$i]['main_image'];Change it to
Code: [Select]
$items[$i]['thumb_url'] = WB_PATH.MEDIA_DIRECTORY.$thumb_dir.$items[$i]['main_image'];
Regards Christoph
Title: Re: PHP Warning: getimagesize(…) view_cart.php on line 86
Post by: scratch on October 23, 2011, 11:26:28 PM
Many thanks!
I changed the view_cart file and it's working great now!
Much appreciated!
J
Title: Re: PHP Warning: getimagesize(…) view_cart.php on line 86
Post by: freeSbee on October 24, 2011, 06:20:25 PM
There is a new Version of Bakery available that fixes the bug:
https://forum.WebsiteBaker.org/index.php/topic,18439.msg152782.html#msg152782

Regards Christoph