note 69908 added to function.session-start

From: Date: Tue, 26 Sep 2006 00:57:08 +0000
Subject: note 69908 added to function.session-start
Groups: php.notes 
Request: Send a blank email to php-notes+get-117666@lists.php.net to get a copy of this message
Another one bitten by the "a different domain name gives you a new session" in IE... My site uses interactive PDF documents. A user saves data from them into FDF documents, and when this happens, the site also includes the URL of the PDF in the FDF data (using the FDF "/F" tag). This URL is generated using the $_SERVER["HTTP_HOST"] value from PHP. For some as-yet-undetermined reason, when my hosting provider updated PHP (I believe to 4.4.1), for a time the $_SERVER["HTTP_HOST"] value apparently dropped the "www." from my domain name. So, some FDF files were saved with this different URL value. Needless to say, when one of these FDFs loaded the corresponding PDF, although the load and display of the PDF worked, any subsequent save operation (which relies on current session information for validating the user, etc.) initiated from within the PDF failed. The original session had been established for the "www.domain.com", but because the PDF URL lacked the "www.", PHP/IE had established a new, essentially empty, session. I scratched my head over this problem for months and only recently happened upon this fix. In my case, manually patching the failing (binary) FDF files to include the "www." in the URL for the PDF did fix it. Hopefully someone else finds this helpful...! ---- Server IP: 66.163.161.117 Probable Submitter: 24.61.68.96 ---- Manual Page -- http://www.php.net/manual/en/function.session-start.php Edit -- https://master.php.net/note/edit/69908 Del: integrated -- https://master.php.net/note/delete/69908/integrated Del: useless -- https://master.php.net/note/delete/69908/useless Del: bad code -- https://master.php.net/note/delete/69908/bad+code Del: spam -- https://master.php.net/note/delete/69908/spam Del: non-english -- https://master.php.net/note/delete/69908/non-english Del: in docs -- https://master.php.net/note/delete/69908/in+docs Del: other reasons-- https://master.php.net/note/delete/69908 Reject -- https://master.php.net/note/reject/69908 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#117666) next »