Date: 07/11/01
- Next message: Cresta Johnson: "[phplib] login page help"
- Previous message: Roger Ramirez: "Re: [phplib] Template-problem upgrading from php3 -> php4.0.5"
- In reply to: Dima Nemchenko: "Re: [phplib] page_open() doesn't return NEW CLUE"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi --
Dima, thanks for the clue - that led me in the right direction. Indeed,
MSIE seems to drop several environmental variables when moving from https
to http, and while I can't yet demonstrate this yet, I think some POST
variables get translated into Gibberish as well ...
I have the site now working, but there is still a black hole in there
somewhere. It seems (on this site and others, in the past) that if I try
to do any kind of work BEFORE calling page_open(), there's often a problem.
For example, my prepend file REQUIREs class.db_mysql.inc, so I have tried
to store "arrival" POST data in a table before calling page_open(). The
INSERT happens, and the mysql_insert_id gets stored in $insertID, then
page_open() is called ... but the very next line of code never gets
executed for MSIE. I insert a trap to echo the value of $insertID
immediately after page_open(), and Netscape shows me the value, but MSIE
doesn't - MSIE just goes off to the Home Page.
I wish I could send you all to the page, but it's an intranet inside the
firewall, so several people around here would frown on that ... however,
here's what I'm doing. The visitor arrives at the domain name (with no
script name) with two POST variables "ref" and "mem" ... here's what I had
at the top of index.php3:
<?
if ($ref == 12345) {
// store $ref and $mem in a mysql table
$insertID = mysql_insert_id;
page_open("sess" -> DB_Bob);
echo "INSERTID: $insertID<br><br>";
exit;
Header("Location:store.php3?tmp=$insertID");
exit;
}
?>
<!-- Home Page HTML code -->
When I came in with a Netscape browser (4.77 or 6.01), I would see the
INSERTID data, and then stop. If I came in with MSIE (4.0 or 5.0 or AOL
4.0), the INSERT happened - twice - but the normal Home Page appeared - no
INSERTID display, no referral, no nothing - except the home page HTML. The
two INSERTS - the first one contained the POSTed values, the second one
timestamped 1 second later was all zeros.
My solution -- and this was trial-and-error, knowing that COOKIES are
guaranteed to be ON in my case -- was to avoid calling page_open() at all ...
<?
if ($ref == 12345) {
SetCookie ("employee", "$mem", "0", "/", "FQD");
Header("Location:store.php3");
exit;
}
?>
<!-- Home Page HTML code -->
Now, all versions of Netscape, MSIE and AOL - plus Opera 5.11 - work fine,
they all go to store.php3 ...
I will dig deeper into this as time permits, but if anyone else has had
similar experiences, or can spot the part of the manual I skimmed over, or
point out the error in my logic - please, let me know. These all-nighters
aren't as easy as they used to be!
Bob.
At 10:05 AM 7/11/01 +0100, Dima Nemchenko wrote:
>Bob Bowker wrote:
>
> > Hi --
> >
> > Seems this only happens with MSIE - Netscape gets through just fine
> ...?!?!?
> >
> > Bob.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: phplib-unsubscribe <email protected>
> > For additional commands, e-mail: phplib-help <email protected>
>
>Hi Bob,
>
>IE 5 has a problem setting HTTP_REFERER when going https-->http. It could be
>that...
>
>Cheers,
>--
>
>:D_ima
>Dima Nemchenko <Dima.Nemchenko <email protected>>
>
>"Open source code is like lobster--most people who haven't tried it don't like
>the way it looks. But those who try it, love it."
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: phplib-unsubscribe <email protected>
>For additional commands, e-mail: phplib-help <email protected>
-- Abbestellen mit Mail an: phplib-unsubscribe <email protected> Kommandoliste mit Mail an: phplib-help <email protected>
- Next message: Cresta Johnson: "[phplib] login page help"
- Previous message: Roger Ramirez: "Re: [phplib] Template-problem upgrading from php3 -> php4.0.5"
- In reply to: Dima Nemchenko: "Re: [phplib] page_open() doesn't return NEW CLUE"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

