php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22670 session_start() URL Bug
Submitted: 2003-03-12 23:03 UTC Modified: 2003-03-13 16:19 UTC
From: r_stretch at yahoo dot com Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.3.1 OS: Debian
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: r_stretch at yahoo dot com
New email:
PHP Version: OS:

 

 [2003-03-12 23:03 UTC] r_stretch at yahoo dot com
Hi there,

It seems that if the index.php starts with session_start() any hyperlinks that do not begin with "http://" within the document will have the PHPSESSID appended to the end of the hyperlink. Though once you refresh the same page the PHPSESSID removes itself from the hyperlink.

Example:
<---- start ---->
<?
//File Name: index.php
session_start();
?>
<html>
<head><title>INDEX.PHP</title></head>
<body>
<a href="index.php">reload this page</a>
</body>
</html>
<----- end ----->

When you hover the cursor over the hyperlink you will see:
http://path_to_URL/index.php?PHPSESSID=hash_characters

Now click that same link and you will see (will refresh the page):
http://path_to_URL/index.php

I install only with MySQL, GD, CGI modules.

Is this a bug or is it working as expected?



Patches

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-03-13 00:18 UTC] sniper@php.net
Yes, it's normal. (the cookie is not set at the first request)


 [2003-03-13 13:39 UTC] r_stretch at yahoo dot com
I am editting the code so you can actually see the example more appropriately.  Try this actual code an you will see the bug I am speaking of.

<---- start ---->
<?
//File Name: index.php
session_start();
?>
<html>
<head><title>INDEX.PHP</title></head>
<body>
<a href="index.php">hover mouse - click to reload</a><br>
<a href="http://path_to_URL/index.php">hover mouse only</a>
</body>
</html>
<----- end ----->
 [2003-03-13 16:19 UTC] sniper@php.net
And again: This is not a bug. It's normal.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Sep 10 20:01:27 2024 UTC