Note that there are some explanatory texts on larger screens.

plurals
  1. POCodeigniter - PHP - unserialize(): Error at offset 185 of 411 bytes
    text
    copied!<p>Hi i got a strange error on Codeigniter + nginx server.</p> <p>I get a log Error which is :</p> <pre><code>ERROR - 2013-07-17 15:01:22 --&gt; Severity: Notice --&gt; unserialize(): Error at offset 185 of 411 bytes /system/libraries/Session.php 726 </code></pre> <p>so i putted this code to Session.php library to log what the data serializing is:</p> <pre><code>function _unserialize($data) { log_message('error', var_export($data, true)); $data = @unserialize(strip_slashes($data)); if (is_array($data)) { foreach ($data as $key =&gt; $val) { if (is_string($val)) { $data[$key] = str_replace('{{slash}}', '\\', $val); } } return $data; } return (is_string($data)) ? str_replace('{{slash}}', '\\', $data) : $data; } </code></pre> <p>and this returns this in log file:</p> <pre><code>ERROR - 2013-07-17 15:01:22 --&gt; 'a:11:{s:7:"user_id";s:2:"93";s:14:"user_name";s:7:"Michael";s:13:"user_last";s:5:"Russa";s:10:"user_email";s:22:"moo@ail.com";s:13:"user_loc";s:12:"??????";s:13:"user_lat";s:10:"55.72420";s:14:"user_lon";s:10:"37.6484220";s:16:"user_grav";s:32:"7ef03623b352c9b62f6a642ef4b40434";s:11:"user_ps";s:3:"152";s:9:"beta_u";s:3:"yes";s:12:"is_mod";s:4:"true";}' ERROR - 2013-07-17 15:01:22 --&gt; Severity: Notice --&gt; unserialize(): Error at offset 185 of 411 bytes /project/system/libraries/Session.php 726 **`NB: the serialized key values are not real, i changed them just to show you what that returns.`** </code></pre> <p>I also controlled php.ini and <code>magic_quotes_rcp = off</code> and also <code>magic_quotes_runtime = off;</code></p> <p>i'm using <code>UTF-8 in Codeigniter, HTML and in all database tables and database itself</code>.</p> <p>Also i'm using the <code>Session DB</code> in Codeigniter</p> <p>Can't understand what's going wrong, what it could be?</p> <p>Is session too huge? It uses a db to store session so i'm wondering how it could be too huge :(</p> <blockquote> <p>The ONLY thing i can highlight is that i updated the session db field userdata FROM TEXT to LONGTEXT , but with both types the error persists.</p> </blockquote> <p>any help appriciated thanks.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload