You are here: Re: unserialize « PHP Programming Language « IT news, forums, messages
Re: unserialize

Posted by Alvaro G. Vicario on 10/27/28 11:34

*** Mike escribió/wrote (Mon, 12 Dec 2005 18:56:37 GMT):
> us=a:3:{s:2:\"id\";s:1:\"0\";s:5:\"fname\";s:1:\"x\";s:5:\"lname\";s:1:\"x\";}

When I try to unserialize this string I get this error:

Notice: unserialize(): Error at offset 0 of 78 bytes in C:\tmp\borrame.php
on line 3

It sounds like you don't have PHP configured to display notices. Add this
to top of your code:

error_reporting(E_ALL);

Also, apparently you have magic_quotes_gpc on so PHP is adding \ to all
your quotes, so " becomes \" when you read it. I suggest you edit php.ini
and set magic off:

; Magic quotes for incoming GET/POST/Cookie data.
magic_quotes_gpc = Off

; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(),
etc.
magic_quotes_runtime = Off

If you cannot reconfigure your host, then you need further coding. Ask for
it if you need it.


--
-+ Álvaro G. Vicario - Burgos, Spain
++ http://bits.demogracia.com es mi sitio para programadores web
+- http://www.demogracia.com es mi web de humor libre de cloro
--

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация