For Programmers: Free Programming Magazines  


Home > Archive > PHP Programming > August 2005 > OK I'm stumped. PHP and Firefox problem









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author OK I'm stumped. PHP and Firefox problem
Ken

2005-08-28, 3:55 am

Hi all.

I had no joy with this in alt.comp.lang.php so thought I would try here
instead.

Hopefully someone will make sense of this for me.

Using:
PHP 4.3.10 (cgi) (built: Dec 21 2004 09:18:25)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

Server version: Apache/2.0.52
Server built: May 9 2005 18:13:36

Linux 2.6.9-1.667smp #1 SMP Tue Nov 2 14:59:52 EST 2004 i686 i686 i386
GNU/Linux
--------------------------------------------------------------------------

I have a few php scripts running, on login, the session is written correctly
ie:
--------------------------------------------------------
VCID|s:3:"s34";firstname|s:3:"Ken";lastname|s:6:"Steven";
--------------------------------------------------------

going from page to page it is still fine. Using IE when I transfer to my
HTTPS scripts, the session data is written fine ie:

----------------------------------------------------------------------------
VCID|s:3:"s34";firstname|s:3:"Ken";lastname|s:6:"Steven";WC_CompPrize|s:5:"3
:::4";WC_UserID|s:3:"s34";
WC_CompID|s:4:"SS01";WC_Answer|s:2:"a2";WC_HowManyTickets|s:2:"20";WC_Freebi
es|d:10;
WC_TotalTickets|d:30;WC_TotalCost|i:60;
----------------------------------------------------------------------------

BUT, following the exact same route through the site, if I am using FIREFOX
this is what I get:

----------------------------------------------------------------------------
VCID|s:3:"s34";firstname|s:3:"Ken";lastname|s:6:"Steven";3:::4|N;s34|N;SS01|
N;a1|N;|N;WC_CompPrize|N
----------------------------------------------------------------------------

Note that all of the WC_nnnnnnn prefixes are ommited. No matter what I do I
just cannot get the correct session data written to the session file but
ONLY if I use
FireFox. Why the hell should that be???

$_SESSION['WC_CompPrize'] = $compPrize;
$_SESSION['WC_UserID'] = $VCID;
$_SESSION['WC_CompID'] = $compID;
$_SESSION['WC_Answer'] = $q_answer;
$_SESSION['WC_HowManyTickets'] = $howmany;
$_SESSION['WC_Freebies'] = $half;
$_SESSION['WC_TotalTickets'] = $TotalTickets;
$_SESSION['WC_TotalCost'] = $total;

Works for every other browser, in desperation I even tried:

session_register($WC_compPrize);
session_register($VCID);
session_register($compID);
session_register($q_answer);
session_register($howmany);
session_register($half);
session_register($TotalTickets);
session_register($total);


But I am just getting nowhere. Any ideas people???


Ken.



Janwillem Borleffs

2005-08-28, 7:55 am

Ken wrote:
> going from page to page it is still fine. Using IE when I transfer to
> my HTTPS scripts, the session data is written fine ie:

[...]
> BUT, following the exact same route through the site, if I am using
> FIREFOX this is what I get:
>
> ----------------------------------------------------------------------------
> VCID|s:3:"s34";firstname|s:3:"Ken";lastname|s:6:"Steven";3:::4|N;s34|N;SS01|
> N;a1|N;|N;WC_CompPrize|N
> ----------------------------------------------------------------------------
>


You seem to be very focussed on the serialized session data written to your
server instead of what is actually retrievable.

What happens when you print one of the values stored in $_SESSION?

Also, since your are using SSL, ensure that the session.cookie_secure
directive is enabled, e.g. with ini_set("session.cookie_secure", 1).


JW



Ken

2005-08-28, 6:55 pm

Hi.

Not fixated no. I was just wondering why it should be that the
serialized session data is written when using any browser other
than FireFox? I can retrieve the data ok it just seems rather,
um.. odd, that this behaviour only occurs when the site is
accessed using FireFox.

Just one of those oddities that bugs me as to why it happens.

session.cookie_secure is set as well.


Ken.

"Janwillem Borleffs" <jw@jwscripts.com> wrote in message
news:43117d32$0$99739$dbd45001@news.euronet.nl...
> Ken wrote:
> [...]
>
> --------------------------------------------------------------------------

