Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Problem with PHP header redirect with some browsers

Posted on 2006-07-21
14
Medium Priority
?
239 Views
Last Modified: 2010-04-20
I seems to have a problem with PHP header redirect with some browsers. Mainly using Windows 98 OS and MAC 9 OS some other.

Please see header response from my server on page 1 and 2.

What do I need to change on the server?  Probably in php.ini?

Page 1

User IP Address: 81.139.xx.xxx#1 Server Response: https://secure.myserver
HTTP Status Code: HTTP/1.1 200 OK
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Type: text/html
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Set-Cookie: PHPSESSID=pl47kl5i1of25tsoc8e731npe6; expires=Fri, 21-Jul-2006 10:08:14 GMT; path=/
Date: Fri, 21 Jul 2006 09:44:14 GMT
Connection: close

Page 2

User IP Address: 81.139.xx.xxx#1 Server Response: https://secure.myserver/page_2.php
HTTP Status Code: HTTP/1.1 302 OK
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Length: 146
Content-Type: text/html
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Location: bf_donations_step_1.php
Set-Cookie: PHPSESSID=pl47kl5i1of25tsoc8e731npe6; expires=Fri, 21-Jul-2006 10:22:43 GMT; path=/
Date: Fri, 21 Jul 2006 09:58:44 GMT
Connection: close
0
Comment
Question by:Manager-pd
  • 6
  • 6
14 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 17157105
> Location: bf_donations_step_1.php
RFC recommends that the Location header uses a full URI including schema and FQDN.
Even most browsers accept relative paths too, you seem to have some being picky or stupid ;-)
0
 

Author Comment

by:Manager-pd
ID: 17168153

Hi,
I’ve made the change from relative path to full path for header redirect, but unfortunately it didn’t make any difference.

I  can see how PC  with Windows 98 and MSIE 6.0 browser can display a session ID on the second page, but it can’t get data from server side session file or  MySQL database.


Any thoughts?


 
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 17168230
confused. What has the session ID to do with your question?
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 

Author Comment

by:Manager-pd
ID: 17175987
Sorry, I am only trying to analyse the situation. If session ID is nothing to do with my question then ignore it.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 17176325
what's your problem now, after you fixed the Location header?
0
 

Author Comment

by:Manager-pd
ID: 17183489
Same problem with PHP header redirect with some browsers. Mainly using Windows 98 OS. Please see the top of the page.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 17184047
please post the Location header which causes the problem
0
 

Author Comment

by:Manager-pd
ID: 17184917
I had to move back to relative path again. Please find the header.
-------------------------------------------------------------------------------------------------------
#1 Server Response: https://secure.myserver/bf_donations_step_2.php
HTTP Status Code: HTTP/1.1 302 OK
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Length: 146
Content-Type: text/html
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Location: bf_donations_step_1.php
Set-Cookie: PHPSESSID=b2cetnskmpbma531ac2qn9kdv2; expires=Wed, 26-Jul-2006 15:24:47 GMT; path=/
Date: Wed, 26 Jul 2006 15:00:47 GMT
Connection: close
Redirect Target: bf_donations_step_1.php
The Web Server can use the following Header Fields
Method
HTTP-Version
URI
Date
Connection
Authorization
If-Modified-Since
Content-Length
Content-Type
All other server headers are parsed, but they are ignored.

0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 17185112
as I said: relative paths are not RFC-compliant, so don't blame the browser but the programmer of your application
0
 

Author Comment

by:Manager-pd
ID: 17191387
Thanks for the comment. As I already tested with full path and I still haveing the same problem, I don't see relative path as been a problem in my case.
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 2000 total points
ID: 17191907
so you tell us that you have browsers that cannot handle Location headers?
I guess the only way to fix this is to use a reliable browser.
0
 

Author Comment

by:Manager-pd
ID: 17199748
I appreciate that, but the problem is it’s not my browsers, it’s external users browsers. So I don’t think I can tell them to change there PCs.

What I can’t understand is way some browsers on Windows 98 PC can go from page to page and others can’t. The version of browsers look the same to me when I check web log files.

Is there known issue with Windows 98 in my case?
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
What You Need to Know when Searching for a Webhost Provider
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Loops Section Overview
Suggested Courses

916 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