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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: evgen at unicon dot ru
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 06:01:34 2025 UTC