Re: [PHP] SESSION array problems [ANOTHER SOLUTION]

2008-10-06 Thread Yeti
register_globals has been deprecated as of PHP6. So writing PHP code to work without global registering not just prevents variable poisoning, it also increases the life span of your scripts. I still wonder if using php_flag register_globals off in .htaccess might affect servers running PHP4 and usi

Re: [PHP] SESSION array problems [ANOTHER SOLUTION]

2008-10-04 Thread tedd
Hi gang: While this may be trivial to many of you, I post this for the others. In my last problem, which was caused by register globals being ON, I wondered how I could fix this. In my specific case, the client had "Register Globals ON" and his host objected to turning if OFF saying that oth

Re: [PHP] SESSION array problems [SOLVED]

2008-10-03 Thread Luke Slater
That's lazyness, reply all does that by itself. Luke Slater Defiance.bounceme.net/blog/ On 2 Oct 2008, at 16:15, "Daniel Brown" <[EMAIL PROTECTED]> wrote: On Thu, Oct 2, 2008 at 11:11 AM, Jay Moore <[EMAIL PROTECTED]> wrote: Now, someone show me where that is documented? http://us3.php.ne

Re: [PHP] SESSION array problems [THE REASON]

2008-10-02 Thread Daniel Brown
On Thu, Oct 2, 2008 at 1:53 PM, Jim Lucas <[EMAIL PROTECTED]> wrote: > > But, you must admit that your example above shows a very good reason that it > SHOULD break! Once again, it was a joke. I thought everyone would've realized that immediately. -- More full-root dedicated server package

Re: [PHP] SESSION array problems [SOLVED]

2008-10-02 Thread Jay Moore
Stut wrote: I see your confusion. This is a *mailing list* with a newsgroup gateway. If you're using it as a newsgroup then you have to accept that you're not using it the way it was meant to be used, and that almost always has side-effects. That being the case, I apologize for my assumptions

Re: [PHP] SESSION array problems [THE REASON]

2008-10-02 Thread Jim Lucas
Daniel Brown wrote: > On Thu, Oct 2, 2008 at 12:57 PM, Jim Lucas <[EMAIL PROTECTED]> wrote: >> so long, farewell, bye bye > > If you say so. Do you realize how many websites are going to > break now? ;-P > > https://www.example.com/secure/shop.php?page=creditcardinfo.php > include($pag

Re: [PHP] SESSION array problems [THE REASON]

2008-10-02 Thread Micah Gersten
As was mine. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Daniel Brown wrote: > On Thu, Oct 2, 2008 at 1:14 PM, Micah Gersten <[EMAIL PROTECTED]> wrote: > >> That's probably a good thing: >> >> https://www.example.com/secure/shop.php?page=/etc/passwd >>

Re: [PHP] SESSION array problems [THE REASON]

2008-10-02 Thread tedd
At 12:50 PM -0400 10/2/08, Daniel Brown wrote: On Thu, Oct 2, 2008 at 12:30 PM, tedd <[EMAIL PROTECTED]> wrote: > I also have other servers where register_globals is OFF and I don't have the problem -- so indeed, that WAS the problem. It's INI_PERDIR, by the way, so you can set it wit

Re: [PHP] SESSION array problems [THE REASON]

2008-10-02 Thread Daniel Brown
On Thu, Oct 2, 2008 at 1:14 PM, Micah Gersten <[EMAIL PROTECTED]> wrote: > That's probably a good thing: > > https://www.example.com/secure/shop.php?page=/etc/passwd Yeah, it was a joke. -- More full-root dedicated server packages: Intel 2.4GHz/60GB/512MB/2TB $49.99/mo. Intel 3.06GHz/80GB/1

Re: [PHP] SESSION array problems "reply all"

2008-10-02 Thread tedd
At 11:12 AM -0500 10/2/08, Jay Moore wrote: I don't reply-all. If I have an answer that will help someone, I post it to the list. If they can't be bothered to subscribe to see my reply, tough cookies. The question went to the list; the response went to the list. (I feel just fine about this,

Re: [PHP] SESSION array problems [THE REASON]

2008-10-02 Thread Micah Gersten
That's probably a good thing: https://www.example.com/secure/shop.php?page=/etc/passwd :-) Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Daniel Brown wrote: > On Thu, Oct 2, 2008 at 12:57 PM, Jim Lucas <[EMAIL PROTECTED]> wrote: > >> so long, farewe

Re: [PHP] SESSION array problems [THE REASON]

2008-10-02 Thread Jason Pruim
On Oct 2, 2008, at 1:01 PM, Daniel Brown wrote: On Thu, Oct 2, 2008 at 12:57 PM, Jim Lucas <[EMAIL PROTECTED]> wrote: so long, farewell, bye bye If you say so. Do you realize how many websites are going to break now? ;-P https://www.example.com/secure/shop.php?page=creditcardinfo.

Re: [PHP] SESSION array problems [THE REASON]

2008-10-02 Thread Daniel Brown
On Thu, Oct 2, 2008 at 12:57 PM, Jim Lucas <[EMAIL PROTECTED]> wrote: > > so long, farewell, bye bye If you say so. Do you realize how many websites are going to break now? ;-P https://www.example.com/secure/shop.php?page=creditcardinfo.php -- More full-root dedicated server package

Re: [PHP] SESSION array problems [THE REASON]

2008-10-02 Thread Jim Lucas
Daniel Brown wrote: > And fear not, Sergeant Sperling register_globals is deprecated > and is removed as of PHP6. > so long, farewell, bye bye -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night,

Re: [PHP] SESSION array problems [THE REASON]

2008-10-02 Thread Daniel Brown
On Thu, Oct 2, 2008 at 12:30 PM, tedd <[EMAIL PROTECTED]> wrote: > > I also have other servers where register_globals is OFF and I don't have the > problem -- so indeed, that WAS the problem. It's INI_PERDIR, by the way, so you can set it with a local php.ini - or, if httpd.conf permits it, yo

Re: [PHP] SESSION array problems [THE REASON]

2008-10-02 Thread tedd
At 11:13 AM -0400 10/2/08, Andrew Ballard wrote: As several of us have suggested now, it's got to be register_globals. To all: Yes, register_globals was ON as reported by php-info and that was the problem. I also have other servers where register_globals is OFF and I don't have the problem -

Re: [PHP] SESSION array problems [SOLVED]

2008-10-02 Thread Stut
On 2 Oct 2008, at 17:12, Jay Moore wrote: Stut wrote: It's also worth noting that since subscriptions is not required to post to these lists there's no guarantee that the OP will get your reply if you don't include their address. IOW you're asking us to deprive a number of developers seekin

Re: [PHP] SESSION array problems [SOLVED]

2008-10-02 Thread Daniel Brown
On Thu, Oct 2, 2008 at 12:12 PM, Jay Moore <[EMAIL PROTECTED]> wrote: > > Why is it that it's not ok to top post, but it's perfectly fine to not > subscribe to the list? It's extremely rude and arrogant to post to the list > and expect people to respond to you personally. In fact, people get all

Re: [PHP] SESSION array problems [SOLVED]

2008-10-02 Thread Nathan Rixham
Jay Moore wrote: Stut wrote: It's also worth noting that since subscriptions is not required to post to these lists there's no guarantee that the OP will get your reply if you don't include their address. IOW you're asking us to deprive a number of developers seeking assistance of our replies

Re: [PHP] SESSION array problems [SOLVED]

2008-10-02 Thread Jay Moore
Stut wrote: It's also worth noting that since subscriptions is not required to post to these lists there's no guarantee that the OP will get your reply if you don't include their address. IOW you're asking us to deprive a number of developers seeking assistance of our replies because you can't

Re: [PHP] SESSION array problems [SOLVED]

2008-10-02 Thread Nathan Rixham
Daniel Brown wrote: On Thu, Oct 2, 2008 at 11:11 AM, Jay Moore <[EMAIL PROTECTED]> wrote: Now, someone show me where that is documented? http://us3.php.net/register_globals Also, for the love of glaven, people. If you're going to post to the list, you don't have to include the original sende

Re: [PHP] SESSION array problems

2008-10-02 Thread Nathan Rixham
Ford, Mike wrote: On 01 October 2008 21:24, tedd advised: At 2:38 PM -0500 10/1/08, Afan Pasalic wrote: main reason - if you sort by first or last name you will lose "index". this way is index always "linked" to first/last name. Your point is well taken, but I'm not sorting this. True, the

Re: [PHP] SESSION array problems [SOLVED]

2008-10-02 Thread Stut
On 2 Oct 2008, at 16:11, Jay Moore wrote: Now, someone show me where that is documented? http://us3.php.net/register_globals Also, for the love of glaven, people. If you're going to post to the list, you don't have to include the original sender as well. There's a pretty good chance if

Re: [PHP] SESSION array problems [SOLVED]

2008-10-02 Thread Daniel Brown
On Thu, Oct 2, 2008 at 11:11 AM, Jay Moore <[EMAIL PROTECTED]> wrote: >> Now, someone show me where that is documented? > > http://us3.php.net/register_globals > > > Also, for the love of glaven, people. If you're going to post to the list, > you don't have to include the original sender as well.

Re: [PHP] SESSION array problems [SOLVED]

2008-10-02 Thread Andrew Ballard
On Thu, Oct 2, 2008 at 11:02 AM, tedd <[EMAIL PROTECTED]> wrote: > Hi gang: > > As strange as it may seem, but when session variables are passed to another > page (i.e., used) you cannot extract ALL OF THEM using a loop when the > variable names you are using are the same as the SESSION index's nam

Re: [PHP] SESSION array problems [SOLVED]

2008-10-02 Thread Jay Moore
Now, someone show me where that is documented? http://us3.php.net/register_globals Also, for the love of glaven, people. If you're going to post to the list, you don't have to include the original sender as well. There's a pretty good chance if they originally posted to the list, they'll s

Re: [PHP] SESSION array problems [SOLVED]

2008-10-02 Thread Afan Pasalic
tedd wrote: > Hi gang: > > As strange as it may seem, but when session variables are passed to > another page (i.e., used) you cannot extract ALL OF THEM using a loop > when the variable names you are using are the same as the SESSION > index's names. > > In other words, you cannot do this: > > for

Re: [PHP] SESSION array problems [SOLVED]

2008-10-02 Thread Daniel Brown
On Thu, Oct 2, 2008 at 11:02 AM, tedd <[EMAIL PROTECTED]> wrote: > > As strange as it may seem, but when session variables are passed to another > page (i.e., used) you cannot extract ALL OF THEM using a loop when the > variable names you are using are the same as the SESSION index's names. > [snip

Re: [PHP] SESSION array problems [SOLVED]

2008-10-02 Thread tedd
Hi gang: As strange as it may seem, but when session variables are passed to another page (i.e., used) you cannot extract ALL OF THEM using a loop when the variable names you are using are the same as the SESSION index's names. In other words, you cannot do this: for ($i = 0; $i < $num_user

RE: [PHP] SESSION array problems

2008-10-02 Thread Ford, Mike
On 01 October 2008 21:24, tedd advised: > At 2:38 PM -0500 10/1/08, Afan Pasalic wrote: >> main reason - if you sort by first or last name you will lose "index". >> this way is index always "linked" to first/last name. > > Your point is well taken, but I'm not sorting this. > > True, the arrays

Re: [PHP] SESSION array problems

2008-10-01 Thread Jim Lucas
tedd wrote: Hi gang: Apparently, there's something going on here that I don't understand -- this happens far too often these days. Here's a print_r($_SESSION); of the session arrays I'm using: [user_id] => Array ( [0] => 6156 [1] => 7030 [2] =>

Re: [PHP] SESSION array problems

2008-10-01 Thread Henrik Hudson
On Wednesday 01 October 2008, tedd <[EMAIL PROTECTED]> sent a missive stating: > At 2:43 PM -0500 10/1/08, Afan Pasalic wrote: > >just tested. works fine > > > > > > > >$_SESSION = array( > > '6156' => array( > > 'first_name'=> 'Diane', > >

Re: [PHP] SESSION array problems

2008-10-01 Thread Afan Pasalic
tedd wrote: > At 2:43 PM -0500 10/1/08, Afan Pasalic wrote: >> just tested. works fine >> >> >> >> $_SESSION = array( >> '6156' => array( >> 'first_name'=> 'Diane', >> 'last_name' => 'Cable'), >> '7030' => array( >>

Re: [PHP] SESSION array problems

2008-10-01 Thread Shawn McKenzie
tedd wrote: > At 2:43 PM -0500 10/1/08, Afan Pasalic wrote: >> just tested. works fine >> >> >> >> $_SESSION = array( >> '6156' => array( >> 'first_name'=> 'Diane', >> 'last_name' => 'Cable'), >> '7030' => array( >>

Re: [PHP] SESSION array problems

2008-10-01 Thread tedd
At 2:43 PM -0500 10/1/08, Afan Pasalic wrote: just tested. works fine $_SESSION = array( '6156' => array( 'first_name'=> 'Diane', 'last_name' => 'Cable'), '7030' => array( 'first_name'=>

Re: [PHP] SESSION array problems

2008-10-01 Thread tedd
At 2:38 PM -0500 10/1/08, Afan Pasalic wrote: main reason - if you sort by first or last name you will lose "index". this way is index always "linked" to first/last name. Your point is well taken, but I'm not sorting this. True, the arrays have a common index, which is 0, 1, 2, 3 ... [us

Re: [PHP] SESSION array problems

2008-10-01 Thread Afan Pasalic
tedd wrote: > Hi gang: > > Apparently, there's something going on here that I don't understand -- > this happens far too often these days. > > Here's a print_r($_SESSION); of the session arrays I'm using: > > [user_id] => Array > ( > [0] => 6156 > [1] => 7030 >

Re: [PHP] SESSION array problems

2008-10-01 Thread Afan Pasalic
tedd wrote: > Hi gang: > > Apparently, there's something going on here that I don't understand -- > this happens far too often these days. > > Here's a print_r($_SESSION); of the session arrays I'm using: > > [user_id] => Array > ( > [0] => 6156 > [1] => 7030 >

RE: [PHP] SESSION Array problem - possibly different PHP versions?

2008-03-10 Thread Angelo Zanetti
-Original Message- From: Daniel Brown [mailto:[EMAIL PROTECTED] Sent: 10 March 2008 16:04 To: Angelo Zanetti Cc: php-general@lists.php.net Subject: Re: [PHP] SESSION Array problem - possibly different PHP versions? On Mon, Mar 10, 2008 at 9:22 AM, Angelo Zanetti <[EMAIL PROTEC

Re: [PHP] SESSION Array problem - possibly different PHP versions?

2008-03-10 Thread Daniel Brown
On Mon, Mar 10, 2008 at 9:22 AM, Angelo Zanetti <[EMAIL PROTECTED]> wrote: > There fore it isn't an array of colors within the session array. How can PHP > change this? Also the strange thing is that locally it works fine but not > live. So I am guessing that there is a problem with a certain ve

Re: [PHP] session array

2006-08-07 Thread Jochem Maas
Ross wrote: > I am creating an array of sessions > > $_SESSION['results'][] always call session_start() before using $_SESSION > > > There may be up to 7 and I need to know why do I always get the > notice'Undefined index: results in...'? > > How do I define or initialise the array if it on

Re: [PHP] session array

2006-08-07 Thread Stut
Ross wrote: I am creating an array of sessions $_SESSION['results'][] There may be up to 7 and I need to know why do I always get the notice'Undefined index: results in...'? How do I define or initialise the array if it only gets set once the form has been posted (an answer has been given

Re: [PHP] Session Array Disappears

2006-04-30 Thread Jochem Maas
Richard Lynch wrote: ... Your basic Human Interface principle, which is apparently going to be called Web 2.0 now. :-) lol, that sums it up perfectly. ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Session Array Disappears

2006-04-25 Thread Webmaster
Richard Lynch wrote: I'm thinking the guy who suggested ignore_user_abort(TRUE) is just doing Voodoo Programming :-) I love the term Voodoo Programming! I'm guilty of doing it myself. :-) My 2 cents.I could see times when ignore_user_abort(TRUE) could be very handy. I'm wondering thou

Re: [PHP] Session Array Disappears

2006-04-25 Thread Webmaster
Hello, Thank you for the reply. Richard Lynch wrote: On Mon, April 24, 2006 2:48 pm, Webmaster wrote: In reading the www.php.net/manual/en/ref.session.php page, I'd like to point out we do not use cookies. The session id is propagated in the URL (although it's not visible in the URL bar).

Re: [PHP] Session Array Disappears

2006-04-25 Thread Al
Richard Lynch wrote: I'm thinking the guy who suggested ignore_user_abort(TRUE) is just doing Voodoo Programming :-) It may or may not be something you want, but I doubt it will have any affect whatsoever on your posted problem. Actually, I think anywhere that somebody thinks they need ignore_u

Re: [PHP] Session Array Disappears

2006-04-24 Thread Richard Lynch
I'm thinking the guy who suggested ignore_user_abort(TRUE) is just doing Voodoo Programming :-) It may or may not be something you want, but I doubt it will have any affect whatsoever on your posted problem. Actually, I think anywhere that somebody thinks they need ignore_user_abort, they probabl

Re: [PHP] Session Array Disappears

2006-04-24 Thread Richard Lynch
On Mon, April 24, 2006 2:48 pm, Webmaster wrote: > In reading the www.php.net/manual/en/ref.session.php page, I'd like to > point out we do not use cookies. The session id is propagated in the > URL (although it's not visible in the URL bar). Something is very odd here... Unless the session data

Re: [PHP] Session Array Disappears

2006-04-24 Thread Webmaster
Hello, Thank you for the reply. Interesting function. I have not heard of that one previously. I've read the manual pages for it.If I understand ignore_user_abort(TRUE)...you are thinking that maybe the user is being disconnected (using stop button or having ISP issues) prior to the sc

Re: [PHP] Session Array Disappears

2006-04-24 Thread Al
add a ignore_user_abort(TRUE) first thing in your code. Webmaster wrote: Thanks for the reply. Sorry, that was a typo in the email. I actually do have session_start(); at the beginning of the scripts. My bad. Thanks, R Brady Mitchell wrote: You're missing the session_start() call at the

Re: [PHP] Session Array Disappears

2006-04-24 Thread Webmaster
Thanks for the reply. Sorry, that was a typo in the email. I actually do have session_start(); at the beginning of the scripts. My bad. Thanks, R Brady Mitchell wrote: You're missing the session_start() call at the beginning of your code. I'm surprised it works at all without that.. http:

RE: [PHP] Session Array Disappears

2006-04-24 Thread Brady Mitchell
You're missing the session_start() call at the beginning of your code. I'm surprised it works at all without that.. http://www.php.net/manual/en/ref.session.php http://www.php.net/manual/en/function.session-start.php Brady > -Original Message- > From: Webmaster [mailto:[EMAIL PROTECTED

Re: [PHP] Session Array using array_pop and array_unshift

2005-05-11 Thread Richard Lynch
On Wed, May 11, 2005 4:46 pm, Webmaster said: > I have an application that occasionally drops a session array element > value. > > $_SESSION['userData'] = $userData; > > this to happen? Has anyone else experienced this sort of occasional > anomaly? YES! Granted, in my case, it was a short-lived

RE: [PHP] Session Array...

2003-06-10 Thread John W. Holmes
> I am getting something like this: > > > > I will be getting upto 5 of the above values, Thanks to John Holmes (from > this list) I know how to enter it into the database but how do i create a > session with the above? > > The reason why i want to do this is, > 1)user picks upto 5 packages to

Re: [PHP] SESSION ARRAY

2002-09-01 Thread Todd Pasley
Ooops, thats right. I should check over before i send i guess. Sorry, Todd > $_SESSION is a predefined variable, session_start() > session_register('BILLARRAY') should work though :) > > Keith Vance > Vance Consulting LLC > www.vanceconsulting.net > (206) 355-2399 > > Try my open source PHP aut

Re: [PHP] SESSION ARRAY

2002-08-29 Thread Keith Vance
$_SESSION is a predefined variable, session_start() session_register('BILLARRAY') should work though :) Keith Vance Vance Consulting LLC www.vanceconsulting.net (206) 355-2399 Try my open source PHP authentication system, Rampart by visiting http://rampart.sourceforge.net/. Commercial support i

Re: [PHP] SESSION ARRAY

2002-08-29 Thread Todd Pasley
> What is the proper syntax for storing an array in a session? > > is it $_SESSION["BILLARRAY"]=$ARRAY? Yep, providing youre using session_start() and session_register("_SESSION") you can assign any type of data, just like a regular hash. Todd. - Original Message - From: "Randy Johnson

Re: [PHP] session array :-/

2001-05-02 Thread Richard Lynch
> $myArray=array(); Is this line getting executed that second time?... Also, I think it's better to register a variable *before* assigning any value to it... Whether this is just coding style or it actually matters, I dunno. -- WARNING [EMAIL PROTECTED] address is not working -- Use [EMAIL PRO