php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36111 Session not saving cookie with session id defined in URL
Submitted: 2006-01-20 23:18 UTC Modified: 2006-01-20 23:20 UTC
From: brian dot feaver at sellingsource dot com Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.4.2 OS: Gentoo
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: brian dot feaver at sellingsource dot com
New email:
PHP Version: OS:

 

 [2006-01-20 23:18 UTC] brian dot feaver at sellingsource dot com
Description:
------------
When setting PHPSESSID in the URL the session cookie is not being set.

Config Settings:
session.use_trans_sid = 0 (also tried it on)
session.use_cookies = 1
session.use_only_cookies = 0

Tried this on version 4.4.2, 4.3.3, and 5.0.4. 4.3.3 and 5.0.4 set the cookie, 4.4.2 does not.

Reproduce code:
---------------
<?php
session_start();
?>
<html>
<body>
<p>Session ID: <?php echo session_id(); ?></p>
</body>
</html>


Expected result:
----------------
Using something like:

www.example.com/?PHPSESSID=foo

I would expect it to set a session cookie PHPSESSID with a value of foo.

Actual result:
--------------
No session cookie was created.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-01-20 23:20 UTC] sniper@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Cookie is not set if the id is acquired elsewhere. RTFM.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Dec 21 19:00:01 2025 UTC