RE: Redirects Safari vs Others

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry it took me so long, I wasn't sure where the problem lay and couldn't
get you the exact code, but I figured out why (sorta) this was happening. 

// Causes only Safiri to bomb
header("location:
".$_SERVER['PHP_SELF']."?action=listentries&categoryid=".$id."&page=".$pagei
d);
exit;

Headers:
http://www.domain.org/page.php?action=subcategory&id=7&page=33

GET /page.php?action=subcategory&id=7&page=33 HTTP/1.1
Host: www.domain.org
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12)
Gecko/20050915 Firefox/1.0.7
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=
0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://www.domain.org/page.php?page=33
Cookie: PHPSESSID=cff99c9147d0741d6e48368f72951ef4

HTTP/1.x 302 OK
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
Pragma: no-cache
Content-Length: 188
Content-Type: text/html
Expires: Thu, 19 Nov 1981 08:52:00 GMT
// NOTE HERE NO PAGE REFERENCED
Location: ?action=listentries&categoryid=10&page=33
Server: Microsoft-IIS/6.0
X-Powered-By: PHP/4.4.0, ASP.NET
Date: Tue, 06 Dec 2005 19:01:00 GMT


// Doesn't cause Safari to bomb
header("location:
page.php?action=listentries&categoryid=".$id."&page=".$pageid);
exit;
Headers:

http://www.domain.org/page.php?action=subcategory&id=7&page=33

GET /page.php?action=subcategory&id=7&page=33 HTTP/1.1
Host: www.domain.org
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12)
Gecko/20050915 Firefox/1.0.7
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=
0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://www.domain.org/page.php?page=33
Cookie: PHPSESSID=cff99c9147d0741d6e48368f72951ef4

HTTP/1.x 302 OK
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
Pragma: no-cache
Content-Length: 188
Content-Type: text/html
Expires: Thu, 19 Nov 1981 08:52:00 GMT
// NOW ITS FINE
Location: page.php?action=listentries&categoryid=10&page=33
Server: Microsoft-IIS/6.0
X-Powered-By: PHP/4.4.0, ASP.NET
Date: Tue, 06 Dec 2005 19:01:00 GMT

Firefox and IE, I guess, "assume" where they are supposed to go, where as
Safari was just like "no idea" BOOM. So it seems to me that the browser or
the script has no idea what PHPSELF is untill the script finishes
executing... Input would be welcome. 
-----Original Message-----
From: Brent Baisley [mailto:brent@xxxxxxxxxxxx] 
Sent: Monday, December 05, 2005 12:15 PM
To: Mark Steudel
Cc: php-general@xxxxxxxxxxxxx
Subject: Re:  Redirects Safari vs Others

Probably not a PHP problem. And probably can't help without seeing your
redirect code. I've never had a problem with redirects in any browser Safari
or otherwise, but I always make sure I redirect with a full URL rather than
a relative URL.

On Dec 5, 2005, at 1:29 PM, Mark Steudel wrote:

> I was wondering if folks have experienced infinite redirection loops 
> with Safari where other browsers don't encounter the same problems.
>
> This is what safari spits out
>
> http://www.domain.com/microlibrary.php?action=subcategory&id=7&top=%
> 2Fpage.p
> hp%3Fpage%3D33&page=33?action=listentries&categoryid=7&top=/
> page.php?page=33
> &page=33?action=listentries&categoryid=7&top=/page.php? 
> page=33&page=33?actio
> n=listentries&categoryid=7&top=/page.php?page=33&page=33? 
> action=listentries&
> categoryid=7&top=/page.php?page=33&page=33? 
> action=listentries&categoryid=7&t
> op=/page.php?page=33&page=33?action=listentries&categoryid=7&top=/
> page.php?p
> age=33&page=33?action=listentries&categoryid=7&top=/page.php? 
> page=33&page=33
> ?action=listentries&categoryid=7&top=/page.php?page=33&page=33? 
> action=listen
> tries&categoryid=7&top=/page.php?page=33&page=33? 
> action=listentries&category
> id=7&top=/page.php?page=33&page=33? 
> action=listentries&categoryid=7&top=/page
> .php?page=33&page=33?action=listentries&categoryid=7&top=/page.php? 
> page=33&p
> age=33?action=listentries&categoryid=7&top=/page.php? 
> page=33&page=33?action=
> listentries&categoryid=7&top=/page.php?page=33&page=33? 
> action=listentries&ca
> tegoryid=7&top=/page.php?page=33&page=33? 
> action=listentries&categoryid=7&top
> =/page.php?page=33&page=33
>
> I'm sure this is a coding problem on my part but it's interesting that 
> it doesn't happen in firefox or IE.
>
> Thanks, Mark

--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577

--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux