Results 1 to 10 of 1688

Hybrid View

  1. #1
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default IH4 SQL problem

    Hi Guys,

    I've just been doing an upgrade to a Zen 1.3.7 site to V1.5.1, and have run into a problem I've not experienced before even though I've done many of these.

    The problem is with when I install IH4 I can no longer log into the admin of the site. Greeted with 'an error occurred please refresh the page'.

    The log files reveal:

    [20-Feb-2013 00:36:53] PHP Fatal error: 1064:You have an error in your SQL syntax; check the manual that corresponds to
    your MySQL server version for the right syntax to use near ' 1001, now(), now(), NULL,
    'zen_cfg_select_option(array(''yes'',''no''),')' at line 1 :: INSERT INTO zen_configuration (configuration_id,
    configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id,
    sort_order, last_modified, date_added, use_function, set_function) VALUES (NULL, 'IH resize images', 'IH_RESIZE',
    'no', 'Select either -no- which is old Zen-Cart behaviour or -yes- to activate automatic resizing and caching of images.
    --Note: If you select -no-, all of the Image Handler specific image settings will be unavailable including: image filetype
    selection, background colors, compression, image hover, and watermarking-- If you want to use ImageMagick you have to
    specify the location of the <strong>convert</strong> binary in <em>includes/extra_configures/bmz_image_handler_conf.php
    </em>.', , 1001, now(), now(), NULL, 'zen_cfg_select_option(array(''yes'',''no''),') in
    /home/spotty/public_html_dev/includes/classes/db/mysql/query_factory.php on line 120

    Any ideas what would cause this? Its been bugging me for several hours and need to call it a night. Hopefully with some fresh ideas in the morning.


    Cheers
    Rod

  2. #2
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: IH4 SQL problem

    It is the installer not finding the configuration group id for whatever reason.

    Find this bit of code in your_admin/includes/init_includes/init_image_handler.php

    Code:
        /* Find Config ID of Images */
        $sql = "SELECT configuration_group_id FROM ".TABLE_CONFIGURATION_GROUP." WHERE configuration_group_title='".BOX_CONFIGURATION_IMAGES."' LIMIT 1";
        $result = $db->Execute($sql);
            $im_configuration_id = $result->fields['configuration_group_id'];
    And override it by adding this directly after it.

    Code:
    $im_configuration_id = '4';
    Probably '4' is the configuration id of your images menu item but you could check that before hand if you are feeling perky.

  3. #3
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: IH4 SQL problem

    Quote Originally Posted by niccol View Post
    It is the installer not finding the configuration group id for whatever reason.
    <snip>
    Code:
    $im_configuration_id = '4';
    Probably '4' is the configuration id of your images menu item but you could check that before hand if you are feeling perky.
    Thanks Nick. You were right, the $im_configuration_id wasn't being set, but when manually setting this it led to even further problems, so I figured it was time for me to backout of things and start the upgrade afresh. This time it worked just fine, no errors reported at all and the upgrade completed with about as much ease as any others I've done.

    I can only guess something went amiss with my 1st set of uploads. A little embarrassing to admit to really, but then again, it is quite often these 'simple' problems/solutions that seem to cause the most headaches.

    Thanks again,
    Rod

  4. #4
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: IH4 SQL problem

    Quote Originally Posted by RodG View Post
    Thanks Nick. You were right, the $im_configuration_id wasn't being set, but when manually setting this it led to even further problems, so I figured it was time for me to backout of things and start the upgrade afresh. This time it worked just fine, no errors reported at all and the upgrade completed with about as much ease as any others I've done.

    I can only guess something went amiss with my 1st set of uploads. A little embarrassing to admit to really, but then again, it is quite often these 'simple' problems/solutions that seem to cause the most headaches.

    Thanks again,
    Rod
    Nah wasn't you at all.. I have been busy as heck and dragging my heels on submitting an update to IH4 which includes among other things the fix niccol posted.. Will get on it right now.. Glad you are all sorted now..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  5. #5
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default IH4 v4.1 has been submitted to the downloads section..

    Changelog includes:

    • Backup files generated by the auto-installer are now given the OLD.IH4 extension instead of the BAK extension (which some server configurations disallowed)
    • Configuration settings are now consistently and correctly appended to the default Images configuration section
    • Updates to the readme file.


    I'll post an update in this support thread when the new version is available..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  6. #6
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,371
    Plugin Contributions
    23

    Default Re: IH4 v4.1 has been submitted to the downloads section..

    Hey, Mistress DivaVocals,

    I have uncovered something that possibly has not been addressed; I'm not sure. I have been assuming for many years that Zen Cart cannot display the product image correctly in the product preview - it's normally a square - not the correct ratio size. But since I usually install image handler, it actually may have something to do with the mod.

    I started checking carts 1.3.9h and 1.5x and I now see that the image is fine in carts without image handler but not fine with image handler. The preview_info.php file calls for the small image width and height.

    Has anyone else noticed this or commented on it? Do you know what might be at work here?

    I truthfully don't care but ran into a client who got really upset about it!
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

  7. #7
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: IH4 v4.1 has been submitted to the downloads section..

    Quote Originally Posted by delia View Post
    Hey, Mistress DivaVocals,

    I have uncovered something that possibly has not been addressed; I'm not sure. I have been assuming for many years that Zen Cart cannot display the product image correctly in the product preview - it's normally a square - not the correct ratio size. But since I usually install image handler, it actually may have something to do with the mod.

    I started checking carts 1.3.9h and 1.5x and I now see that the image is fine in carts without image handler but not fine with image handler. The preview_info.php file calls for the small image width and height.

    Has anyone else noticed this or commented on it? Do you know what might be at work here?

    I truthfully don't care but ran into a client who got really upset about it!
    I only noticed this on one site, but for that particular site there's a ton of other customizations that were done to make a custom module work with IH4 so I never worried about it, and the client is okay with the preview not showing the image as long as the product on the customer-side shows the image correctly.. I just tried on two other random sites and the image preview works.. (not a real link below.. just wanted to show that this is the page that I am on when I see the image preview)

    http :// testsite(dot)com/MY_ADMIN/product(dot)php?cPath=155_151&product_type=1&action=new_product_preview
    Last edited by DivaVocals; 21 Feb 2013 at 06:12 PM.
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

 

 

Similar Threads

  1. v158 Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread
    By lat9 in forum All Other Contributions/Addons
    Replies: 749
    Last Post: 20 May 2026, 03:47 PM
  2. Attribute image replaces main product image on select [Support Thread]
    By exoticcorpse in forum All Other Contributions/Addons
    Replies: 176
    Last Post: 14 Dec 2025, 12:55 AM
  3. v139h Image Handler 3 Support Thread (for ZC v1.3.9)
    By DivaVocals in forum All Other Contributions/Addons
    Replies: 1095
    Last Post: 2 Oct 2017, 12:42 PM
  4. v138a Image Handler 2 (for ZC v1.3.8 ONLY) Support
    By timkroeger in forum All Other Contributions/Addons
    Replies: 7098
    Last Post: 12 Oct 2014, 03:48 AM
  5. Image Handler Support Please
    By nadinesky in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 30 Sep 2013, 03:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg