Wow, interesting. Can you file an issue for this? This looks like a
good patch to include.
How did the null terminator get included in the object data btw?
-ralph
Ondrej Ivanič wrote:
Hi,
2010/3/12 Ondrej Ivanič <[email protected]>:
Surprisingly, the output from error_log was truncated:
1071: Zend_Auth|a:1:{s:7:"storage";O:21:"xxxxxxxxxxxx_UserInfo":7:{s:28:"
Output was truncated because of NULL (0x00) character after 's:28:'
which was cause of all my problems.
So I patched DbTable session hadler:
Index: library/Zend/Session/SaveHandler/DbTable.php
===================================================================
--- library/Zend/Session/SaveHandler/DbTable.php (revision 18687)
+++ library/Zend/Session/SaveHandler/DbTable.php (working copy)
@@ -319,7 +319,7 @@
if (count($rows)) {
if ($this->_getExpirationTime($row = $rows->current()) > time()) {
- $return = $row->{$this->_dataColumn};
+ $return = pack("H*", $row->{$this->_dataColumn});
} else {
$this->destroy($id);
}
@@ -338,6 +338,7 @@
public function write($id, $data)
{
$return = false;
+ $data = bin2hex($data);
$data = array($this->_modifiedColumn => time(),
$this->_dataColumn => (string) $data);