Results 1 to 7 of 7
  1. #1
    Join Date
    May 2009
    Posts
    1,219
    Plugin Contributions
    2

    Default fatal error 1101 on fresh local install of 1.5.4

    Hi,

    I downloaded v.1.5.4, and tried installing on local server, after the needed configuration of Apache, and PHP, all went thru well (all green), can access store fine, but when trying to go to admin I get:
    WARNING: An Error occurred, please refresh the page and try again.

    The log file reads:
    [03-Jan-2015 20:12:52 UTC] PHP Fatal error: 1101:BLOB/TEXT column 'logmessage' can't have a default value :: ALTER TABLE admin_activity_log ADD COLUMN logmessage mediumtext NOT NULL default '' ==> (as called by) C:\Users\PC\sites\AAAhtdocs\zentest\admin\includes\classes\class.admin.zcObserve rLogWriterDatabase.php on line 90 <== in C:\Users\PC\sites\AAAhtdocs\zentest\includes\classes\db\mysql\query_factory.php on line 155

    Also there is an install warning log:
    [03-Jan-2015 20:12:19 UTC] PHP Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in C:\Users\PC\sites\AAAhtdocs\zentest\zc_install\includes\application_top.php on line 59

    Thank you

  2. #2
    Join Date
    Jul 2012
    Posts
    16,718
    Plugin Contributions
    17

    Default Re: fatal error 1101 on fresh local install of 1.5.4

    Quote Originally Posted by keneso View Post
    Hi,

    I downloaded v.1.5.4, and tried installing on local server, after the needed configuration of Apache, and PHP, all went thru well (all green), can access store fine, but when trying to go to admin I get:
    WARNING: An Error occurred, please refresh the page and try again.

    The log file reads:
    [03-Jan-2015 20:12:52 UTC] PHP Fatal error: 1101:BLOB/TEXT column 'logmessage' can't have a default value :: ALTER TABLE admin_activity_log ADD COLUMN logmessage mediumtext NOT NULL default '' ==> (as called by) C:\Users\PC\sites\AAAhtdocs\zentest\admin\includes\classes\class.admin.zcObserve rLogWriterDatabase.php on line 90 <== in C:\Users\PC\sites\AAAhtdocs\zentest\includes\classes\db\mysql\query_factory.php on line 155

    Also there is an install warning log:
    [03-Jan-2015 20:12:19 UTC] PHP Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in C:\Users\PC\sites\AAAhtdocs\zentest\zc_install\includes\application_top.php on line 59

    Thank you
    I've found errors like that relate to the mysql installation, particularly when working on a windows server. I have often corrected by modifying table settings or sql for the applicable problem field/table. Or if necessary settings in the mysql database to allow such "default" setting against a BLOB/TEXT column for example...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: fatal error 1101 on fresh local install of 1.5.4

    Quote Originally Posted by keneso View Post
    ... PHP Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in C:\Users\PC\sites\AAAhtdocs\zentest\zc_install\includes\application_top.php on line 59 ...
    This indicates you have not configured your timezone in "php.ini" (in your local development server). This is now required by a number of internal PHP functions (PHP 5.3+) and the error message is coming from PHP itself.

    Alternatively (if this message is received on a hosted server and the hosting company cannot / will not / does not allow updating "php.ini"), one can edit "/includes/extra_configures/set_time_zone.php" to add the correct timezone. Be aware this should only be used as a last resort.


    Quote Originally Posted by keneso View Post
    ... PHP Fatal error: 1101:BLOB/TEXT column 'logmessage' can't have a default value :: ALTER TABLE admin_activity_log ADD COLUMN logmessage mediumtext NOT NULL default '' ==> (as called by) C:\Users\PC\sites\AAAhtdocs\zentest\admin\includes\classes\class.admin.zcObserve rLogWriterDatabase.php on line 90 ...
    MySQL does not allow setting a default on TEXT or BLOB fields, so this may be a minor bug in the code. Probably was missed because many production MySQL servers are configured to ignore rather than report this error.

    Starting in "/admin/includes/classes/class.admin.zcObserverLogWriterDatabase.php" around line 87 change the following code:

    from:
    Code:
        if (!$found_logmessage)
        {
          $sql = "ALTER TABLE " . TABLE_ADMIN_ACTIVITY_LOG . " ADD COLUMN logmessage mediumtext NOT NULL default ''";
          $db->Execute($sql);
        }
        // add 'severity' field of type varchar(9)
    to:
    Code:
        if (!$found_logmessage)
        {
          $sql = "ALTER TABLE " . TABLE_ADMIN_ACTIVITY_LOG . " ADD COLUMN logmessage mediumtext NOT NULL;
          $db->Execute($sql);
        }
        // add 'severity' field of type varchar(9)
    Last edited by DrByte; 5 Jan 2015 at 11:33 PM. Reason: fix typo
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  4. #4
    Join Date
    May 2009
    Posts
    1,219
    Plugin Contributions
    2

    Default Re: fatal error 1101 on fresh local install of 1.5.4

    Thank you both.

    @lhungil

    Without your detailed solution I wouldn't have solved it.

  5. #5
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: fatal error 1101 on fresh local install of 1.5.4

    What version of PHP and MySQL are you using?
    And what version of Windows on your local PC?

  6. #6
    Join Date
    May 2009
    Posts
    1,219
    Plugin Contributions
    2

    Default Re: fatal error 1101 on fresh local install of 1.5.4

    Quote Originally Posted by DrByte View Post
    What version of PHP and MySQL are you using?
    And what version of Windows on your local PC?
    httpd-2.4.10-win64-VC11
    php-5.6.4-Win32-VC11-x64
    mysql-web-community-5.6.22.0
    Windows 8.1 64-bit

    I did the "standard" installs, not selecting any particular option as I can remember, only problem was with phpMyAdmin.
    Last edited by keneso; 4 Jan 2015 at 01:15 AM.

  7. #7
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: fatal error 1101 on fresh local install of 1.5.4

    I've been able to duplicate this under MySQL 5.5 and 5.6 when STRICT_ALL_TABLES is enabled in MySQL (Windows and Linux). The binary compilations (from Oracle) do not enable this mode by default (according to the documentation).

    When not enabled, MySQL 5.5 and 5.6 appear to just create the column as if no default was specified. "SHOW CREATE TABLE `admin_activity_log`" shows the following after creation without STRICT_ALL_TABLES enabled:
    Code:
    CREATE TABLE `admin_activity_log` (
      `log_id` bigint(15) NOT NULL AUTO_INCREMENT,
      `access_date` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
      `admin_id` int(11) NOT NULL DEFAULT '0',
      `page_accessed` varchar(80) NOT NULL DEFAULT '',
      `page_parameters` text,
      `ip_address` varchar(45) NOT NULL DEFAULT '',
      `flagged` tinyint(4) NOT NULL DEFAULT '0',
      `attention` varchar(255) NOT NULL DEFAULT '',
      `gzpost` mediumblob,
      `logmessage` mediumtext NOT NULL,
      `severity` varchar(9) NOT NULL DEFAULT 'info',
      PRIMARY KEY (`log_id`),
      KEY `idx_page_accessed_zen` (`page_accessed`),
      KEY `idx_access_date_zen` (`access_date`),
      KEY `idx_flagged_zen` (`flagged`),
      KEY `idx_ip_zen` (`ip_address`),
      KEY `idx_severity_zen` (`severity`)
    ) ENGINE=MyISAM
    NOTE: COLLATE, CHARSET, and the current AUTO_INCREMENT values were removed from the above table structure dump.
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

 

 

Similar Threads

  1. v151 Image handler 4 gives fatal error with v1.5.1 fresh install
    By Arunachala in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 16 May 2013, 10:37 PM
  2. v150 install error wont pass the database: PHP Fatal error: 1101:BLOB/TEXT
    By tparmley2001 in forum Installing on a Windows Server
    Replies: 9
    Last Post: 6 Aug 2012, 04:22 AM
  3. Replies: 2
    Last Post: 2 Aug 2011, 03:57 PM
  4. Fresh installation - fatal error
    By shakur96 in forum Installing on a Windows Server
    Replies: 5
    Last Post: 25 Mar 2009, 03:17 PM
  5. Fresh Live install of ZenCart with fatal error
    By arpeggio in forum Installing on a Linux/Unix Server
    Replies: 2
    Last Post: 2 Apr 2007, 05:23 AM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR