Reply to Re: unserialize

Your name:

Reply:


Posted by Mike on 10/24/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
--

[Back to original 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

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация