troubleshooting Question

PHP session_start() causes double page requests?

Avatar of Geoff Millikan
Geoff MillikanFlag for United States of America asked on
PHPApache Web Server
8 Comments1 Solution667 ViewsLast Modified:
I've got a weird thing happening where web browsers are calling a page twice even though it was loaded only once.

The only thing I can see might be causing this must be either some PHP thing with sessions or an Apache misconfiguration.

Attached headers showing the request as well as the HTML of the page.  Notice that this is a simple page, no JavaScript, no frames, no external images/css, etc.

What in the world could be causing this?!

This is so weird.


===Initial Request===
GET /user/home/ HTTP/1.1
Host: www.t1shopper.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
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
Cookie: PHPSESSID=sicX8F09WQ830n8g3xxxxxx6ve8; tsmc=no%20id
 
===Initial Response===
HTTP/1.x 200 OK
Date: Sat, 09 Aug 2008 22:10:46 GMT
Server: Apache/2.2.3 (Red Hat)
X-Powered-By: PHP/5.1.6
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Vary: Accept-Encoding,User-Agent
Content-Encoding: gzip
Keep-Alive: timeout=2, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html
 
===Second Request (note referer) ====
GET /user/home/ HTTP/1.1
Host: www.t1shopper.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1
Accept: image/png,image/*;q=0.8,*/*;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: https://www.t1shopper.com/user/home/
Cookie: PHPSESSID=sicX8F09WQ830n8g3xxxxxx6ve8; tsmc=no%20id
html-of-page-doing-double-reques.txt
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 8 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros