Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
08-31-2007, 07:51 PM #1
[Sessions][IE 5] Auth wrong or something else?
I'm working on a web application and I'm almost done for the first version.
I check several browser to see how the application is showing it's html css.
But when I use Internet Explorer 5 I can't login and I don't know why.
The code if you entered a valid username with password:
if( isset( $_SESSION['login']) || $_SESSION['login'] )
if( $correctLogin )
$_SESSION['account_id'] = mysql_result($getUsr, 0, 0); //account id opslaan
$_SESSION['real_name'] = mysql_result($getUsr, 0, 3); //user opslaan vanuit het formulier in de sessie
$_SESSION['login'] = true; //als login klopt sessie login aanmaken
$setIsLoggedIn = "
UPDATE " . ACCOUNT_TABLE . "
is_logged_in = '1'
WHERE account_id='" . $_SESSION['account_id'] . "'";
mysql_unbuffered_query( $setIsLoggedIn ) or die( mysql_error() );
if ( !isset($_SESSION['login']) || !$_SESSION['login'] )
So I think the //auth code isn't working well, this is only with IE5. With FF,IE6+,Opera7+ etc etc it is working well.
Can anybody tell me why IE5 doesn't login to my application?
Thanks in advance.
08-31-2007, 08:57 PM #2
- Join Date
- Jan 2007
- Thanked 58 Times in 54 Posts
My first question would be: Why?
I'm all for supporting different browsers. But a browser without any reasonable marketshare?
(I'm not trying to flame, just curious)
I think if all major browsers handle it properly, and an older browser does not, I think you're dealing with a bug.So I think the //auth code isn't working well
It might not be able to deal with relative forwards as well.
Are you sure it's doing what you think it is doing? Usually when something is acting completely illogical, I like to go back and be 100% sure that what I think is happening, is in fact what is happening.
Using Fiddler, and logging statements (so you can see in a seperate file where the code goes) evaluate what is happening.
It's possible that IE5 doesn't handle the session cookie properly with the location forward call, resulting in it thinking that it is a new session (echo out the session ID into a debug file).
EDIT: Looks like I found a fellow Dutchian
Last edited by aedrin; 08-31-2007 at 09:01 PM.
08-31-2007, 09:07 PM #3
Hehe, I knew that somebody will asked that.
Why I'm supporting IE5, I don't now actually.
I'm obsessed that my code is working in many browsers, I don't know I like that. (It's hard to express thit in English for me...but ok).
I thought also it is bug, but I'm not sure, so I posted a tread .
Yes, I'm sure it's doing what I'm thinking it is doing for 99%.
I do that PHPSESSIONID debug thing tomorrow(now I'm getting a beer at the bar).
09-02-2007, 02:34 PM #4
09-02-2007, 02:52 PM #5
- Join Date
- Oct 2006
- Denver, Colorado USA
- Thanked 304 Times in 296 Posts
This is not really a bug, but following a standard. From the header() section of the php manual -
Only some browsers/versions support relative addresses in a header() redirect.Note: HTTP/1.1 requires an absolute URI as argument to Location: including the scheme, hostname and absolute path, but some clients accept relative URIs. You can usually use $_SERVER['HTTP_HOST'], $_SERVER['PHP_SELF'] and dirname() to make an absolute URI from a relative one yourself:
/* Redirect to a different page in the current directory that was requested */
$host = $_SERVER['HTTP_HOST'];
$uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
$extra = 'mypage.php';
If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.
Users who have thanked CFMaBiSmAd for this post: