Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Apr 2008
    Posts
    446
    Plugin Contributions
    1

    Default PHP Fatal error: 1366:Incorrect string value:

    Hello everyone. I hope someone could help me shed some light on this error log that popped out of nowhere

    [26-Mar-2022 17:27:28 America/Detroit] Request URI: /新建文件夹.rar, IP address: 112.114.105.200
    #1 trigger_error() called at [/includes/classes/db/mysql/query_factory.php:171]
    #2 queryFactory->show_error() called at [/includes/classes/db/mysql/query_factory.php:143]
    #3 queryFactory->set_error() called at [/includes/classes/db/mysql/query_factory.php:270]
    #4 queryFactory->Execute() called at [/includes/functions/whos_online.php:92]
    #5 zen_update_whos_online() called at [/includes/init_includes/init_special_funcs.php:18]
    #6 require_once(/includes/init_includes/init_special_funcs.php) called at [/includes/autoload_func.php:37]
    #7 require(/includes/autoload_func.php) called at [/includes/application_top.php:222]
    #8 require(/includes/application_top.php) called at [/index.php:25]
    --> PHP Fatal error: 1366:Incorrect string value: '\xD0\xC2\xBD\xA8\xCE\xC4...' for column 'last_page_url' at row 1 :: INSERT INTO whos_online
    (customer_id, full_name, session_id, ip_address, time_entry,
    time_last_click, last_page_url, host_address, user_agent)
    VALUES ('0', '¥Guest',
    'e4ffb2f64b2b76d7bc8408edd51fc24c', '112.114.105.200',
    '1648330048', '1648330048',
    '/新建文件夹.rar',
    '112.114.105.200',
    'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0)') ==> (as called by) /includes/functions/whos_online.php on line 92 <== in /includes/classes/db/mysql/query_factory.php on line 171.

    Is this someone trying to hack my website or an actual error?

    Thank you.

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,521
    Plugin Contributions
    88

    Default Re: PHP Fatal error: 1366:Incorrect string value:

    It's both.

  3. #3
    Join Date
    Apr 2008
    Posts
    446
    Plugin Contributions
    1

    Default Re: PHP Fatal error: 1366:Incorrect string value:

    Quote Originally Posted by lat9 View Post
    It's both.
    Oh boy! How could I protect the site and fix the error? Has this error being reported before? Thanks.

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,521
    Plugin Contributions
    88

    Default Re: PHP Fatal error: 1366:Incorrect string value:

    What 'collation' is being used in the database? Is it a variant of utf8_ or one of utf8mb4_?

    Update: You could start by blocking the associated IP address via the site's root .htaccess file.

  5. #5
    Join Date
    Apr 2008
    Posts
    446
    Plugin Contributions
    1

    Default Re: PHP Fatal error: 1366:Incorrect string value:

    Quote Originally Posted by lat9 View Post
    What 'collation' is being used in the database? Is it a variant of utf8_ or one of utf8mb4_?

    Update: You could start by blocking the associated IP address via the site's root .htaccess file.
    I've already blocked the IP. This is a new install 1.5.7b so whatever was by default (utf8mb4_general_ci). I didn't change anything during the install.

  6. #6
    Join Date
    Apr 2008
    Posts
    446
    Plugin Contributions
    1

    Default Re: PHP Fatal error: 1366:Incorrect string value:

    Commission and referrer have latin1_swedish_ci, login_as_customers uses utf8_unicode_ci, everything else seem to be using use utf8mb4_general_ci

    What am I looking for so I can change it.

    Thank you so much!

  7. #7
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,521
    Plugin Contributions
    88

    Default Re: PHP Fatal error: 1366:Incorrect string value:

    Quote Originally Posted by mvstudio View Post
    Commission and referrer have latin1_swedish_ci, login_as_customers uses utf8_unicode_ci, everything else seem to be using use utf8mb4_general_ci

    What am I looking for so I can change it.

    Thank you so much!
    Ugh. Mixed collations are going to give you a "world of hurts" when/if your webhost updates your MySQL to a more strict form. I'll need some time to give you an appropriate way to get everything re-aligned.

  8. #8
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,168
    Plugin Contributions
    11

    Default Re: PHP Fatal error: 1366:Incorrect string value:

    The docs may get you to the right spot.

    https://docs.zen-cart.com/user/upgra...nvert_to_utf8/

  9. #9
    Join Date
    Apr 2008
    Posts
    446
    Plugin Contributions
    1

    Default Re: PHP Fatal error: 1366:Incorrect string value:

    Quote Originally Posted by dbltoe View Post
    The docs may get you to the right spot.

    https://docs.zen-cart.com/user/upgra...nvert_to_utf8/
    Thanks so much! I really appreciate it!

  10. #10
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,521
    Plugin Contributions
    88

    Default Re: PHP Fatal error: 1366:Incorrect string value:

    Quote Originally Posted by dbltoe View Post
    The docs may get you to the right spot.

    https://docs.zen-cart.com/user/upgra...nvert_to_utf8/
    Quote Originally Posted by mvstudio View Post
    Thanks so much! I really appreciate it!
    With those 'mixed' collations, you need to start based on what DB_CHARSET is currently indicated in the site's configure.php files. Given that the majority of the tables are utf8mb4_general_ci, the DB_CHARSET should indicate utf8mb4.

    Since it's only a few 'outlying' tables, here's my suggestion:

    1. Put the site into maintenance mode.
    2. Make (and verify) a database backup via phpMyAdmin.
    3. Using your webhost's phpMyAdmin, select the current live database and
    a. Click the Operations tab at the top.
    b. Towards the bottom of the screen, you should see a "Collation" sub-tab. Choose utf8mb4_general_ci, tick the "Change all tables collations" and, once that's clicked, also click the "Change all tables columns collations" and click the "Go" button.
    4. Visually verify the validity of the fields present in those (what were) latin1_/utf8_ tables/fields. If they look OK, make yet another DB backup and then take the site out of maintenance mode.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v156 PHP Fatal error: 1366:Incorrect integer value
    By mvstudio in forum PayPal Express Checkout support
    Replies: 38
    Last Post: 25 Jul 2022, 03:19 PM
  2. v151 1366:Incorrect string value: '\x92Yell and Paypal IPN
    By sungmo in forum General Questions
    Replies: 4
    Last Post: 31 Jan 2020, 07:02 PM
  3. v156 MySQLi error 1366: Incorrect string value
    By chadlly2003 in forum General Questions
    Replies: 19
    Last Post: 3 Jan 2020, 05:57 AM
  4. Replies: 7
    Last Post: 22 Dec 2019, 07:07 PM
  5. 1366 Incorrect string value: 'zone_name'
    By technologist in forum Installing on a Windows Server
    Replies: 2
    Last Post: 9 Jul 2008, 04:17 PM

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