RE: [PHP] SESSION Array problem - possibly different PHP versions?
| From: | Angelo Zanetti | Date: | Mon, 10 Mar 2008 15:40:31 +0000 |
| Subject: | RE: [PHP] SESSION Array problem - possibly different PHP versions? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-271206@lists.php.net to get a copy of this message | ||
-----Original Message-----
From: Daniel Brown [mailto:parasane@gmail.com]
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 <angelo@elemental.co.za>
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 version of
> PHP?
From where is the color data coming in to the script, a database?
Check to make sure that the array is being populated. Also, you're
not attempting to pass the session from your dev box to your live box,
are you?
Hi Daniel, thanks for the reply.
The system works as follows.
There is a colour picker, when a user clicks on a colour then it opens a
popup window with the color set as a GET variable.
They can then enter the price per colour etc... once done, they save it. It
then saves the details to a session.
The user then closes the window and it refreshes the parent page which has
the colour picker and a listing of selected colours already choosen, after
the refresh it shows the array values (print_r) and is correct the first
time:
[color] => Array ( [0] => #339933
Then if they do the same procedure again, once the popup opens it shows the
session variable as:
[color] => #339933
But nothing has been done to the SESSION variables since the save, so
somehow between the the click and the popup opening something strange is
happening.
Like I mentioned it works on a local laptop as well as our local server so
its strange, I have tried many times closing the browser to ensure all
sessions are cleared.
Any ideas what might be causing this error?
Thanks very much