Results 1 to 8 of 8
  1. #1
    Join Date
    Jul 2013
    Location
    South Africa
    Posts
    1
    Plugin Contributions
    0

    bug PHP 5.4.4 dropping product descriptions

    I'm running version ZC ver 1.3.8a patched to 1.3.9f. Original official download and upgrade. The site has been running perfectly for the last year until my ISP upgraded their servers from PHP 5.3.3 to 5.4.4.

    Everything seemed fine until I needed to edit the product description of an existing product. After saving the change, I found that the product description was now blank. I ran a few tests and it seems to accept short simple text entries, but as soon as I enter long descriptions, the field goes blank. Rolling the server back to PHP 5.3.3 immediately resolves the problem. My ISP tells me that PHP 5.4.4 no longer supports "register_globals" and they suspect this may be the problem. Does anyone know if there is a quick fix for ZC 1.3.9 to allow for PHP 5.4.4 or should I just bite the bullet and upgrade my site to the latest ZC version?

  2. #2
    Join Date
    Jan 2004
    Posts
    64,748
    Blog Entries
    6
    Plugin Contributions
    74

    Default Re: PHP 5.4.4 dropping product descriptions

    Zen Cart has never used "register_globals", so it can't be that.
    .

    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.

  3. #3
    Join Date
    Sep 2011
    Location
    Singapore
    Posts
    2
    Plugin Contributions
    1

    Default Re: PHP 5.4.4 dropping product descriptions

    Quote Originally Posted by LittelBird View Post
    I'm running version ZC ver 1.3.8a patched to 1.3.9f. Original official download and upgrade. The site has been running perfectly for the last year until my ISP upgraded their servers from PHP 5.3.3 to 5.4.4.
    Thanks for your message! These silently dropping descriptions were driving me crazy (collation? SQL? no log, no error....)

    I just moved my ZC 1.3.9h from Debian 6 (Mysql 5.1.x, PHP 5.3.x) to Debian 7 (Mysql 5.5.x, PHP 5.4.x) and had exactly the same problem. Another collateral damage was that the HTML Editor settings would be discarded and only HTML Area was loading. There might be a few more but everything else seemed to work as before.

    I do not have time to upgrade to ZC 1.5.x, as it is a scary adventure given the number of patches I added to the my 1.3.9h over the years.

    This URL gave the full steps for Debian 7: http://blog.wpkg.org/2013/06/20/down...an-wheezy-7-0/

    Julien

  4. #4
    Join Date
    Jul 2011
    Posts
    3
    Plugin Contributions
    0

    Default Re: PHP 5.4.4 dropping product descriptions

    As of PHP 5.4 they changed default encoding from "ISO-8859-1" to "UTF-8". So you get null from htmlspecialchars.
    edit /admin/includes/modules/product/preview_info.php
    add to end of line 191:
    htmlspecialchars(stripslashes($products_description[$languages[$i]['id']]), ENT_COMPAT,'ISO-8859-1', true));

  5. #5
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    6,980
    Plugin Contributions
    63

    Default Re: PHP 5.4.4 dropping product descriptions

    Quote Originally Posted by danilzan View Post
    As of PHP 5.4 they changed default encoding from "ISO-8859-1" to "UTF-8". So you get null from htmlspecialchars.
    edit /admin/includes/modules/product/preview_info.php
    add to end of line 191:
    htmlspecialchars(stripslashes($products_description[$languages[$i]['id']]), ENT_COMPAT,'ISO-8859-1', true));
    Exactly! Your store's database is set to use one of the latin1 character sets, but PHP 5.4 and later apply UTF-8 encoding as the new default for both the htmlspecialchars and htmlentities calls. There are many, many more file changes in addition to the one that danilzan referenced that were changed in the move from v1.5.0 to v1.5.1 to support those changes.

  6. #6
    Join Date
    Mar 2007
    Posts
    22
    Plugin Contributions
    0

    Default Re: PHP 5.4.4 dropping product descriptions

    I have the same problem with an old 1.3.0 version ... blank descriptionThere is a solution ?
    Sorry for my English !

  7. #7
    Join Date
    Nov 2009
    Location
    UK
    Posts
    1,152
    Plugin Contributions
    0

    Default Re: PHP 5.4.4 dropping product descriptions

    I have 1.38a sites which since the weekend are now running on PHP5.4.3 and no errors logged, all sites working fine, apart from the missing fields on any pages that have special characters. All fixed now because of this, thanks.

  8. #8
    Join Date
    Jan 2004
    Posts
    64,748
    Blog Entries
    6
    Plugin Contributions
    74

    Default Re: PHP 5.4.4 dropping product descriptions

    Quote Originally Posted by dgent View Post
    I have 1.38a sites which since the weekend are now running on PHP5.4.3 and no errors logged, all sites working fine, apart from the missing fields on any pages that have special characters. All fixed now because of this, thanks.
    You REALLY need to upgrade ASAP. There are other issues you'll start having problems with if you don't.
    .

    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: 1
    Last Post: 23 Feb 2013, 11:52 PM
  2. Easy Populate dropping product name and description only
    By robertm18 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 19 May 2011, 02:12 AM
  3. Product dropping out of categories randomly -Apsona
    By SRPerformance in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 23 Feb 2011, 09:58 PM
  4. Confirmation: can't use php in Product Descriptions?
    By karma-lab in forum General Questions
    Replies: 33
    Last Post: 27 Aug 2009, 09:08 AM
  5. Using php include in product descriptions
    By gaekwad in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 12 Jun 2007, 11:31 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