On Mon, Nov 12, 2012 at 2:18 AM, eyal.t wrote:
> Hi all,
>
> Was wondering whether the fact that serialize() casts numeric string keys
> to integers, is a bug, intended behaviour, or just something that is minor
> enough not to have bothered anyone yet?
>
This behavior is consistent with the sta
Hi all,
Was wondering whether the fact that serialize() casts numeric string
keys to integers, is a bug, intended behaviour, or just something that
is minor enough not to have bothered anyone yet?
'string key'); // '1' will be casted to 1
$arr2 = array(1=>'integer key');
$arr1_uns = unserial
On 4/19/07, Stut <[EMAIL PROTECTED]> wrote:
Tobias Wurst wrote:
> i use serialize() to save my object in $_SESSION.
Why? There's no point in serialising something into $_SESSION. Anything
you put in there gets serialised by the session handler.
That isn't necessarily 100% true.
http://www.stub
I'm wondering if the OP is failing to re-define the baseclass when
loading in the saved object...
But, yes, get rid of the by-hand serializing first, as PHP will
serialize it for you.
On Thu, April 19, 2007 7:40 am, Zoltán Németh wrote:
> as far as I know serialize() saves all the properties of t
ts.php.net
Subject: Re: [PHP] serialize an object
as far as I know serialize() saves all the properties of the object...
and I think you can store objects in session without serializing it
since PHP serializes-unserializes it for you automatically - or not?
greets
Zoltán Németh
2007. 04. 19,
>From the PHP manual:
-Original Message-
From: Zoltán Németh [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 19, 2007 8:40 AM
To: Tobias Wurst
Cc: php-general@lists.php.net
Subject: Re: [PHP] serialize an object
as far as I know serialize() saves all the properties of the obj
as far as I know serialize() saves all the properties of the object...
and I think you can store objects in session without serializing it
since PHP serializes-unserializes it for you automatically - or not?
greets
Zoltán Németh
2007. 04. 19, csütörtök keltezéssel 13.17-kor Tobias Wurst ezt írta
Tobias Wurst wrote:
i use serialize() to save my object in $_SESSION.
Why? There's no point in serialising something into $_SESSION. Anything
you put in there gets serialised by the session handler.
But i have one Problem:
the member-variables from the baseclass are not saved.. :(
How can i
hi,
i use serialize() to save my object in $_SESSION.
But i have one Problem:
the member-variables from the baseclass are not saved.. :(
How can i fix this?
thanks in advance
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Just a guess:
You could perhaps run all your data through base64 encoding or
somesuch to be certain the characters to be serialized are all "nice"
On Mon, February 19, 2007 8:56 am, Youri LACAN-BARTLEY wrote:
> Hi all,
>
> I'm just curious to find out if I'm the only person to have bumped
> into
# [EMAIL PROTECTED] / 2007-02-19 17:29:53 +0100:
> Roman Neuhauser wrote:
> >
> >class serializeASCII241 extends Tence_TestCase
> >{
> >function testTruncates()
> >{
> >return $this->assertEquals(
> >"120GB 2X512MB 15.4IN DVD",
> >serialize("120GB 2X512MB 15.
Roman Neuhauser wrote:
# [EMAIL PROTECTED] / 2007-02-19 15:56:15 +0100:
I'm just curious to find out if I'm the only person to have bumped into
this kind of issue with serialize/unserialize.
When I try and serialize an array containing a string value with the "?"
character (alt+241 ASCII) suc
# [EMAIL PROTECTED] / 2007-02-19 15:56:15 +0100:
> I'm just curious to find out if I'm the only person to have bumped into
> this kind of issue with serialize/unserialize.
>
> When I try and serialize an array containing a string value with the "?"
> character (alt+241 ASCII) such as :
> "
Hi all,
I'm just curious to find out if I'm the only person to have bumped into
this kind of issue with serialize/unserialize.
When I try and serialize an array containing a string value with the "±"
character (alt+241 ASCII) such as :
"120GB 2X512MB 15.4IN DVD±RW VHP FR"
The resul
On Wed, May 24, 2006 4:50 am, [EMAIL PROTECTED] wrote:
> Is a serialized array a "safe" string to insert into a mysql text
> field? Or is a
> function such as mysql_real_escape_string always needed?
Assume that a Bad Guy is smart enough to get SOMETHING in there to
mess you up, even if you seriali
At 10:50 AM +0100 5/24/06, [EMAIL PROTECTED] wrote:
Hi,
Is a serialized array a "safe" string to insert into a mysql text
field? Or is a
function such as mysql_real_escape_string always needed?
regards
Simon.
Simon:
If you want to store a serialized array in mysql, then you must use
mysql
On 24/05/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hi,
Is a serialized array a "safe" string to insert into a mysql text field? Or is a
function such as mysql_real_escape_string always needed?
No, it's not at all a safe string to insert into a mysql text field.
mysql_real_escap_string()
It's not safe... if the array contains strings which contain ' or "
might screw your query... it's safe to escape the string result from
serialize...
Andy
[EMAIL PROTECTED] wrote:
Hi,
Is a serialized array a "safe" string to insert into a mysql text field? Or is a
function such as
On 5/24/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hi,
Is a serialized array a "safe" string to insert into a mysql text field? Or is a
function such as mysql_real_escape_string always needed?
*Always* escape your data.
What if your array contains a quote?
--
Postgresql & php tutorials
Hi,
Is a serialized array a "safe" string to insert into a mysql text field? Or is a
function such as mysql_real_escape_string always needed?
regards
Simon.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
tedd wrote:
Jochem:
$_SESSION has another advantage - everything you stick in it is
automagically
serialized and unserialized at end/start of the request.
I didn't know that.
Thanks, now I have to figure out a way to store a $_SESSION in a cookie
and read it back without inferring with wh
Jochem:
$_SESSION has another advantage - everything you stick in it is automagically
serialized and unserialized at end/start of the request.
I didn't know that.
Thanks, now I have to figure out a way to store a $_SESSION in a
cookie and read it back without inferring with what the user is
There's nothing special about the data returned by serialize() except
that it can be safely written saved, transmitted, etc. To do
anything useful with it you have to unserialize() it. The cool part
about it is that you can serialize any data structure, like an entire
array or object.
T
On Thu, April 13, 2006 7:03 pm, Jochem Maas wrote:
>> One example, each domain has a limit of cookies (20) and you can use
>
> I wasn't aware that there was a hard limit on cookies - I always
> thought
> this was a browser dependent setting ... not that I ever get above
> 2 cookies max (and mostly
Robert Cummings wrote:
On Thu, 2006-04-13 at 18:58, tedd wrote:
Not that you don't know -- because I'm sure you do -- but for the
benefit of others.
One example, each domain has a limit of cookies (20) and you can use
them up pretty quickly. However, if you place your data in an array,
you
On Thu, 2006-04-13 at 18:58, tedd wrote:
> Not that you don't know -- because I'm sure you do -- but for the
> benefit of others.
>
> One example, each domain has a limit of cookies (20) and you can use
> them up pretty quickly. However, if you place your data in an array,
> you could then seri
tedd wrote:
At 12:04 AM +0200 4/14/06, Jochem Maas wrote:
Nicholas Couloute wrote:
Are there any tutorials and uses for serialize() ? I went to php.net
and it isn't well documented as I would hope!
$o,"B"=>$a,"C"=>$i,"D"=>$b)),"\n",
?>
... and yes there are uses for it. what do you want
At 12:04 AM +0200 4/14/06, Jochem Maas wrote:
Nicholas Couloute wrote:
Are there any tutorials and uses for serialize() ? I went to
php.net and it isn't well documented as I would hope!
$o,"B"=>$a,"C"=>$i,"D"=>$b)),"\n",
?>
... and yes there are uses for it. what do you want to do?
Jochem:
Nicholas Couloute wrote:
I was thinking of a news system with comments.
fine. but what's that got to do with serialize() per se?
or put another don't look at a function decide it might be
useful and then force yourself to build an application with it
cart before the horse and all that.
Nicholas Couloute wrote:
Are there any tutorials and uses for serialize() ? I went to php.net and
it isn't well documented as I would hope!
$o,"B"=>$a,"C"=>$i,"D"=>$b)),"\n",
?>
... and yes there are uses for it. what do you want to do?
~Nick Couloute
co-owner/Web Designer
Sidekick2Music.
Are there any tutorials and uses for serialize() ? I went to php.net and
it isn't well documented as I would hope!
~Nick Couloute
co-owner/Web Designer
Sidekick2Music.Com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> Sent this to [EMAIL PROTECTED] but forgot to copy php-general...
> heh. Here it is again.
>
> I would use a table such as
> Table
> |_UserData
>
> Then use objects per user to store the data.
> class User {
> var TestScore;
> var ScoreType;
> ...
> var Vars;
> fun
le EvalType would have a scoreTypeID (from the ScoreTBL) for each userID.
> > each user could have multiple scoreTypes in the EvalTBL...
> >
> > -bruce
> >
> >
> > -Original Message-
> > From: Murray @ PlanetThoughtful [mailto:[EMAIL PROTECTED]
> >
> murray...
>
> it may have been helpful to the guy to also give him an idea of your tbl
> structure. i think you're talking about something like:
> tbl schema
>
> EvalTBL
>-id
>-UserID
>-ScoreTypeID
>
> ScoreTBL
>-id
>-ScoreType
>
> table ScoreType could/would have as many
kwater dev'; php-general@lists.php.net
Subject: RE: [PHP] serialize
> I have an app that stores evaluation scores so I have 30+ values all
> within a certain range, currently in the db, each of these values has
> it's own column:
>
> Table test
>id
&g
> I have an app that stores evaluation scores so I have 30+ values all
> within a certain range, currently in the db, each of these values has
> it's own column:
>
> Table test
>id
>user_id
>motivation
>caring
>personal_characteristics
>creativity,
>...etc.
>
> If the
- Original Message -
From: "blackwater dev" <[EMAIL PROTECTED]>
To:
Sent: Sunday, September 25, 2005 4:17 AM
Subject: [PHP] serialize
I have an app that stores evaluation scores so I have 30+ values all
within a certain range, currently in the db, each of these val
I have an app that stores evaluation scores so I have 30+ values all
within a certain range, currently in the db, each of these values has
it's own column:
Table test
id
user_id
motivation
caring
personal_characteristics
creativity,
...etc.
If the client decides they want to
You should use stripslashes to get rid of escaped characters in
$_COOKIE['data']. Then remember to use addslashes when you want to use
$data or $chksum in sql queries.
[EMAIL PROTECTED] wrote:
Hello all i need a little help with serialize and unserialize
here is my code
'cart', 'y' => $pass
Hello all i need a little help with serialize and unserialize
here is my code
'cart', 'y' => $password);
session_register("y");
$var = serialize($data);
//$chksum = md5($data . md5('secret salt here'));
//$var = serialize(array($data,$chksum));
setcookie('data', $var, time() + 3600);
}
Because it is desirable to create many small tables over one very large
table I usually allow PHP to create dynamic tables. For instance, you
could have a table called polls, and use the row id to create a unique
table:
-Dan
On Tue, 2003-07-08 at 07:28, Sævar Öfjörð wrote:
> Hi. Im coding a po
No, use another table, poll_options:
poll_option_id, poll_id, option_text, vote_count
hope the structure is self explanatory.
Sævar Öfjörð wrote:
Hi. I’m coding a poll system which stores information in MySQL.
When a new poll is created a new row is inserted in the table ‘polls’.
There I keep ba
Hi. Im coding a poll system which stores information in MySQL.
When a new poll is created a new row is inserted in the table polls.
There I keep basic information such as the question, id etc. But should
I keep the poll options in one field also? Then I would create an array
from the poll optio
nyway!
Guangzu
- Original Message -
From: "Guangzu Wang" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 17, 2002 4:48 PM
Subject: [PHP] serialize/unserialize problem
> Hi,
> I am working on mime message and try to pass an array with se
Hi,
I am working on mime message and try to pass an array with serialize and
unserialize and got some problems.
Here's some code snippet:
in my function, I have this:
$message['attachments'] = serialize($attachments);
And calling code like this:
$attachments = $message['attachments'];
echo "ATT
At 12:11 AM 5/12/2002 -0700, John Holmes posted the following...
>You should use sessions. All you have to do is call session_start() at
>the beginning of your code. Then, any variable you want to save to the
>session, you simply use:
That did the trick! Thanks for the explanation, John! Now I ha
02 7:57 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Serialize/URLencode query...
>
> I'd like to pass a bunch of variables to another PHP page for
processing
> there... I think serialize() and urlencode() will do what I'm looking
> for..
> can I pass multiple strings
I'd like to pass a bunch of variables to another PHP page for processing
there... I think serialize() and urlencode() will do what I'm looking for..
can I pass multiple strings through this? I'm also not clear on how I can
decode the separate strings out...
Can someone point me in the right di
Hi list,
I've already look at the php manual but couldn't figure out a way to use
serialize to solve my problem.
I have a form, with many fields like (name, age, adress, state), that I put
a save button. This button allows my user to save the fields already filled
in order to finish the form late
Instead of serialize(), you could also fix your existing code like this:
";
}
?>
Or
";
}
?>
bvr.
> for ($i=0; $i<$HTTP_GET_VARS['num']; $i++)
> {
> echo "felnummer ";
> }
> ?>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.ph
On Tuesday, March 5, 2002, at 09:58 AM, Axel Nilsson wrote:
> I use this code to create a number of fields in a form depending on
> what input number I use. My problem occurs when i am going to save it.
> Right now only the value of the last field gets stored. I want to
> serialize all value
hHi
$data = serialize($felnummer);
That should do it..
Tom
At 12:58 AM 6/03/2002, Axel Nilsson wrote:
>Hi All!
>I use this code to create a number of fields in a form depending on what
>input number I use. My problem occurs when i am going to save it. Right
>now only the value of the last fi
Hi All!
I use this code to create a number of fields in a form depending on what
input number I use. My problem occurs when i am going to save it. Right now
only the value of the last field gets stored. I want to serialize all values
from all fields so that they can be saved as a stringvalue
i
Hi,
I'm trying to save an object in the session, with the serialize and
uunserialize fonction.
But i got an error message wich say me that i must define the class before
the session start.
But my session start automaticly. So I can't include my class before the
session start.
I'm looking for a wor
From: Alexander Wagner [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 03, 2001 1:46 PM
> To: scott [gts]; php
> Subject: Re: [PHP] php serialize
>
>
> scott [gts] wrote:
> > i want to write serialize() and unserialize() in perl
> > so that arrays (no objects or refer
scott [gts] wrote:
> i want to write serialize() and unserialize() in perl
> so that arrays (no objects or references yet) can be
> read/written by both PHP and Perl to help with my
> cross-language session implementation.
Why don't you use WDDX?
regards
Wagner
--
Madness takes its toll. P
does anyone know any good places to look for detailed
information about PHP's serialize(), unserialize()
(besides the PHP sources, becuase i'm already going
thru them)
i want to write serialize() and unserialize() in perl
so that arrays (no objects or references yet) can be
read/written by both P
Hello all members,
i am confuse to pass my class object over page (read my
quote below).
can u give a little example to demonstrate this using serialize
and unserialize function.
thaks for your attention..
andrie
Tuesday, March 13, 2001, 9:03:08 PM, Loe nulis gini:
"Brian V Bonini" <[EMAIL PROTECTED]>
To: "PHP Lists" <[EMAIL PROTECTED]>
Sent: Tuesday, February 13, 2001 5:36 AM
Subject: [PHP] serialize/deserialize data
> What exactly does
> serialize/deserialize data
> mean?
>
> --
> PHP General Mailing List
"Brian V Bonini" <[EMAIL PROTECTED]> wrote:
> What exactly does
> serialize/deserialize data
> mean?
See the manual at http://www.php.net/manual/en/function.serialize.php.
Serializing is a way of storing values so that they retain their type and
structure. Session variables are stored in this wa
What exactly does
serialize/deserialize data
mean?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
61 matches
Mail list logo