Re: [PHP] Unserialize problem (and or bug)

2007-01-25 Thread Sancar Saran
Hi
On Thursday 25 January 2007 02:16, Richard Lynch wrote:
 On Wed, January 24, 2007 9:17 am, Sancar Saran wrote:
  After updating company test server to dotdeb 5.2.0 it star to give
  memory
  problems (even 32mb session). I tought it was because of suhosin. And
  I
  cannot update that server to vanilla debian php5 package because it
  was a
  sarge so today my company gives me another debian etch (like my home
  pc). I
  setup latest php 5.2.0.8 for debian etch.
 
  Then unserialize gives another problem
 
  Message: unserialize(): Error at offset 1384 of 3177 bytes
  Code: 8
  Line: 419
 
  My pc uses debian etch and have php 5.1.6-5 my scripts working
  normally.
 
  Is there any suggestion for handle this ?

 What is in the data at byte 1384 that can't be unserialized?

some UTF-8 data


 Are you trying to take data serialized by one version of PHP and
 unserialize it with another?
Yes
 That does not work in current versions, though discussion on Internals
 lends hope that future versions will be able to deal intelligently
 with this situation.

Jochem was inform me, then I was re generate that arrays then problem fixed. 


 Check http://bugs.php.net/ for similar bugs -- there may be a patch.

 Also check with suhosin and Debian bug tracking, as it may be specific
 to either of those.


Currently My machine and target has same php version, Today I may do another 
transfer. I'll recheck situation, maybe backporting data from server solve 
the issue. And or I move my machine to more updated PHP...

Dotdeb (including suhosin) and standart PHP act very differently. In dotdeb 
unserialize filling 32 mb'ed session and stop. Vanilla php 5.1.6 (at target 
server) and 5.2.0 (at target server) giving offset error...

More interesting was I'm on so tigh schedule to do someting... 

Maybe I have to go and burn a candle to St.Murphy

God save Jochem and you, because there was no info anywhere in web, yesterday 
I go crazy. And I bet myself to this serialize/unserialize thing...

Many thanks...


Sancar

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Unserialize problem (and or bug)

2007-01-24 Thread Sancar Saran
Hi,

After updating company test server to dotdeb 5.2.0 it star to give memory 
problems (even 32mb session). I tought it was because of suhosin. And I 
cannot update that server to vanilla debian php5 package because it was a 
sarge so today my company gives me another debian etch (like my home pc). I 
setup latest php 5.2.0.8 for debian etch.

Then unserialize gives another problem 

Message: unserialize(): Error at offset 1384 of 3177 bytes
Code: 8
Line: 419

My pc uses debian etch and have php 5.1.6-5 my scripts working normally.

Is there any suggestion for handle this ? 

Regards

Sancar

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Unserialize problem (and or bug)

2007-01-24 Thread Németh Zoltán
On sze, 2007-01-24 at 17:17 +0200, Sancar Saran wrote:
 Hi,
 
 After updating company test server to dotdeb 5.2.0 it star to give memory 
 problems (even 32mb session). I tought it was because of suhosin. And I 
 cannot update that server to vanilla debian php5 package because it was a 
 sarge so today my company gives me another debian etch (like my home pc). I 
 setup latest php 5.2.0.8 for debian etch.
 

sorry for my ignorance but what is the difference between vanilla php5
and php5?

thanks
Zoltán Németh

 Then unserialize gives another problem 
 
 Message: unserialize(): Error at offset 1384 of 3177 bytes
 Code: 8
 Line: 419
 
 My pc uses debian etch and have php 5.1.6-5 my scripts working normally.
 
 Is there any suggestion for handle this ? 
 
 Regards
 
 Sancar
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Unserialize problem (and or bug)

2007-01-24 Thread Sancar Saran
Hi,
I mean there was no offical php5 package for debian sarge. Dotdeb was not 
offical.

On Wednesday 24 January 2007 17:46, Németh Zoltán wrote:
 On sze, 2007-01-24 at 17:17 +0200, Sancar Saran wrote:
  Hi,
 
  After updating company test server to dotdeb 5.2.0 it star to give memory
  problems (even 32mb session). I tought it was because of suhosin. And I
  cannot update that server to vanilla debian php5 package because it was a
  sarge so today my company gives me another debian etch (like my home pc).
  I setup latest php 5.2.0.8 for debian etch.

 sorry for my ignorance but what is the difference between vanilla php5
 and php5?

 thanks
 Zoltán Németh

  Then unserialize gives another problem
 
  Message: unserialize(): Error at offset 1384 of 3177 bytes
  Code: 8
  Line: 419
 
  My pc uses debian etch and have php 5.1.6-5 my scripts working normally.
 
  Is there any suggestion for handle this ?
 
  Regards
 
  Sancar

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Unserialize problem (and or bug)

2007-01-24 Thread Jochem Maas
Németh Zoltán wrote:
 On sze, 2007-01-24 at 17:17 +0200, Sancar Saran wrote:
 Hi,

 After updating company test server to dotdeb 5.2.0 it star to give memory 
 problems (even 32mb session). I tought it was because of suhosin. And I 
 cannot update that server to vanilla debian php5 package because it was a 
 sarge so today my company gives me another debian etch (like my home pc). I 
 setup latest php 5.2.0.8 for debian etch.

