php / php/doc-en

Clarification on passing the session id.

Open
#4,849 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
XML
Stars
596
Forks
890
Avg merge
1d 15h
Merged PRs (30d)
55

Description

The page at https://www.php.net/manual/en/session.idpassing.php includes the following:

There are two methods to propagate a session id:

  • Cookies
  • URL parameter

The page at https://www.php.net/manual/en/function.session-start.php includes the following:

session_start() creates a session or resumes the current one based on a session identifier passed via a GET or POST request, or passed via a cookie.

That would imply the using POST is a third method to propagate the session id, and would certainly be more secure than using a URL parameter. It would also imply a conflict between the two pages.

I haven’t finished testing this, but is it possible to get clarification on whether POST request is a valid third method? I can’t find any other discussion of this anywhere, and this would certainly have implications to using sessions with CURL and AJAX.

If my interpretation is correct, I would propose correcting one or the other page.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Compare the session.idpassing.php and function.session-start.php pages, focusing on the documented ways session_start() accepts a session identifier. Verify the behavior for GET, POST, cookies, cURL, and AJAX before deciding which page needs clarification or correction.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.