hello all
i see in the new version that :
so where should i define this???Code:Added ability to define DB_CHARSET to automatically trigger a mysql SET NAMES statement if needed for things like UTF8 support, preventing the need to edit the db class
hello all
i see in the new version that :
so where should i define this???Code:Added ability to define DB_CHARSET to automatically trigger a mysql SET NAMES statement if needed for things like UTF8 support, preventing the need to edit the db class
Create a new file for it:
/includes/extra_configures/my_db_charset.php
Do the same with: /admin/includes/extra_configures/my_db_charset.phpCode:<?php define('DB_CHARSET', 'your_charset_here');
NOTES:
- This is only applicable to v1.3.9x. It will NOT work in older versions, and is not applicable to the future version v2.x since it will be utf8 already.
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donations always welcome: www.zen-cart.com/donate
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.
I had to add this line of code when I upgraded to php 5 [ZenCart 138 code doesn't set the encoding of the client connection, so when connecting to a MySQL 5 server, the server will return utf-8 encoded text.]
Should I keep this or go with the new codePHP Code:the code added to includes/classes/db/mysql/query_factory.php line 36:
mysql_set_charset('latin1');
I plan to upgrade this week to 1.39aPHP Code:/includes/extra_configures/my_db_charset.php <?php define('DB_CHARSET', 'your_charset_here');
Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41
Using the DB_CHARSET define replaces the need for editing query_factory.php, so you should remove your custom code from that file.
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donations always welcome: www.zen-cart.com/donate
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.
thanks dr byte!![]()
Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41
thank you![]()
hello, can you please help me out, no matter what i try i keep running into error during install:
i have created my_db_charset.php in /includes/extra_configures & in /admin/includes/extra_configures with the line:Code:1366 Incorrect string value: '\xA3:&eur...' for column 'configuration_value' at row 1 in: [INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('Convert currencies for Text emails', 'CURRENCIES_TRANSLATIONS', '£,£:€,€', 'What currency conversions do you need for Text emails? Default = £,£:€,€', 12, 120, NULL, '2003-11-21 00:00:00', NULL, 'zen_cfg_textarea_small(');]
to no avail...Code:<?php define('DB_CHARSET', 'utf8');
The server specs:
<LI id=li_server_version>Server version: 5.1.44-community<LI id=li_mysql_proto>Protocol version: 10
<LI id=li_select_mysql_charset>MySQL charset: UTF-8 Unicode (utf8)
<LI id=li_web_server_software>Apache/2.2.15 (Win32) PHP/5.3.2<LI id=li_mysql_client_version>MySQL client version: mysqlnd 5.0.7-dev - 091210 - $Revision: 294543 $<LI id=li_used_php_extension>PHP extension: mysql
The collation (not sure if it is related) is set to utf8_general_ci
This is a clean install on a new server and the default setting seems to be this utf8 setting. I am not the admin of this server and it isn't obvious to me where or how i could chang the character set to latin on the database itself.
The database is allready created for me, i can fill it with tables or drop the tables in it, but not alter the database itself.
Any input to resolve would be highly appreciated, thank you
Add it to the bottom of /zc_install/includes/installer_params.php ... and keep it in the other locations where you already have it, too.
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donations always welcome: www.zen-cart.com/donate
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.
Thank you for the input.
I added the line like so after the last line in that file:
unfortunately, it results in the exact same error message.Code:define('STRICT_ERROR_REPORTING', false); define('DB_CHARSET', 'utf8');
anything else i can try to resolve?
You need to say 'latin1' instead of 'utf8'
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donations always welcome: www.zen-cart.com/donate
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.
Bookmarks