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
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
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 :
> "
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
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.
> 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 values has
it's own colu
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
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
I figured out a little bit later. It's something like:
rawurlencdoe(serialize($attachments));
unserialize(urldecode(stripslashes($attachments)));
I overlook that rawurlencode/urldecode, another annoying thing :) I just
came from perl, for half time I found PHP cute, another half time, you know
i
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
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:
$_SESSION["name"] = $name;
Then, on the next page, call session_start() again, and you'll have the
value of $name from the previo
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
what serialize does is that it allows you to store or pass data types such
as arrays, objects etc without losing their structure.
for ex, let's say you have an array
$foo=array("abc","def")
now you need to pass this array to the next page without losing the
structure. that is on the next page,
"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
43 matches
Mail list logo