--
VCID|s:3:"s34";firstname|s:3:"Ken";lastname|s:6:"Steven";3:::4|N;s34|N;SS01|[color=darkred]
>
> --------------------------------------------------------------------------

--
>
> You seem to be very focussed on the serialized session data written to

your
> server instead of what is actually retrievable.
>
> What happens when you print one of the values stored in $_SESSION?
>
> Also, since your are using SSL, ensure that the session.cookie_secure
> directive is enabled, e.g. with ini_set("session.cookie_secure", 1).
>
>
> JW
>
>
>



Steve

2005-08-28, 6:55 pm

On Sun, 28 Aug 2005 07:28:40 +0000, Ken wrote:

> Hi all.
>
> I had no joy with this in alt.comp.lang.php so thought I would try here
> instead.
>
> Hopefully someone will make sense of this for me.
>
> Using:
> PHP 4.3.10 (cgi) (built: Dec 21 2004 09:18:25)
> Copyright (c) 1997-2004 The PHP Group
> Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
>
> Server version: Apache/2.0.52
> Server built: May 9 2005 18:13:36
>
> Linux 2.6.9-1.667smp #1 SMP Tue Nov 2 14:59:52 EST 2004 i686 i686 i386
> GNU/Linux
> --------------------------------------------------------------------------
>
> I have a few php scripts running, on login, the session is written correctly
> ie:
> --------------------------------------------------------
> VCID|s:3:"s34";firstname|s:3:"Ken";lastname|s:6:"Steven";
> --------------------------------------------------------
>
> going from page to page it is still fine. Using IE when I transfer to my
> HTTPS scripts, the session data is written fine ie:
>
> ----------------------------------------------------------------------------
> VCID|s:3:"s34";firstname|s:3:"Ken";lastname|s:6:"Steven";WC_CompPrize|s:5:"3
> :::4";WC_UserID|s:3:"s34";
> WC_CompID|s:4:"SS01";WC_Answer|s:2:"a2";WC_HowManyTickets|s:2:"20";WC_Freebi
> es|d:10;
> WC_TotalTickets|d:30;WC_TotalCost|i:60;
> ----------------------------------------------------------------------------
>
> BUT, following the exact same route through the site, if I am using FIREFOX
> this is what I get:
>
> ----------------------------------------------------------------------------
> VCID|s:3:"s34";firstname|s:3:"Ken";lastname|s:6:"Steven";3:::4|N;s34|N;SS01|
> N;a1|N;|N;WC_CompPrize|N
> ----------------------------------------------------------------------------
>
> Note that all of the WC_nnnnnnn prefixes are ommited. No matter what I do I
> just cannot get the correct session data written to the session file but
> ONLY if I use
> FireFox. Why the hell should that be???
>
> $_SESSION['WC_CompPrize'] = $compPrize;
> $_SESSION['WC_UserID'] = $VCID;
> $_SESSION['WC_CompID'] = $compID;
> $_SESSION['WC_Answer'] = $q_answer;
> $_SESSION['WC_HowManyTickets'] = $howmany;
> $_SESSION['WC_Freebies'] = $half;
> $_SESSION['WC_TotalTickets'] = $TotalTickets;
> $_SESSION['WC_TotalCost'] = $total;
>
> Works for every other browser, in desperation I even tried:
>
> session_register($WC_compPrize);
> session_register($VCID);
> session_register($compID);
> session_register($q_answer);
> session_register($howmany);
> session_register($half);
> session_register($TotalTickets);
> session_register($total);
>
>
> But I am just getting nowhere. Any ideas people???
>
>
> Ken.

different php.ini -> different include path -> old version of script?

Ken

2005-08-28, 6:55 pm

> different php.ini -> different include path -> old version of script?
>


Same server, same php.ini, same include path, same script.


Ken.


Alvaro G Vicario

2005-08-29, 3:55 am

*** Ken wrote/escribió (Sun, 28 Aug 2005 07:28:40 +0000 (UTC)):
> No matter what I do I
> just cannot get the correct session data written to the session file but
> ONLY if I use
> FireFox. Why the hell should that be???


Install the LiveHTTPHeaders extension and find out what's exactly the
conversation between server and browser, including session ID.

--
-- Álvaro G. Vicario - Burgos, Spain
-- http://bits.demogracia.com - Mi sitio sobre programación web
-- Don't e-mail me your questions, post them to the group
--
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com