PHP Sessions & IE Problems?

software development

#1

Craziest problem I have ever seen, and I’m not getting anywhere with support - “We can’t help you with browser related issues,” but I’m really thinking this is a server configuration issue…

Have some basic placeholder pages up now (http://SandAndSky.com). Nothing to speak of so far, but some some pretty basic content, CSS, etc.

Site works perfectly UNTIL I add session_start() to the pages (first line).

At that point, the site continues to work fine in FireFox, Opera, and the latest IE 7 beta.

However, IE6 (and earlier) intermittantly begin displaying blank pages - Thinking they’re “done,” when in fact, there’s nothing there, and view source shows nothing. No errors are reported.

To validate this, I set-up three basic copies of a test page, containing nothing but links to each-other.

Literally, not another line of code.

I can use IE 6, and click those links all day, and everthing behaves just fine.

As soon as I add session_start() to the top of each, IE6 starts intermittantly displaying some of the pages as blank (about 1-in-6, or 1-in-8 clicks).

No other change - Just session_start().

When such a blank page is displayed, reloading it in the browser will cause it to finally display properly.

Given that, I would dispute Dreamhost dismissing it as a “browser compatibility issue,” no?

While they denied this being on their end, they did suggest that I add the following to .htacess, which did not appear to make any difference (it certainly didn’t correct the problem)…

BrowserMatch “MSIE” brokenvary=1
BrowserMatch “Mozilla/4.[0-9]{2}” brokenvary=1 BrowserMatch “Opera” !brokenvary SetEnvIf brokenvary 1 force-no-vary

ExpiresActive On
ExpiresDefault A18000
ExpiresByType image/gif A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType image/png A2592000

I’m really anxious to upload a far more elaborate site that I’m hoping to launch, but hesitate until this is resolved on the much simpler pages that are currently there, and this has literally been going back-and-forth with support for more than two weeks now.

Any ideas/suggestions/comments? There seems to be a lot on Google regarding problems with PHP session configuration at the server level causing probs like this with IE, but it all looks like server-related things I don’t understand, and Dreamhost does not want to acknowledge that a server-side issue is possible.


#2

Should add that I’ve tried PHP 4 & 5, in combination with fast and safe CGI options (I think, every possible combination of the PHP options), and no difference.

Other domains on the account are fine, but run on different servers. This is the only domain with this problem, and the only one on this particular server.

Thanks in advance for any help at all!


#3

This is a browser issue. 100% browser issue. The only thing that start_session() does is send a Cookie for IE to read. Do you have some kind of cookie blocker in IE? What IE addons do you have?

Like you said, it works in IE7 and Firefox. I’d add it’ll work in Opera and Safari. Which leaves the only browser it doesn’t work is IE6; thus Browser problem.


#4

However, this happens with anyone using IE 6 on any machine (assume that you tried it yourself)?

Go to the site, and click across all of the links in the menu, back-and-forth, across all four destinations, again and again.

About 1 in 6, or 1 in 8 times, you will see a blank page in IE 6.

Everyone who’s tried it reports the same thing, and report not having the same problem elsewhere.

If you Google “blank page” and “ineternet explorer,” you’ll see a plethora of references to the way some servers deal with memory allocation when session_start() is called, but unfortunately, it’s beyond me.

Please - Try my site yourself… Click the links back-and-forth - Do 20 clicks, and you’re sure to get a blank page.

Then please help me figure-out why?


#5

As an update… I have “confirmation” of this anomoly from over at phpbuilder.com (http://phpbuilder.com/board/showthread.php?p=10702771) where it appears that this seems to be an issue with gzip encoding the session cookie off the Dreamhost box, and IE (6) processing that.

It’s still elusive, but at least confirmed using some “plain vanilla” test pages I’ve set-up (see the thread).

On one hand, if this were a Dreamhost configuration problem, (I would think) everyone would be complaining, but then why, only on this domain? The test pages are so basic that it can’t possibly be my “code,” because there is none, really.

Any ideas?


#6

P.S… If anyone cares to look at this any further, I’ve eliminated the problem in my main pages using a workaround, now that the problem has been somewhat isolated. By not specifying the encoding of the page using meta tags, IE6 is not confused by the gzip/encoding of the session cookie.

So, you won’t see the problem on the main pages.

But I’ve left some basic “test” pages to prove the concept at http://sandandsky.com/test/test1.php, the source of which can be viewed at http://sandandsky.com/test/test3.txt


#7

Mate, I don’t understand your troubleshooting here.

“Everything using IE is having problems.” … “but nobody else using another browers is having problems”.

It’s IE and how IE’s handling things. I think what you want is a workaround for IE. Not a DH configuration fix. This is a IE6 problem. This is NOT a DH problem.

I don’t know of any suggestions to fix it as I’ve hadn’t dealt with this problem before and to be honest, if I see non-ground breaker problems with IE in my pages, I really just let them go. Ie; if I had this issue on my site, I’d tell people to update their browser for a change. But that’s just me. :wink:


#8

Maybe I am missing something here, but I really don’t see any diference with IE over firefox.
Both display 4 links, both show the new title when clicked.
With one exception, IE does not open the source.
This maybe an intended security issue with IE, as I know in IE if you dump data to the browser the source is disabled.
Silk


#9

The difference is how the problem itself handles the data. A bug in IE is preventing the page from being displayed/decompressed correctly. It’s an IE bug. A bug that, from what was said, is fixed in IE7 which means it will never be fixed in IE6.


#10

Maybe it would help if he had data to be displayed. I agree with you that IE 6 is not going to be fixed. I just think it would help prove the point better if an image or other text was on each page, that did not display in IE. From what I saw, both IE and firefox showed the same display. 4 links only. Both displayed the title, but firefox was the only one that allowed the source to be viewed.
Silk