Results 1 to 9 of 9
  1. #1
    Join Date
    Jul 2010
    Posts
    2

    Database Error In SunShop 4.2.4 Installer

    Received this error when loading on my local workstation.
    Invalid SQL: CREATE TABLE `orders_stats_cache`
    MySQL Error: BLOB/TEXT column 'products' can't have a default value
    MySQL Error Number: 1101

    Any suggestions? Is there a newer loader program?

  2. #2
    Join Date
    Jul 2010
    Posts
    2

    Sunshop 4.2.4 Installer Solution

    After some snooping I found that I had to change the Mysql file my.ini to sql-mode to sql-mode="".

  3. #3
    Join Date
    Aug 2006
    Location
    San Diego, CA
    Posts
    4,333
    Was this a Windows machine out of curiosity?
    Chris Talavera
    Turnkey Web Tools, Inc.
    chris{at}twt-inc.com
    1-800-673-4898

  4. #4
    Join Date
    Oct 2010
    Posts
    1

    Same error with 4.2.5

    I'm running MySQL 5.1 on Windows 2008 R2 and got the following similar error:

    ---------------------------------------------------

    Database Error In SunShop 4.2.5 Installer: Invalid SQL: CREATE TABLE `ss_orders_stats_cache` ( `id` int(11) NOT NULL auto_increment, `date` date NOT NULL, `datestamp` varchar(30) NOT NULL default '', `products` LONGTEXT NOT NULL default '', `categories` LONGTEXT NOT NULL default '', `referers` LONGTEXT NOT NULL default '', `pages` LONGTEXT NOT NULL default '', `clients` LONGTEXT NOT NULL default '', `visitors` LONGTEXT NOT NULL default '', PRIMARY KEY (`id`), KEY `date` (`date`) );

    MySQL Error: BLOB/TEXT column 'products' can't have a default value

    MySQL Error Number: 1101

    Date: Thursday 21st 2010f October 2010 06:12:52 PM

    Script: /install/index.php

    ---------------------------------------------------------------

    I tried removing the sql-mode config setting in my.ini but this didn't solve the problem.

    So I ran the offending bit of sql directly and found that if you remove the default '' bit after each LONGTEXT NOT NULL then the code ran correctly.

    Looks to me like this may have been legal SQL in previous versions of MySQL, but not in the latest one (5.1).

  5. #5
    Join Date
    Aug 2006
    Location
    San Diego, CA
    Posts
    4,333
    The SQL is legal but in windows the default mode is strict. You simply need to turn this off or disable it in the cnf file.
    Chris Talavera
    Turnkey Web Tools, Inc.
    chris{at}twt-inc.com
    1-800-673-4898

  6. #6
    Join Date
    Aug 2006
    Location
    San Diego, CA
    Posts
    4,333
    What do you mean by start happening? This error would only happen when you attempt to install. It will not happen after that.
    Chris Talavera
    Turnkey Web Tools, Inc.
    chris{at}twt-inc.com
    1-800-673-4898

  7. #7
    Join Date
    Sep 2005
    Posts
    176
    I'm getting this error on 4.4.3 using mysql 5.6.23 with Liquid shared hosting.

    I'm going to open a ticket with them, but apparently they have mysql in strict mode by default, so it might be time to change the table definitions in the installer.

    I'm just doing a clean install.
    Jim Roberts
    Roberts WebForge, Inc.
    www.robertswebforge.com

  8. #8
    Join Date
    Aug 2006
    Location
    San Diego, CA
    Posts
    4,333
    Yes, Windows machines do have this on by default. In a production environment though it should not be on. All of the control panels for Windows servers though will set this properly.+
    Chris Talavera
    Turnkey Web Tools, Inc.
    chris{at}twt-inc.com
    1-800-673-4898

  9. #9
    Join Date
    Sep 2005
    Posts
    176
    I fixed mine up by importing a 4.4.2 database and running the 'upgrade' rather than "install" from scratch.

    But just to be clear - this was not on a Windows server. This was on a shared Liquid Web account, Linux.

    So, it's not an immediate issue anymore for me, but it might be that hosting providers are changing that default setting now.
    Jim Roberts
    Roberts WebForge, Inc.
    www.robertswebforge.com

Similar Threads

  1. Database Backup Error
    By nehemiah in forum Troubleshooting and Problems
    Replies: 3
    Last Post: 04-05-2009, 11:24 PM
  2. I canít backup the database using SunShop.
    By SunShopper in forum Troubleshooting and Problems
    Replies: 2
    Last Post: 06-25-2008, 12:19 PM
  3. database error
    By mo:log in forum Troubleshooting and Problems
    Replies: 3
    Last Post: 03-03-2008, 02:17 AM
  4. Database Error message after upgrading to 1.7RC
    By Go2Networks in forum Troubleshooting and Problems
    Replies: 5
    Last Post: 12-03-2003, 05:08 PM

Tags for this Thread

Bookmarks

Posting Permissions

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