Hi,
I have a problems with session and cache when they stored in db.
zen-cart 1.3.8a
MySQL 5.1.33-log, PHP: 5.2.10 (Zend: 2.2.0)
MySQL 5.0.18-max-log, PHP: 5.2.1 (Zend: 2.2.0)
Both fields TABLE_DB_CACHE'[cache_data'] and TABLE_SESSIONS['value'] are mediumblob.
The problem arises only when write/read information containing characters in utf-8.
My solution.
includes/functions/sessions.php
Find ~43 line
Code:
if (isset($value->fields['value']) && $value->fields['value']) {
Add after
Code:
$value->fields['value'] = base64_decode($value->fields['value']);
Find ~62 line
Add after
Code:
$value = base64_encode($value);
includes/classes/cache.php
Find ~127 line
Code:
$result_serialize = $db->prepare_input(serialize($zf_result_array));
Add after
Code:
$result_serialize = base64_encode($result_serialize);
Find ~155 line
Code:
$zp_cache_result = $db->Execute($sql);
Add after
Code:
$zp_cache_result->fields['cache_data'] = base64_decode($zp_cache_result->fields['cache_data']);