?
Solved

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

Posted on 2005-03-04
6
Medium Priority
?
222 Views
Last Modified: 2006-11-17
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
Comment
Question by:rjohnsonjr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
6 Comments
 
LVL 5

Expert Comment

by:aksteve
ID: 13463905
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
 
LVL 6

Author Comment

by:rjohnsonjr
ID: 13464151
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
 
LVL 6

Author Comment

by:rjohnsonjr
ID: 13464168
Does this look right to you?

setcookie( "sess_key",$key,0,"/","." . str_replace( "www","",$_SERVER["SERVER_NAME"] ),0 );
0
 
LVL 6

Author Comment

by:rjohnsonjr
ID: 13465730
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
 

Accepted Solution

by:
modulo earned 0 total points
ID: 13509889
Closed, 500 points refunded.

modulo
Community Support Moderator
Experts Exchange
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question