Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 37
  1. #21
    Join Date
    Jun 2008
    Location
    Japan
    Posts
    130
    Plugin Contributions
    5

    Default Re: Site Crashed U_ILLEGAL_ARGUMENT_ERROR

    Quote Originally Posted by lat9 View Post
    Noting that the zcDate.php class is PHP version-specific, using strftime for PHP versions < 8.1 and using the IntlDateFormatter class (if that PHP extension is installed) otherwise.
    I did not do detailed explanation as it was already explained few month ago but I made it backward compatible. It uses IntlDateFormatter (PHP >=5.3.0 with PECL >=1.0.0) if avialable as it is possible (although very rare) to remove this extension in PHP settings, then date_format (PHP >= 5.2.0) if not. Strftime % parameters are accepted as input parameters.
    Compatibility should go back to ZenCart 1.3.9 although I did not test it and won't... This was made for Zencart 1.5.8 (PHP >= 7.3) and above anyway.

  2. #22
    Join Date
    Aug 2012
    Posts
    40
    Plugin Contributions
    0

    Default Re: Site Crashed U_ILLEGAL_ARGUMENT_ERROR

    post 7 by dr byte fixed this issue for me.

    for those reading/searching on solution why php 8.1 and 8.2 white screens the site and php 8.0 works fine.
    fresh install tested. 1.5.8a

  3. #23
    Join Date
    May 2023
    Location
    Canada
    Posts
    50
    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.

  4. #24
    Join Date
    May 2023
    Location
    Canada
    Posts
    50
    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.

  5. #25
    Join Date
    Jan 2015
    Location
    Cyprus
    Posts
    52
    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.

  6. #26
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,541
    Plugin Contributions
    88

    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?

  7. #27
    Join Date
    Jan 2015
    Location
    Cyprus
    Posts
    52
    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.

  8. #28
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,541
    Plugin Contributions
    88

    Default Re: Site Crashed U_ILLEGAL_ARGUMENT_ERROR

    Still trying to figure out what's going on. This link: https://github.com/zencart/zencart/b...te.php#L87-L91

    ... identifies lines 87 through 91 of the zcDate.php class for zc158a. The fact that your logs show an issue being thrown on line 90 is what's (er) throwing me off.

  9. #29
    Join Date
    Jun 2008
    Location
    Japan
    Posts
    130
    Plugin Contributions
    5

    Default Re: Site Crashed U_ILLEGAL_ARGUMENT_ERROR

    Setting on line 90 'none' means it uses PHP's or system's default. There might be some bad setting in php.ini or somewhere on the server, just an idea.

  10. #30
    Join Date
    Aug 2013
    Location
    Perth, WA, AU
    Posts
    174
    Plugin Contributions
    3

    Default Re: Site Crashed U_ILLEGAL_ARGUMENT_ERROR

    Quote Originally Posted by pilou2 View Post
    Setting on line 90 'none' means it uses PHP's or system's default. There might be some bad setting in php.ini or somewhere on the server, just an idea.
    The error getting thrown could be the result of date.timezone not being set correctly in php.ini.

 

 
Page 3 of 4 FirstFirst 1234 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

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