Page 4 of 5 FirstFirst ... 2345 LastLast
Results 31 to 40 of 42
  1. #31
    Join Date
    Jan 2015
    Location
    Cyprus
    Posts
    54
    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

  2. #32
    Join Date
    Jun 2008
    Location
    Japan
    Posts
    133
    Plugin Contributions
    5

    Default Re: Site Crashed U_ILLEGAL_ARGUMENT_ERROR

    Well, you really need to help us more by giving infos about your settings, like what system you are on, what is your actual locale setting in php.ini, lang.english.php or whatever language file you use?
    Did you add some code to set timezone in Zen Cart?...
    With information I have now, here is what I can see:

    Your problem is not related to this thread original post that was a bug in a specific PHP version you do not used.
    The problem disappears when using PHP 8.0 or lower because in these cases Zen Cart do not use IntlDateFormatter.
    IntlDateFormatter crashes PHP because it is given bad information/settings.
    Probably not the solution but in php.ini, you should have
    PHP Code:
    date.timezone "Europe/Athens" 
    rather than
    PHP Code:
    date.timezone Europe/Athens 
    .

    When timezone or other necessary setting is not define in the code, IntlDateFormatter uses PHP's one (good or bad) and if PHP's locale/timezone is not set, PHP will try to use system setting with more or less success depending on system.

  3. #33
    Join Date
    Jan 2015
    Location
    Cyprus
    Posts
    54
    Plugin Contributions
    0

    Default Re: Site Crashed U_ILLEGAL_ARGUMENT_ERROR

    Thanks a lot for the reply.
    I am using Abyss webserver on MacOs 10.12. I can use PHP 7.4, 8.1, 8.2 and 8.3.
    In Php.ini I use date.timezone = "Europe/Athens". I tested also Europe/Nicosia and Asia/Nicosia

    I do clean installation from the original code zencart-1.5.8a-patched-2024-04-05. I copied the actual folder in htdocs and run the ZC_Install. The database is clean and populated by the demo products. When Installation is finished the ZC-install requests removal of ZC_Install and gives links to both front end and the admin of the store. Both links show a blank page with the log as shown below. If I go to PHP 8 then all works.

    I added all the variations of the @setlocale(LC_TIME, ['en_US', 'en_US.UTF-8', 'en-US']); in both Admin/configure and configure without success. I used also @setlocale(LC_TIME, ['el_GR', 'el_GR.utf8', 'el_GR']); I have set on the computer also Greece as region. I am actually in Cyprus.
    In the lang.english.php I used also the original US setting and variations as this one $locales = ['el_GR', 'el_GR.utf8', 'en', 'el.Greece'];

    It takes me less than 5 minutes to make a new installation either 1.5.8 or 2.0 just give me some recommendations and I will test them and let you know of the results.

    Thanks a lot


    [11-May-2024 12:32:50 Europe/Athens] PHP Fatal error: Uncaught IntlException: datefmt_create: No such time zone: 'Europe/Athens': U_ILLEGAL_ARGUMENT_ERROR in /Applications/Abyss Web Server/htdocs/zencart-1.5.8a/includes/classes/zcDate.php:90
    Stack trace:
    #0 /Applications/Abyss Web Server/htdocs/zencart-1.5.8a/includes/classes/zcDate.php(90): IntlDateFormatter->__construct()
    #1 /Applications/Abyss Web Server/htdocs/zencart-1.5.8a/includes/classes/zcDate.php(39): zcDate->initializeConversionArrays()
    #2 /Applications/Abyss Web Server/htdocs/zencart-1.5.8a/includes/autoload_func.php(47): zcDate->__construct()
    #3 /Applications/Abyss Web Server/htdocs/zencart-1.5.8a/includes/application_top.php(237): require('...')
    #4 /Applications/Abyss Web Server/htdocs/zencart-1.5.8a/index.php(25): require('...')
    #5 {main}
    thrown in /Applications/Abyss Web Server/htdocs/zencart-1.5.8a/includes/classes/zcDate.php on line 90



    Quote Originally Posted by pilou2 View Post
    Well, you really need to help us more by giving infos about your settings, like what system you are on, what is your actual locale setting in php.ini, lang.english.php or whatever language file you use?
    Did you add some code to set timezone in Zen Cart?...
    With information I have now, here is what I can see:

    Your problem is not related to this thread original post that was a bug in a specific PHP version you do not used.
    The problem disappears when using PHP 8.0 or lower because in these cases Zen Cart do not use IntlDateFormatter.
    IntlDateFormatter crashes PHP because it is given bad information/settings.
    Probably not the solution but in php.ini, you should have
    PHP Code:
    date.timezone "Europe/Athens" 
    rather than
    PHP Code:
    date.timezone Europe/Athens 
    .

    When timezone or other necessary setting is not define in the code, IntlDateFormatter uses PHP's one (good or bad) and if PHP's locale/timezone is not set, PHP will try to use system setting with more or less success depending on system.

  4. #34
    Join Date
    Jan 2015
    Location
    Cyprus
    Posts
    54
    Plugin Contributions
    0

    Default Re: Site Crashed U_ILLEGAL_ARGUMENT_ERROR

    testssdddd

  5. #35
    Join Date
    Jan 2015
    Location
    Cyprus
    Posts
    54
    Plugin Contributions
    0

    Default Re: Site Crashed U_ILLEGAL_ARGUMENT_ERROR

    Thanks a lot for the reply.
    I am using Abyss webserver on MacOS 10.12 with a selection of PHP from 7.4-8.1-8.2-8.3.
    In PHP.ini I tested date.timezone = "Europe/Athens" and date.timezone = "Europe/Nicosia"

    I do clean installation from the zencart-1.5.8a-patched-2024-04-05 using ZC_Install. After installation is complete the links to both Front end and admin show a blank page. i added in both configures the @setlocale(LC_TIME, ['el_GR', 'el_GR.utf8', 'el_GR']); also as Dr Byte gave it also localised.
    In lang.English.php I used the default and also the localised $locales = ['el_GR', 'el_GR.utf8', 'en', 'el.Greece'];

    In all cases I get a log error as shown below. If I use php 8 then everything works.

    I can set up a new installation in a few minutes. I you have any recomendation I can test it and let you know the results.

    Thanks a lot.

    [11-May-2024 12:32:50 Europe/Athens] PHP Fatal error: Uncaught IntlException: datefmt_create: No such time zone: 'Europe/Athens': U_ILLEGAL_ARGUMENT_ERROR in /Applications/Abyss Web Server/htdocs/zencart-1.5.8a/includes/classes/zcDate.php:90
    Stack trace:
    #0 /Applications/Abyss Web Server/htdocs/zencart-1.5.8a/includes/classes/zcDate.php(90): IntlDateFormatter->__construct()
    #1 /Applications/Abyss Web Server/htdocs/zencart-1.5.8a/includes/classes/zcDate.php(39): zcDate->initializeConversionArrays()
    #2 /Applications/Abyss Web Server/htdocs/zencart-1.5.8a/includes/autoload_func.php(47): zcDate->__construct()
    #3 /Applications/Abyss Web Server/htdocs/zencart-1.5.8a/includes/application_top.php(237): require('...')
    #4 /Applications/Abyss Web Server/htdocs/zencart-1.5.8a/index.php(25): require('...')
    #5 {main}
    thrown in /Applications/Abyss Web Server/htdocs/zencart-1.5.8a/includes/classes/zcDate.php on line 90

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

    Default Re: Site Crashed U_ILLEGAL_ARGUMENT_ERROR

    Try creating a small .php file in the site's root to determine which timezone-identifiers are available to you. See this (https://www.php.net/manual/en/dateti...dentifiers.php) php.net documentation of the way to do this.

    Instead of looping through only the first 5 identifiers as in that example, use foreach to list them all. It could easily be that your webhost's PHP installations don't include either Europe/Athens or Europe/Nicosia.

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

    Default Re: Site Crashed U_ILLEGAL_ARGUMENT_ERROR

    I just want to add you should check that PHP 'intl' extension is installed, just to be sure. Without it, IntlDateFormatter won't work.
    Test lat9 proposed should give us important information.

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

    Default Re: Site Crashed U_ILLEGAL_ARGUMENT_ERROR

    Hi Guys,
    timezone-identifiers available from @lat instructions are listed at the end. The important for my case is Asia/Nicosia, Europe/Athens, which are available.( Running Joomla 4 system report, on same PHP, it shows also Europe/Nicosia and UTC as default timezone. Joomla has no problem with the PHP 8.1.1).

    The actual timezone declared in php.ini is date.timezone = "Europe/Athens"

    The Intl extension is also available.
    I entered also in php.ini
    [intl]
    intl.default_locale = el_GR.UTF-8 which it had no effect on the issue.

    Attached also screenshot From info.php
    Click image for larger version. 

Name:	Screenshot 2024-05-13 at 6.25.13 PM.jpg 
Views:	10 
Size:	51.4 KB 
ID:	20608

    Asia/Aden, Asia/Almaty, Asia/Amman, Asia/Anadyr, Asia/Aqtau, Asia/Aqtobe, Asia/Ashgabat, Asia/Atyrau, Asia/Baghdad, Asia/Bahrain, Asia/Baku, Asia/Bangkok, Asia/Barnaul, Asia/Beirut, Asia/Bishkek, Asia/Brunei, Asia/Chita, Asia/Choibalsan, Asia/Colombo, Asia/Damascus, Asia/Dhaka, Asia/Dili, Asia/Dushanbe, Asia/Famagusta, Asia/Gaza, Asia/Hebron, Asia/Ho_Chi_Minh, Asia/Hong_Kong, Asia/Hovd, Asia/Irkutsk, Asia/Jakarta, Asia/Jayapura, Asia/Jerusalem, Asia/Kabul, Asia/Kamchatka, Asia/Karachi, Asia/Kathmandu, Asia/Khandyga, Asia/Kolkata, Asia/Krasnoyarsk, Asia/Kuala_Lumpur, Asia/Kuching, Asia/Kuwait, Asia/Macau, Asia/Magadan, Asia/Makassar, Asia/Manila, Asia/Muscat, Asia/Nicosia, Asia/Novokuznetsk, etc...., Europe/Amsterdam, Europe/Andorra, Europe/Astrakhan, Europe/Athens, Europe/Belgrade, etc....

  9. #39
    Join Date
    Jan 2004
    Posts
    66,380
    Blog Entries
    7
    Plugin Contributions
    274

    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.

  10. #40
    Join Date
    Jan 2015
    Location
    Cyprus
    Posts
    54
    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:	5 
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.

 

 
Page 4 of 5 FirstFirst ... 2345 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