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?
Re: PHP 5.4.4 dropping product descriptions
Zen Cart has never used "register_globals", so it can't be that.
Re: PHP 5.4.4 dropping product descriptions
Quote:
Originally Posted by
LittelBird
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
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));
Re: PHP 5.4.4 dropping product descriptions
Quote:
Originally Posted by
danilzan
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.
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 ?
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.
Re: PHP 5.4.4 dropping product descriptions
Quote:
Originally Posted by
dgent
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.