|
Posted by Mike on 10/22/62 11:34
Some other apps need magic quotes on. I guess there is no consistency about what is used. Maybe some
apps are older than others.
I tried to unserialize with urlrawencode and stripslashes and neither made a difference. I would
think that would take the slashes out. Is that correct?
I am open for more ideas. I've never used serialize/unserialize before so this is a learning
experience for me.
Thanks.
Mike
"Alvaro G. Vicario" <webmaster@NOSPAMdemogracia.com> wrote in message
news:2pzf7qi5t1u6$.pwzrwuyk570c.dlg@40tude.net...
*** 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]
|