Re: [PHP] possible IE problem

2006-07-12 Thread Richard Lynch
On Mon, July 10, 2006 10:55 am, Schalk wrote:
> Now that the parse error is fixed the login script works fine in FF
> but
> in IE it does not do the redirect. Is there a reason why this code may
> not work in IE? Is there a better way to do this?
>
> $_SESSION['email'] = $email;
> $_SESSION['memberpassword'] = md5($memberpassword);
> header("Location:
> http://demo.bdiverse.com/accessible/admin/listmypages.php";);
> exit;

Bad News:

Your sessions are using Cookies, unless you've turned on trans_sid and
the SID is in the URL.

The browsers are getting two headers:
Cookie: php_session_id somevalue
Location: http://demo.bdiverse.com/accessible/admin/listmypages.php

Some browsers, as soon as they see the Location: header, will *IGNORE*
the Cookie headers, and just do the re-direct.

Using header("Location:") is prone to all kinds of problems...

If this is on your own server, just do:
include 'accessible/admin/listmypages.php';
exit;

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] possible IE problem

2006-07-10 Thread Larry Garfield
This is an issue with the session not being closed properly on a redirect.  IE 
seems to be more bothered by this than Firefox, for reasons I don't quite 
understand.  The solution is to explicitly close the session yourself.

See: 
http://www.php.net/manual/en/function.session-start.php#57875
http://www.php.net/session_write_close

And various other user comments.

On Monday 10 July 2006 10:55, Schalk wrote:
> Greetings All,
>
> Now that the parse error is fixed the login script works fine in FF but
> in IE it does not do the redirect. Is there a reason why this code may
> not work in IE? Is there a better way to do this?
>
> $_SESSION['email'] = $email;
> $_SESSION['memberpassword'] = md5($memberpassword);
> header("Location:
> http://demo.bdiverse.com/accessible/admin/listmypages.php";);
> exit;
>
> Thanks!
>
> --
> Kind Regards
> Schalk Neethling
> Web Developer.Designer.Programmer.President
> Volume4.Business.Solution.Developers

-- 
Larry Garfield  AIM: LOLG42
[EMAIL PROTECTED]   ICQ: 6817012

"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 
Jefferson

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] possible IE problem

2006-07-10 Thread Schalk

Greetings All,

Now that the parse error is fixed the login script works fine in FF but 
in IE it does not do the redirect. Is there a reason why this code may 
not work in IE? Is there a better way to do this?


$_SESSION['email'] = $email;
$_SESSION['memberpassword'] = md5($memberpassword);
header("Location: 
http://demo.bdiverse.com/accessible/admin/listmypages.php";);

exit;

Thanks!

--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Business.Solution.Developers

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php