php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18752 PHP stops embeding the session id into URLs after calling virtual() :-(
Submitted: 2002-08-06 07:14 UTC Modified: 2002-09-25 06:49 UTC
From: evgen at unicon dot ru Assigned:
Status: Closed Package: Session related
PHP Version: 4.2.2 OS: FeeBSD 4.6.1-release-p8
Private report: No CVE-ID: None
 [2002-08-06 07:14 UTC] evgen at unicon dot ru
PHP stops embeding the session id into URLs after calling virtual().

Example (switch off your cookies):
--------------------------------------
session_start();
session_register('count');
$count++;
echo $count."<br>";

<A HREF="example.php">link 1</A>
<?virtual("/virtual.html");?>    
<A HREF="example.php">link 2</A>
---------------------------------------

First link will be example.php?PHPSESSID=7a85d47f8d5e7c96c579
but second link will be only example.php

If you comment virtual("/virtual.html") everithing will go on fine.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-25 06:49 UTC] sas@php.net
There is no way to avoid this. Evaluate whether you actually need to use virtual.  You could also do a readfile("http://server/page"); ..

From php.net/virtual: " To run the sub-request, all buffers are terminated and flushed to the browser, pending headers are sent too."

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 29 10:01:32 2024 UTC