|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-10-10 13:45 UTC] tony2001@php.net
[2006-10-11 07:29 UTC] misc05 at blueyonder dot co dot uk
[2006-10-11 09:53 UTC] tony2001@php.net
[2006-10-11 14:42 UTC] misc05 at blueyonder dot co dot uk
[2006-10-17 11:48 UTC] eric at footsteps dot nl
[2006-10-17 12:28 UTC] misc05 at blueyonder dot co dot uk
[2006-10-17 14:56 UTC] mgf@php.net
[2006-10-18 14:22 UTC] misc05 at blueyonder dot co dot uk
[2006-10-18 14:24 UTC] misc05 at blueyonder dot co dot uk
[2006-10-18 15:48 UTC] rasmus@php.net
[2006-10-18 21:36 UTC] mgf@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 04 20:00:01 2025 UTC |
Description: ------------ Code sample below to reproduce symptoms with. If the user first approaches the site with : mysite.com PHP creates two PHPSESSID's - one with a host of mysite.com and another with a host of www.mysite.com Technically you could claim it's functioning correctly I guess - but in practice it's a bug I think. The second session will be empty of course. This causes the value in $_SESSION['test'] to be lost. If the user comes to the site with www.mysite.com all is well and only one PHPSESSID is created. I would appreciate a work-around if anyone can supply one as I use an ISP and can't update PHP. Reproduce code: --------------- <?php session_start(); $_SESSION['test'] = 'HELLO'; $host = $_SERVER['HTTP_HOST']; $uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\'); $extra = '../listings/store.php'; header("Location: http://$host$uri/$extra"); exit;//just a habit ignore me ?> store.php would then start with: <?php session_start(); echo($_SESSION['test']); // and so on ?> Expected result: ---------------- Look in your browswer an you will see two PHPSESSID's with different values for HOST ALSO - FOR GODS SAKE QUIT USINGT BLOODY CAPTCHA