Product Image Swap Causes Error getimagesize: failed to open stream

This topic has 10 replies, 3 voices, and was last updated 9 years ago ago by Robert Hall

  • Avatar: blackburst1
    blackburst1
    Participant
    April 21, 2015 at 21:34

    After repeated attempts to troubleshoot, I continue to get the following error when activating the Product Image on Hover: Swap function in the theme options.

    Warning: getimagesize(https://8theme.b-cdn.net/var/chroot/home/content/53/10559053/html/wp-content/uploads/2015/03/BEACON-85mm-f4-1080p-TALENT-300×168.jpg) [function.getimagesize]: failed to open stream: No such file or directory in /home/content/53/10559053/html/provideobackgrounds/wp-content/themes/legenda/framework/images.php on line 123

    I’ve seen other users in the forum have this problem, but the fix wasn’t explained. Currently I have the feature off, as it causes warning messages on my site but I want to fix it to utilize the functionality. Just updated WordPress, Legenda and WooCommerce and it didn’t help.

    Wordpress: 4.1.2
    Legenda: 2.6.3
    Woo: 2.3.8

    9 Answers
    Avatar: Eva
    Eva Kemp
    Support staff
    April 21, 2015 at 21:39

    Hello,

    Please provide us with FTP and wp-admin panel credentials in Private Content.

    Thank you.
    Regards,
    Eva Kemp.

    Avatar: blackburst1
    blackburst1
    Participant
    April 21, 2015 at 23:46

    information attached.

    Please, contact administrator
    for this information.
    Avatar: Eva
    Eva Kemp
    Support staff
    April 22, 2015 at 13:17

    Hello,

    You need contact your host and ask them to change upload_path value with full path of your site directory. It can be changed in the database.

    Thank you.
    Regards,
    Eva Kemp.

    Avatar: blackburst1
    blackburst1
    Participant
    April 22, 2015 at 15:53

    Eva,

    What is the likelyhood that changing this value in the DB is going to break code in other parts of the site that are working correctly?

    Is there a way I can change this value myself? I’m using GoDaddy for hosting.

    -Walter

    Avatar: Eva
    Eva Kemp
    Support staff
    April 22, 2015 at 19:03

    Hello,

    Now your site is giving a database error. Are you making any changes there?

    Regards,
    Eva Kemp.

    Avatar: blackburst1
    blackburst1
    Participant
    April 22, 2015 at 19:10

    Eva,

    We just cycled the passwords on the DBs and it went offline for a few moments, but it’s back up.

    Avatar: Eva
    Eva Kemp
    Support staff
    April 22, 2015 at 20:03

    Hello,

    The problem is caused by your hosting settings.
    Image is loaded from the path that is defined in “DOCUMENT_ROOT” variable. On a server where your site is located the path for DOCUMENT_ROOT is written:
    _SERVER["DOCUMENT_ROOT"] /var/chroot/home/content/53/10559053/html
    but your site is located in /var/chroot/home/content/53/10559053/html/provideobackgrounds and this path is written for variable “REAL_DOCUMENT_ROOT”.
    So to fix the issue I’ve changed the code $file_path = $_SERVER['DOCUMENT_ROOT'] . $file_path['path']; to $file_path = $_SERVER['REAL_DOCUMENT_ROOT'] . $file_path['path']; on line 118 in the file wp-content/themes/legenda/framework/images.php.

    Please clear browser cache and check hover image now.

    Regards,
    Eva Kemp.

    Avatar: blackburst1
    blackburst1
    Participant
    April 22, 2015 at 20:10

    Thank you for the fix and for the great explanation.
    So my site residing in a folder off the root fouled up the location of the images. Got it.
    Thank you for your persistence in getting to the root of the problem.

    Best regards,
    -Walter

    Avatar: Robert Hall
    Robert Hall
    Support staff
    April 22, 2015 at 20:13

    Hello,

    You’re welcome!

    Regards,
    Robert Hall.

  • Viewing 10 results - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.