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 >