Page 1 of 2 12 LastLast
Results 1 to 10 of 44

Hybrid View

  1. #1
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Site Crashed U_ILLEGAL_ARGUMENT_ERROR

    My bad. Turns out 'en' alone isn't "valid" either. And that's what I had in my clipboard when I pasted. Doh!

    EDITED: now recommending:
    Code:
    @setlocale(LC_TIME, ['en_US', 'en_US.UTF-8', 'en-US']);
    Add this to the end of includes/configure.php and YOUR_ADMIN/includes/configure.php
    Last edited by swguy; 7 Dec 2023 at 07:48 AM. Reason: clarify where to place this code
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  2. #2
    Join Date
    Oct 2005
    Location
    Chicago, IL USA
    Posts
    1,587
    Plugin Contributions
    29

    Default Re: Site Crashed U_ILLEGAL_ARGUMENT_ERROR

    Quote Originally Posted by DrByte View Post
    My bad. Turns out 'en' isn't "valid" either. And that's what I had in my clipboard when I pasted. Doh!

    Use:
    Code:
    @setlocale(LC_TIME, 'en_US');
    I can confirm this works in my testing. en is so close to en_US.

  3. #3
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,532
    Plugin Contributions
    127

    Default Re: Site Crashed U_ILLEGAL_ARGUMENT_ERROR

    Confirmed on admin and storefront in PHP 8.1. Thanks, @drbyte!
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Site Crashed U_ILLEGAL_ARGUMENT_ERROR

    I updated my "fix" with adding UTF-8 fallback, just in case.
    (FYI The hyphenated uppercase en_US.UTF-8 works on my dev site, where the en_US.utf8 lowercase without hyphen shows as invalid when used on its own. Might be different on different servers with different locale packs installed at the server level.)

    And for local PC servers running Windows, it seems 'en-US' may be what's needed.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Feb 2007
    Location
    Pennsylvania
    Posts
    834
    Plugin Contributions
    0

    Default Re: Site Crashed U_ILLEGAL_ARGUMENT_ERROR

    Confirmed working on php 8.2. Thank you all very much!

    Best,
    John

  6. #6
    Join Date
    May 2023
    Location
    Canada
    Posts
    56
    Plugin Contributions
    0

    Default Re: Site Crashed U_ILLEGAL_ARGUMENT_ERROR

    Quote Originally Posted by DrByte View Post
    My bad. Turns out 'en' alone isn't "valid" either. And that's what I had in my clipboard when I pasted. Doh!

    EDITED: now recommending:
    Code:
    @setlocale(LC_TIME, ['en_US', 'en_US.UTF-8', 'en-US']);
    Add this to the end of includes/configure.php and YOUR_ADMIN/includes/configure.php
    That fix for a blank store with the log "Uncaught Error: Found unconstructed IntlDateFormatter" worked for me! I changed the two cofigure.php files and now both the customer-facing page and the admin page load on my test install.

  7. #7
    Join Date
    May 2023
    Location
    Canada
    Posts
    56
    Plugin Contributions
    0

    Default Re: Site Crashed U_ILLEGAL_ARGUMENT_ERROR

    Quote Originally Posted by DrByte View Post
    My bad. Turns out 'en' alone isn't "valid" either. And that's what I had in my clipboard when I pasted. Doh!

    EDITED: now recommending:
    Code:
    @setlocale(LC_TIME, ['en_US', 'en_US.UTF-8', 'en-US']);
    Add this to the end of includes/configure.php and YOUR_ADMIN/includes/configure.php
    That fixed worked for me when the customer-facing page and the admin page were both blank and the log listed an "Uncaught Error: Found unconstructed IntlDateFormatter". Thanks.

  8. #8
    Join Date
    Jan 2015
    Location
    Cyprus
    Posts
    83
    Plugin Contributions
    0

    Default Re: Site Crashed U_ILLEGAL_ARGUMENT_ERROR

    Hi Guys,
    I tested 1.5.8a fresh install with PHP 8.11 and tested all patches without sucess. When using PHP 7.4 all it works without problem. I assume if PHP 8.0 is used it will also work, as per other forum posts(also tested php 8.010 and it works). 2.0 is supposed to solve this issue. The important question for us is the compatibility of the plug ins in version 1.5.8a and 2.0. If the plugins are compatible with both these versions then we go straight to version 2.0. If not we have to sort out the issues with 1.5.8 till the 2.0 with our pluggins are compatible. Any hints of what we maybe doing wrong with the PHP 8.1+ patch is welcome.

  9. #9
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,942
    Plugin Contributions
    96

    Default Re: Site Crashed U_ILLEGAL_ARGUMENT_ERROR

    Quote Originally Posted by Georgecy View Post
    Hi Guys,
    I tested 1.5.8a fresh install with PHP 8.11 and tested all patches without sucess. When using PHP 7.4 all it works without problem. I assume if PHP 8.0 is used it will also work, as per other forum posts(also tested php 8.010 and it works). 2.0 is supposed to solve this issue. The important question for us is the compatibility of the plug ins in version 1.5.8a and 2.0. If the plugins are compatible with both these versions then we go straight to version 2.0. If not we have to sort out the issues with 1.5.8 till the 2.0 with our pluggins are compatible. Any hints of what we maybe doing wrong with the PHP 8.1+ patch is welcome.
    I'm not clear on what the issue you're facing is; see post #24 in this thread ... has that change provided by DrByte been applied?

  10. #10
    Join Date
    Jan 2015
    Location
    Cyprus
    Posts
    83
    Plugin Contributions
    0

    Default Re: Site Crashed U_ILLEGAL_ARGUMENT_ERROR

    Hi Cindy,
    The patch @setlocale(LC_TIME, ['en_US', 'en_US.UTF-8', 'en-US']); has been applied to both configure files without success. I initially use GB instead of US but at the end I used the exact statement above. I tried also to changed the Time Zone to Europe/Athens but without success.
    [09-May-2024 17:05:51 Europe/Athens] PHP Fatal error: Uncaught IntlException: datefmt_create: No such time zone: 'Europe/Athens': U_ILLEGAL_ARGUMENT_ERROR in /includes/classes/zcDate.php:90

    When going back to PHP 7.4 or 8.0 the blank pages go away and the the store works as expected.

    The logs are the shown below

    [09-May-2024 13:32:46 UTC] PHP Fatal error: Uncaught IntlException: datefmt_create: No such time zone: 'UTC': U_ILLEGAL_ARGUMENT_ERROR in /includes/classes/zcDate.php:90
    Stack trace:
    #0 /includes/classes/zcDate.php(90): IntlDateFormatter->__construct()
    #1 /includes/classes/zcDate.php(39): zcDate->initializeConversionArrays()
    #2 /includes/autoload_func.php(47): zcDate->__construct()
    #3 /admin!/includes/application_top.php(42): require('...')
    #4 /admin!/login.php(8): require('...')
    #5 /admin!/index.php(11): require('...')
    #6 {main}
    thrown in /includes/classes/zcDate.php on line 90

    [09-May-2024 13:32:46 UTC] Request URI: /admin!/index.php?cmd=login&camefrom=index.php, IP address: xxxxxxx
    --> PHP Fatal error: Uncaught IntlException: datefmt_create: No such time zone: 'UTC': U_ILLEGAL_ARGUMENT_ERROR in /includes/classes/zcDate.php:90
    Stack trace:
    #0 /includes/classes/zcDate.php(90): IntlDateFormatter->__construct()
    #1 /includes/classes/zcDate.php(39): zcDate->initializeConversionArrays()
    #2 /includes/autoload_func.php(47): zcDate->__construct()
    #3 /admin!/includes/application_top.php(42): require('...')
    #4 /admin!/login.php(8): require('...')
    #5 /admin!/index.php(11): require('...')
    #6 {main}
    thrown in /includes/classes/zcDate.php on line 90.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v158 IntlDateFormatter php issue
    By gothstone in forum Bug Reports
    Replies: 2
    Last Post: 22 Feb 2024, 11:55 AM
  2. v158 U_illegal_argument_error
    By jeking in forum General Questions
    Replies: 2
    Last Post: 2 Nov 2023, 08:13 PM
  3. v156 Site and Admin crashed!!!
    By wmorris in forum General Questions
    Replies: 9
    Last Post: 10 Jun 2019, 05:20 PM
  4. Replies: 11
    Last Post: 19 Sep 2009, 06:56 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