**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.


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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..
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.

rjohnsonjrAuthor Commented:
Does this look right to you?

setcookie( "sess_key",$key,0,"/","." . str_replace( "www","",$_SERVER["SERVER_NAME"] ),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.

Closed, 500 points refunded.

Community Support Moderator
Experts Exchange

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.