{"id":1954,"date":"2012-08-28T13:48:26","date_gmt":"2012-08-28T17:48:26","guid":{"rendered":"http:\/\/linuxhostingsupport.net\/blog\/?p=1954"},"modified":"2013-03-20T08:38:22","modified_gmt":"2013-03-20T12:38:22","slug":"notice-unserialize-function-unserialize-error-at-offset","status":"publish","type":"post","link":"https:\/\/linuxhostingsupport.net\/blog\/notice-unserialize-function-unserialize-error-at-offset","title":{"rendered":"[Notice]: unserialize() [function.unserialize]: Error at offset"},"content":{"rendered":"<p>The <strong>&#8220;function.unserialize&#8221; error occurs<\/strong> while installing Kayako or any other 3rd party application <strong>when the &#8220;magic_quotes_gpc&#8221; parameter is enabled<\/strong>.<\/p>\n<p>By default the value of &#8220;magic_quotes_gpc&#8221; is On in the server side PHP configuration and thus you receive the following error message:<\/p>\n<blockquote>\n<pre>[Notice]: unserialize() [function.unserialize]: Error at offset 5 of\r\n41 bytes (includes\/functions.php:82)\u00a0 UNSERIALIZE FAILED:\r\n[Warning]: Cannot modify header information - headers already\r\nsent by (Cookie\/class.SWIFT_Cookie.php:157)<\/pre>\n<\/blockquote>\n<p>The <strong>&#8220;magic_quotes_gpc&#8221; can be disabled server wide<\/strong> ( in \/etc\/php.ini), however, if you want to keep it enabled server side, <strong>it can be disabled for the specific account as well<\/strong> either by using <strong>.htaccess (if server is non-SuPHP)<\/strong> i.e. placing the following line<\/p>\n<blockquote>\n<pre>php_value magic_quotes_gpc 0<\/pre>\n<\/blockquote>\n<p>OR <strong>by copying the server side php.ini file under the specific account or directory<\/strong> the application is downloaded<\/p>\n<blockquote>\n<pre>cp \/etc\/php.ini \/home\/user\/public_html\/<\/pre>\n<\/blockquote>\n<p>and turn off magic_quotes_gpc in new php.ini file (in case SuPHP is enabled).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The &#8220;function.unserialize&#8221; error occurs while installing Kayako or any other 3rd party application when the &#8220;magic_quotes_gpc&#8221; parameter is enabled.<br \/>\nBy default the value of &#8220;magic_quotes_gpc&#8221; is On in the server side PHP configuration and thus you receive the following error message:<\/p>\n<p>[Notice]: unserialize() [function.unserialize]: Error at offset 5 of<br \/>\n41 bytes (includes\/functions.php:82)\u00a0 UNSERIALIZE FAILED:<br \/>\n[Warning]: Cannot modify header information &#8211; headers already<br \/>\nsent by (Cookie\/class.SWIFT_Cookie.php:157)<\/p>\n<p>The &#8220;magic_quotes_gpc&#8221; can be disabled server wide ( in \/etc\/php.ini), however, if you want to keep it enabled server side, it can be disabled for the specific account as [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[1420,1421,1422,1419],"_links":{"self":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/1954"}],"collection":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/comments?post=1954"}],"version-history":[{"count":10,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/1954\/revisions"}],"predecessor-version":[{"id":1963,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/1954\/revisions\/1963"}],"wp:attachment":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/media?parent=1954"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/categories?post=1954"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/tags?post=1954"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}