this is too vague to say anything about. what memory problems???


 
 sorry for my ignorance but what is the difference between vanilla php5
 and php5?

normally php5 is strawberry flavour ;-)

 
 thanks
 Zoltán Németh
 
 Then unserialize gives another problem 

 Message: unserialize(): Error at offset 1384 of 3177 bytes
 Code: 8
 Line: 419

are you unserializing data that was serialized with an older version
of php per chance? the data format may have changed - I read something
about that but can't remember if it's applicable to 5.2.x

write a test script that serializes and unserializes data to
see if that also shows the problem.


 My pc uses debian etch and have php 5.1.6-5 my scripts working normally.

 Is there any suggestion for handle this ? 

 Regards

 Sancar

 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Unserialize problem (and or bug)

2007-01-24 Thread Richard Lynch
On Wed, January 24, 2007 9:17 am, Sancar Saran wrote:
 After updating company test server to dotdeb 5.2.0 it star to give
 memory
 problems (even 32mb session). I tought it was because of suhosin. And
 I
 cannot update that server to vanilla debian php5 package because it
 was a
 sarge so today my company gives me another debian etch (like my home
 pc). I
 setup latest php 5.2.0.8 for debian etch.

 Then unserialize gives another problem

 Message: unserialize(): Error at offset 1384 of 3177 bytes
 Code: 8
 Line: 419

 My pc uses debian etch and have php 5.1.6-5 my scripts working
 normally.

 Is there any suggestion for handle this ?

What is in the data at byte 1384 that can't be unserialized?


Are you trying to take data serialized by one version of PHP and
unserialize it with another?

That does not work in current versions, though discussion on Internals
lends hope that future versions will be able to deal intelligently
with this situation.


Check http://bugs.php.net/ for similar bugs -- there may be a patch.

Also check with suhosin and Debian bug tracking, as it may be specific
to either of those.

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] unserialize() problem

2005-09-08 Thread Harris Kosmidhs
Hello all.

I wrote some php pages running on apache1.3/php4.4.0-1
In the login page I make use of a class where I store the users name and
some integers (i.e whether the user ia able to see a certain page) and
serialize the class to a session var. When you go to a page I
unserialize the session var and check if the user is permited to see the
page.

No when I moved the files to my host server running apache2/php4.3.2 a
strange problem appears. When I access the page for the first time the
session var is unserialized ok and so I can see the page. If I refresh
it this session var (and only this.alla the other session variables wotk
ok) is lost and I cannot unserialize it.

What may be the problem?

Thanks

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] unserialize problem

2005-04-14 Thread Dasmeet Singh
Hi!
I am trying to unserialize a serialized array stored in cookie...
I am using following code :
echo(Welcome to Members Areabr);
echo(br$loginbr);
$m_l_d=unserialize($login);
echo $m_l_d;
echo($m_l_d[0], $m_l_d[1], $m_l_d[2]);
However the output is:
Welcome to Members Area
a:4:{i:0;s:1:\h\;i:1;s:1:\2\;i:2;s:1:\1\;i:3;s:1:\g\;}
, ,
that means $login exists and it echos properly..
but why isnt it unserializing?


http://hostwindow.info
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] unserialize problem

2005-04-14 Thread Marek Kilimajer
Dasmeet Singh wrote:
Hi!
I am trying to unserialize a serialized array stored in cookie...
I am using following code :
echo(Welcome to Members Areabr);
echo(br$loginbr);
$m_l_d=unserialize($login);
echo $m_l_d;
echo($m_l_d[0], $m_l_d[1], $m_l_d[2]);
However the output is:
Welcome to Members Area
a:4:{i:0;s:1:\h\;i:1;s:1:\2\;i:2;s:1:\1\;i:3;s:1:\g\;}
, ,
that means $login exists and it echos properly..
but why isnt it unserializing?
magic_quotes_gpc is on, so the cookie is quoted. Use first:
$login = (ini_get('magic_quotes_gpc') ? stripslashes($_COOKIE['login']) 
: $_COOKIE['login']);

then unserialize.
!!!WARNING!!!
array elements in $m_l_d are NOT quoted, don't use them directly in sql 
queries, validate them first

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] unserialize problem

2005-04-14 Thread Dasmeet Singh
Marek Kilimajer wrote:
Dasmeet Singh wrote:
Hi!
I am trying to unserialize a serialized array stored in cookie...
I am using following code :
echo(Welcome to Members Areabr);
echo(br$loginbr);
$m_l_d=unserialize($login);
echo $m_l_d;
echo($m_l_d[0], $m_l_d[1], $m_l_d[2]);
However the output is:
Welcome to Members Area
a:4:{i:0;s:1:\h\;i:1;s:1:\2\;i:2;s:1:\1\;i:3;s:1:\g\;}
, ,
that means $login exists and it echos properly..
but why isnt it unserializing?
magic_quotes_gpc is on, so the cookie is quoted. Use first:
$login = (ini_get('magic_quotes_gpc') ? stripslashes($_COOKIE['login']) 
: $_COOKIE['login']);

then unserialize.
!!!WARNING!!!
array elements in $m_l_d are NOT quoted, don't use them directly in sql 
queries, validate them first
Yep! That is working :) Thanks!

http://hostwindow.info
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php