Results 1 to 9 of 9
  1. #1
    Join Date
    Dec 2010
    Location
    Thailand
    Posts
    300
    Plugin Contributions
    2

    Default [Fixed v1.5.1]Specials problem with debug warning: PHP Warning: json_encode() ......

    Hi,

    I use ZC version 1.5.

    Today I experienced some problem with the Catalog>Specials. I select a product, enter a date and a 5% discount and insert. The item is now on specials but with a 20% discount. I tried again, but whatever % discount I enter, the item is displayed on specials with 20% discount.

    I checked the cache/debug and found the following:

    Code:
    [17-Jul-2012 04:55:26] PHP Warning:  json_encode() [<a href='function.json-encode'>function.json-encode</a>]: Invalid UTF-8 sequence in argument in / MYADMIN /includes/init_includes/init_admin_history.php on line 34
    I checked with the hosting and they tell me that they did not made any changes to the server in the past weeks. They also mention the following:

    When looking at /MYADMIN/includes/init_includes/init_admin_history.php I do not see a closing ?> tag anywhere and the script just abruptly ends (which would certainly cause issues). These are the last 5 lines of that file (notice no PHP closing tag):
    root@gemini [~]# tail -n 5 /home/ezistock/public_html/A123soleil/includes/init_includes/init_admin_history.php
    return htmlspecialchars(WARNING_REVIEW_ROGUE_ACTIVITY . "\n" . implode(' and ', $matches[1]));
    } else {
    return FALSE;
    }
    }
    Meanwhile, I try again and now everything seems suddenly back to normal. Do you know what could have caused the issue, and if there's anything I can do to prevent it from happening again?

  2. #2
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Specials problem with debug warning: PHP Warning: json_encode() ......

    Quote Originally Posted by Thannaree View Post
    I checked with the hosting and they tell me that they did not made any changes to the server in the past weeks.
    The support crew used by many hosts lie (or at the very least try to 'bluff' their way out of accepting responsibility for any problems)

    Quote Originally Posted by Thannaree View Post
    They also mention the following:
    "When looking at /MYADMIN/includes/init_includes/init_admin_history.php I do not see a closing ?> tag anywhere and the script just abruptly ends (which would certainly cause issues). "
    The lack of a closing tag is fine/normal and will not 'cause issues'.
    http://www.zen-cart.com/content.php?...nd-of-the-file

    Quote Originally Posted by Thannaree View Post
    Meanwhile, I try again and now everything seems suddenly back to normal. Do you know what could have caused the issue, and if there's anything I can do to prevent it from happening again?
    Computer problems generally don't fix themselves. Nor do they tend to break by themselves (hardware failures excepted), so if *you* haven't changed anything to either cause or cure the problem then your host has. They are simply not acknowledging the fact.

    Cheers
    Rod

  3. #3
    Join Date
    Dec 2010
    Location
    Thailand
    Posts
    300
    Plugin Contributions
    2

    Default Re: Specials problem with debug warning: PHP Warning: json_encode() ......

    Quote Originally Posted by RodG View Post
    The support crew used by many hosts lie (or at the very least try to 'bluff' their way out of accepting responsibility for any problems)



    The lack of a closing tag is fine/normal and will not 'cause issues'.
    http://www.zen-cart.com/content.php?...nd-of-the-file



    Computer problems generally don't fix themselves. Nor do they tend to break by themselves (hardware failures excepted), so if *you* haven't changed anything to either cause or cure the problem then your host has. They are simply not acknowledging the fact.

    Cheers
    Rod
    Thanks Rod for your prompt reply! I also tend to think likewise ... though for a moment I was also concerned with hacking.

  4. #4
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,262
    Plugin Contributions
    3

    Default Re: Specials problem with debug warning: PHP Warning: json_encode() ......

    When looking at /MYADMIN/includes/init_includes/init_admin_history.php I do not see a closing ?> tag anywhere and the script just abruptly ends (which would certainly cause issues).
    What rubbish!

    This guy obviously knows nothing about php, as the closing tag is no longer used (or needed) in a php file.

    And as it indicates his general level of competence (which is sadly lacking), I would be very concerned about hosting with them. My reply to him would be.

    "As you demonstrate a worrying lack of understanding about how php files are coded these days, my feeling is that such ignorance is something that would certainly cause issues. Please can I have a full refund on my hosting as I intend to move somewhere where the support staff do have required expertise."
    19 years a Zencart User

  5. #5
    Join Date
    Dec 2010
    Location
    Thailand
    Posts
    300
    Plugin Contributions
    2

    Default Re: Specials problem with debug warning: PHP Warning: json_encode() ......

    Quote Originally Posted by schoolboy View Post
    What rubbish!

    This guy obviously knows nothing about php, as the closing tag is no longer used (or needed) in a php file.

    And as it indicates his general level of competence (which is sadly lacking), I would be very concerned about hosting with them. My reply to him would be.
    This concerns me as I have been pleased by the level of service this host has given to us so far -the one we previously used was a big name, and also a catastrophe- phoo!

    Could you guys possibly recommend a good hosting service by PM?

  6. #6
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Specials problem with debug warning: PHP Warning: json_encode() ......

    Quote Originally Posted by Thannaree View Post
    This concerns me as I have been pleased by the level of service this host has given to us so far -the one we previously used was a big name, and also a catastrophe- phoo!

    Could you guys possibly recommend a good hosting service by PM?
    If you've been happy with the service I'd not be recommending your switch to another host on the basis of this one experience. As is often quoted, 'better the devil you know'.

    Besides, the reply you got from the host isn't 'unusual' and it is hard to judge the reliabilty of a service based on the response of one droid that may be having his/her first day on the job, or simply a bad day.

    One on my 'favourite' hosts is absolutely full of ignorant bs whenever I see or report a problem. Clearly the persons I origianlly deal with have dubious skills, but the company they work for provides one of the most reliable servers I've ever used, and at a good price too. As frustrating as it is, I tolerate their billshot because sooner or later my reports do get escalated up to someone that does know what they are doing and things get solved. It is often a bit like pulling teeth, but in the end I'm quite satisfied, all things considered.

    just something to keep in mind.

    Cheers
    Rod

  7. #7
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Specials problem with debug warning: PHP Warning: json_encode() ......

    Quote Originally Posted by Thannaree View Post
    Invalid UTF-8 sequence in argument
    The error message suggests that some character that was input was seen as invalid. Did you copy+paste from someplace else when entering the content into that page? Especially from some microsoft application?
    .

    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.

  8. #8
    Join Date
    Dec 2010
    Location
    Thailand
    Posts
    300
    Plugin Contributions
    2

    Default Re: Specials problem with debug warning: PHP Warning: json_encode() ......

    If you've been happy with the service I'd not be recommending your switch to another host on the basis of this one experience. As is often quoted, 'better the devil you know'.

    Besides, the reply you got from the host isn't 'unusual' and it is hard to judge the reliabilty of a service based on the response of one droid that may be having his/her first day on the job, or simply a bad day.

    One on my 'favourite' hosts is absolutely full of ignorant bs whenever I see or report a problem. Clearly the persons I origianlly deal with have dubious skills, but the company they work for provides one of the most reliable servers I've ever used, and at a good price too. As frustrating as it is, I tolerate their billshot because sooner or later my reports do get escalated up to someone that does know what they are doing and things get solved. It is often a bit like pulling teeth, but in the end I'm quite satisfied, all things considered.

    just something to keep in mind.

    Cheers
    Rod
    Yes Rod, I do not actually plan to move to another host at this stage. But it would be good to know of another good hosting just in case.

    The error message suggests that some character that was input was seen as invalid. Did you copy+paste from someplace else when entering the content into that page? Especially from some microsoft application?
    I did not copy+paste, I just typed 10% directly from the keyboard in the Special Price field.

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

    Default Re: Specials problem with debug warning: PHP Warning: json_encode() ......

    v1.5.1 contains updates that should resolve this issue.
    .

    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.

 

 

Similar Threads

  1. Replies: 2
    Last Post: 20 Jan 2014, 07:21 PM
  2. PHP Warning: json_encode() Invalid UTF-8 sequence in argument
    By m.digregorio in forum General Questions
    Replies: 1
    Last Post: 15 Oct 2012, 08:30 PM
  3. Replies: 41
    Last Post: 19 Sep 2012, 04:04 AM
  4. Replies: 7
    Last Post: 23 Feb 2012, 01:15 PM
  5. Debug: USPS.php PHP Warning: Invalid argument supplied for foreach()
    By divinelighting in forum Addon Shipping Modules
    Replies: 2
    Last Post: 11 Jun 2011, 03:17 AM

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