Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 233
  • Last Modified:

**URGENT** PHP cookies firefox/netscape vs IE

ok here is what some background


Site is PHP 4.x.x
Apache server
Sessions are stored in the database


When using any browser but IE you can login to the site just fine.

when I look into the sessions table it creates 1 row for the user logging in


When a user goes to the login page with IE

it creates a session when hitting the login page, but when you tap login and the script goes back to the login page because of some unknown reason.  Now you look into the sessions tables there is about 5 session rows

nobody else but me is hitting the script.   I also delete the session table data before each try so I can see what is new

It is not my code I just need to fix it.  

I have no idea why it works in firefox/mozilla/netscape and not in IE.

Thanks!

Randy
0
rjohnsonjr
Asked:
rjohnsonjr
  • 3
1 Solution
 
aksteveCommented:
Sounds like you have a loop..
Something like:
if(!$_SESSION){ header("Location: index.php"); }

Cant really help ya without a block of code though..

I would look near where the page is reloading itself (include), calling a header("Location:"), or where your session function is being called from..
0
 
rjohnsonjrAuthor Commented:
Just to elaborate,  this app uses database sessions with cookies on the client

the cookie is not getting set propertly on IE but it is for Netscape/Firefox

I did a print of out session variables in IE and nothing shows, I did it in netscape/firefox and it shows the data just fine.

hmm.....
0
 
rjohnsonjrAuthor Commented:
Does this look right to you?

setcookie( "sess_key",$key,0,"/","." . str_replace( "www","",$_SERVER["SERVER_NAME"] ),0 );
0
 
rjohnsonjrAuthor Commented:
I figured it out the above line should be setcookie( "sess_key",$key,0,"/", str_replace( "www","",$_SERVER["SERVER_NAME"] ),0 );

I am not sure why the previous client had the extra period in there.


Randy
0
 
moduloCommented:
Closed, 500 points refunded.

modulo
Community Support Moderator
Experts Exchange
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now