AW: [PHP-WIN] PHP Session problem...
| From: | (Sven Schnitzke) | Date: | Mon, 05 May 2003 07:24:45 +0000 |
| Subject: | AW: [PHP-WIN] PHP Session problem... | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-19762@lists.php.net to get a copy of this message | ||
Hi,
which browser do you use for testing your app? There is
a big bug in NN4 and IE5 where an inacceptable formatting
on the form page breaks the ability to POST data. It was
introduced by a CSS style and didn't even break the look of
the page. The effect was NN4 sending nothing, IE5 sending
RAW_POST_DATA but not $_POST['any_field'] and NN6
doing the job as intended.
As I recall the problem had to do with using <div> in conjunction
with form fields. This was quite difficult to sort out as it focused
on formatting and broke functionality. Sorry, but I don't recall exactly.
It looks like the PHP part of your page isn't necessarily to blame.
--
Sven
> -----Ursprüngliche Nachricht-----
> Von: Guru P Chaturvedi [SMTP:bangboy2k2@hotmail.com]
> Gesendet am: Montag, 5. Mai 2003 08:05
> An: php-windows@lists.php.net
> Betreff: Re: [PHP-WIN] PHP Session problem...
>
> Hi Stephen,
>
> Yes i test by printing the values and cancelling redirection. It works very
> fine. I am really not able to understand why sessions should fail on
> redirection. I tried all the testing u have mentioned before posting to this
> news group.
>
> Well anyways lemme if anything else comes to your mind.
>
> Thanx,
> Guru.
>
> "Stephen" <stephen.edmonds5@btinternet.com> wrote in message
> news:005e01c31281$8fed4a80$5c00a8c0@q...
> > Well first of all, get rid of automatic redirection. Then, I suggest
> > outputting "messages" to the browser so you can see what is happening. For
> > example:
> >
> > Creating session variables: (i am explicitly calling session_start())
> > $row = mysql_fetch_array($result, MYSQL_BOTH);
> >
> > $_SESSION["uid"] = trim($row[0]);
> > print '$_SESSION["uid"]
='.$_SESSION["uid"].'<br>Input was
> > '.trim($row[0]).'<br>';
> > $_SESSION["uname"] = trim($row[1]);
> > print '$_SESSION["uname"]
='.$_SESSION["uname"].'<br>Input was
> > '.trim($row[1]).'<br>';
> >
> > print 'Session ID is: '.session_id().'<br>';
> >
> > file://header("Location: bohome.php?");
> >
> > The most imporant thing is to make sure that a) the values are going in
> and
> > that b) the session id which is output to the browser is EXACTLY the same
> in
> > both pages!
> >
> > session_start();
> > ob_start();
> >
> > $userid = trim($_SESSION["uid"]);
> > $username = trim($_SESSION["uname"]);
> >
> > if( $userid == "" )
> > {
> > print 'Session ID is: '.session_id().'<br>';
> > file://header("Location: index.php?msg=err&" . $userid);
> > exit;
> > }
> >
> > I use print statements, you may be familiar with echo instead. You may do
> > which ever you wish. Using output messages like this is perhaps THE SINGLE
> > most important skill to learn when programming. It makes finding errors
> > easier and faster, and also helps to pinpoint bugs :-)
> >
> > Stephen
> >
> >
> > ----- Original Message -----
> > From: "Guru P Chaturvedi" <bangboy2k2@hotmail.com>
> > To: <php-windows@lists.php.net>
> > Sent: Sunday, May 04, 2003 9:51 PM
> > Subject: [PHP-WIN] PHP Session problem...
> >
> >
> > > hi all,
> > >
> > > i'm really really confused and fed up of the PHP sessions. it works
> > > sometimes and fails horribly rest of the times. please take a look at
> the
> > > code:
> > >
> > > Creating session variables: (i am explicitly calling session_start())
> > >
> > > $row = mysql_fetch_array($result, MYSQL_BOTH);
> > >
> > > $_SESSION["uid"] = trim($row[0]);
> > > $_SESSION["uname"] = trim($row[1]);
> > >
> > > header("Location: bohome.php?");
> > >
> > > it get's thru very well and get's redirected to bohome.php
> > >
> > > if that file i have this peice of code:
> > >
> > > session_start();
> > > ob_start();
> > >
> > > $userid = trim($_SESSION["uid"]);
> > > $username = trim($_SESSION["uname"]);
> > >
> > > if( $userid == "" )
> > > {
> > > header("Location: index.php?msg=err&" . $userid);
> > > exit;
> > > }
> > >
> > > here the $userid is becoming "" and thus redirects back to index page.
> why
> > > is this behaving so... what cud be the problem...? please help me
> out....
> > >
> > > regards,
> > > guru.
> > >
> > >
> > >
> > > --
> > > PHP Windows Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> >
> >
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>