0

Ok, so I'm getting a 3 part warning from PHP that is occuring on IE ONLY. It does not occur on Firefox. I have read a few other StackOverflow threads on this issue and used one workaround located here: The session id is too long or contains illegal characters, valid characters are a-z, A-Z, 0-9 and '-,'

But, the workaround provided there fixes the problem for IE but breaks the functionality in Firefox. We allow session_start() to generate it's own session ID so I am at a loss as to why IE has the issue. Also, just to be sure something wasn't hanging around in a session or cookie, I cleared all cookies, cache,history and closed browser, error remained as soon as page loaded. Any suggestions on what else I can check for that might cause these warnings that IE is spitting out and why Firefox wouldn't have/see the same problem?

Warning: session_start() [function.session-start]: The session id is too long or contains illegal characters, valid characters are a-z, A-Z, 0-9 and '-,' in /index.php on line 1

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /index.php:1) in/index.php on line 1

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /index.php:1) in /index.php on line 1
Community
  • 1
  • 1
DMSJax
  • 1,709
  • 4
  • 22
  • 35
  • And what specifically does the session id in the cookie look like in IE now? Before clearing cookies and reinstalling Windows, did you look at the cookie store? – mario Jun 14 '13 at 19:05
  • 050129eaa227a2fe8cac216d0a06e2f7 <-- Session ID generated for IE – DMSJax Jun 14 '13 at 19:36
  • do you have your own session handler or are you using standard equipment. – Orangepill Jun 14 '13 at 19:49
  • @Orangepill PHP Standard - I tried adding: `` before `` which stopped IE's crying, but now the session ID doesn't persist. navigate to a internal page and back again, causes the sessionid to regenerate a new number. - Sorry if this is simple problem, im only a few weeks into learning PHP again – DMSJax Jun 14 '13 at 19:59
  • And what cookies do actually arrive on the server? `htmlspecialchars($_SERVER["HTTP_COOKIE"])` – mario Jun 14 '13 at 20:03
  • That referenced solution appears to be the goto solution for this problem ... the only other solution I have seen is for empty sessions. and that is `if(!session_id()) session_regenerate_id();` before session start – Orangepill Jun 14 '13 at 20:08
  • @mario well, assuming you want me to echo that code: I did: 'Session ID: =session_id()?>
    Cookies: =htmlspecialchars($_SERVER["HTTP_COOKIE"])?>' after session_start: in FF i get: 'Session ID: d17301f1e2976097951f8c93d880a040 Cookies: ' in IE i get: `Session ID: 26ff5f4643480172f9096ddb651626d4 Cookies: PHPSESSID= `
    – DMSJax Jun 14 '13 at 20:13
  • Wondering if it might be related to [this on](http://stackoverflow.com/questions/17115614/php-sessions-being-recreated-when-using-htaccess-errordocument) that came in at about the same time as your question. – Orangepill Jun 14 '13 at 20:14
  • @Orangepill not usign a htaccess file on this while its in development, so don't think that would be an issue, also this is just the index.php page before and calls/checks to anything, all images referenced exist and are linked properly, so don't think thats the issue – DMSJax Jun 14 '13 at 20:17
  • One thing thats confusing me more is that this is a PHP announced error (I think), so if it's PHP thats kicking the error why would it be displayed by IE but suppressed by FF? - If it is IE thats kicking the error message then what? though PHP was standard across the board, not like HTML or CSS with unsupported functions and all. – DMSJax Jun 14 '13 at 20:26

1 Answers1

0

THe end result of this was two part, Internet Explorer 64Bit was handling session information different than the 32Bit version, at this point it may be something on the local security policy in our office that caused the problem. We also fell back onto the REFERENCE POST i mentioned in my original question. This is being answered simply to close out the question.

DMSJax
  • 1,709
  • 4
  • 22
  • 35