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

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

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?

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 have a

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

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 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 ($i = 0;

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 offtopic rant 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

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 names.

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 offtopic rant 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

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 offtopic rant 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

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 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 offtopic rant Also, for the love of glaven, people. If you're going to post to the list, you don't have to include the

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
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 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 up

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

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 [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, you

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, Act

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 ?php include($page); ? -- /Daniel P. Brown More

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

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 ?php include($page); ? :-) 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:

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

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. -- /Daniel P. Brown More full-root dedicated server packages: Intel 2.4GHz/60GB/512MB/2TB $49.99/mo. Intel

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 with

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 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 ?php include($page);

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

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. -- /Daniel P. Brown More full-root dedicated

[PHP] SESSION array problems

2008-10-01 Thread tedd
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] = 656 )

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 [2]

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 [2]

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 ...

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 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 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 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 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] =

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

2008-03-10 Thread Angelo Zanetti
Hi All, I have a problem that only occurs on our live server and not our local server. It works fine locally. Basically I am using a session array to store values of product colours. A user can add colours to the session array. The session is defined as follows: $_SESSION['color'][$counter]

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

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 PROTECTED] wrote

[PHP] session array

2006-08-07 Thread Ross
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) on the page.

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

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 only gets

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 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

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

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

[PHP] Session Array Disappears

2006-04-24 Thread Webmaster
Hello, The site I'm working on works like this... Requires a login that uses sessions to remember username and email address. Upon being verified, the user is presented with a page that displays several questions regarding their background. Upon submitting the background page, a script

RE: [PHP] Session Array Disappears

2006-04-24 Thread Brady Mitchell
] Sent: Monday, April 24, 2006 1:49 PM To: php-general@lists.php.net Subject: [PHP] Session Array Disappears Hello, The site I'm working on works like this... Requires a login that uses sessions to remember username and email address. Upon being verified, the user is presented

Re: [PHP] Session Array Disappears

2006-04-24 Thread Webmaster
://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] Sent: Monday, April 24, 2006 1:49 PM To: php-general@lists.php.net Subject: [PHP] Session Array Disappears Hello

Re: [PHP] Session Array Disappears

2006-04-24 Thread Al
-general@lists.php.net Subject: [PHP] Session Array Disappears Hello, The site I'm working on works like this... Requires a login that uses sessions to remember username and email address. Upon being verified, the user is presented with a page that displays several questions regarding

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

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 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

[PHP] Session Array using array_pop and array_unshift

2005-05-11 Thread Webmaster
Hello, I have an application that occasionally drops a session array element value. Data from the form... $_POST['firstName']; $_POST['lastName']; $_POST['phone']; $_POST['email']; $_POST['cell']; When the form is submitted, the POST variables are checked to make sure they each contain a value.

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 buglet

[PHP] Session Array...

2003-06-10 Thread Ryan A
Hey, I am getting something like this: input type=checkbox name='id[loco package]' value=1 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

RE: [PHP] Session Array...

2003-06-10 Thread John W. Holmes
I am getting something like this: input type=checkbox name='id[loco package]' value=1 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

Re: [PHP] SESSION ARRAY

2002-09-01 Thread Todd Pasley
AM Subject: [PHP] SESSION ARRAY What is the proper syntax for storing an array in a session? is it $_SESSION[BILLARRAY]=$ARRAY? Randy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP

[PHP] SESSION ARRAY

2002-08-29 Thread Randy Johnson
What is the proper syntax for storing an array in a session? is it $_SESSION[BILLARRAY]=$ARRAY? Randy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] SESSION ARRAY

2002-08-29 Thread Todd Pasley
PROTECTED] To: phplist [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, August 30, 2002 9:08 AM Subject: [PHP] SESSION ARRAY What is the proper syntax for storing an array in a session? is it $_SESSION[BILLARRAY]=$ARRAY? Randy -- PHP General Mailing List (http://www.php.net

Re: [PHP] SESSION ARRAY

2002-08-29 Thread Keith Vance
type of data, just like a regular hash. Todd. - Original Message - From: Randy Johnson [EMAIL PROTECTED] To: phplist [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, August 30, 2002 9:08 AM Subject: [PHP] SESSION ARRAY What is the proper syntax for storing an array in a session

[PHP] Session Array Problems - Please Help

2002-03-06 Thread Jordan
I'm having issues registering and then updating a value for specific items in an array. I've read through the manual and MARC but I can't seem to find the right answer. Here's what I'm trying to do... Basic Backgroung: This is a view cart page. Depending on products that they have selected I

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

[PHP] session array :-/

2001-04-30 Thread Christian
Hi, I'm having trouble with a two dimensional array with sessions. Following is an example of my code which is split between three pages. ### myFunctions.php ### function addToMyArray($newStuff) { global $myArray;