Results 1 to 10 of 44

Hybrid View

  1. #1
    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.

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,948
    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?

  3. #3
    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.

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,948
    Plugin Contributions
    96

    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.

  5. #5
    Join Date
    Jun 2008
    Location
    Japan
    Posts
    333
    Plugin Contributions
    7

    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.

  6. #6
    Join Date
    Aug 2013
    Location
    Perth, WA, AU
    Posts
    279
    Plugin Contributions
    4

    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.

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

    Default Re: Site Crashed U_ILLEGAL_ARGUMENT_ERROR

    Thanks guys. I added in PHP.ini the following date.timezone = Europe/Athens and also I cleaned installed Zencart 2.0 tested with PHP 8.11 and PHP 8.3. The problem is the same. When I go to PHP 8.0 the installation works. The logs of ZC 2.0 are listed below. No patch was added in ZenCart 2.0.

    [10-May-2024 11:04:23 Europe/Athens] PHP Fatal error: Uncaught IntlException: datefmt_create: No such time zone: 'Europe/Athens': U_ILLEGAL_ARGUMENT_ERROR in /includes/classes/zcDate.php:89
    Stack trace:
    #0 /includes/classes/zcDate.php(89): IntlDateFormatter->__construct()
    #1 /includes/classes/zcDate.php(39): zcDate->initializeConversionArrays()
    #2 /includes/autoload_func.php(47): zcDate->__construct()
    #3 /includes/application_top.php(253): require('...')
    #4 /index.php(25): require('...')
    #5 {main}
    thrown in /includes/classes/zcDate.php on line 89

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

    Default Re: Site Crashed U_ILLEGAL_ARGUMENT_ERROR

    Quote Originally Posted by Georgecy View Post
    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.
    The part that makes your post the most difficult to troubleshoot is that line 90 of that file doesn't look anything like calling datefmt_create like the error message is suggesting. Here's the file from v158a: https://github.com/zencart/zencart/b...p#L87C1-L91C15

    So what exactly is on YOUR line 90, and why is it different from released code?

    Even in v2.0.0 it doesn't refer to datefmt_create anywhere close to that line: https://github.com/zencart/zencart/b...ses/zcDate.php
    (Although given a few enhancements made to the 2.0 version of that file, it "might" be worth temporarily testing the 2.0 version on your 158a site, as an experiment.)

    Definitely the error message you're getting about it saying "No such time zone" means that your PHP environment isn't aware of time zone defaults. So that's a PHP configuration problem. Like others have said, installing the 'intl' extension may help, and I see you've tried that with mixed results.

    Your comment about Joomla recognizing it fine doesn't really make any difference here: if Joomla's not using the date functions that Zen Cart is calling then Joomla's not triggering your PHP configuration problem, so it's just hidden by non-use.

    Zen Cart doesn't do any trickery. It just uses whatever PHP binary is linked to the vhost that you have configured for the domain you're running the site on. So if your Abyss webserver configuration is pointing this domain to use a certain PHP binary, that's what Zen Cart will run with ... and it will expect that PHP's configuration (installed extensions, ini file contents, etc) to be correct. Zen Cart doesn't do anything fancy with it: it just expects a correctly configured PHP.
    .

    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.

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

    Default Re: Site Crashed U_ILLEGAL_ARGUMENT_ERROR

    [B]The file is exactly the same and on line 90 is IntlDateFormatter::NONE Click image for larger version. 

Name:	Screenshot 2024-05-14 at 9.13.27 AM.jpg 
Views:	49 
Size:	25.5 KB 
ID:	20615


    I tested the 2.0 file and gives the same error on line 92

    The 'intl' extension was installed all along.

    I refer the issue to the source of the PHP and I am waiting for their comments.

 

 

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