Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.1, 3.0]: Constant SID is deprecated #8365

Closed
dragomano opened this issue Dec 18, 2024 · 8 comments · Fixed by #8376
Closed

[2.1, 3.0]: Constant SID is deprecated #8365

dragomano opened this issue Dec 18, 2024 · 8 comments · Fixed by #8376

Comments

@dragomano
Copy link
Contributor

Basic Information

This error occurs periodically and is related to the code where the constant is used.

Example:

if (defined('SID') && SID != '')

Steps to reproduce

No response

Expected result

No response

Actual result

No response

Version/Git revision

3.0 Alpha 2

Database Engine

All

Database Version

11.2.2-MariaDB

PHP Version

8.4.1

Logs

No response

Additional Information

No response

@jdarwood007
Copy link
Member

I can't find any information about SID being deprecated.

@jdarwood007
Copy link
Member

I found it:

Changing the value of the session.use_only_cookies, session.use_trans_sid, session.trans_sid_tags, session.trans_sid_hosts, and session.referer_check INI settings is deprecated. The SID constant is also deprecated.

https://www.php.net/manual/en/migration84.deprecated.php

@jdarwood007
Copy link
Member

Looks like they haven't documented it yet: php/doc-en#3872
Even PHP watch didn't document this, which is why I didn't catch it as I tend to read that to know what to look out for.

@tyrsson
Copy link
Collaborator

tyrsson commented Dec 23, 2024

I know the project is using php-cs-fixer but there is more than likely something like this for it.
https://github.com/PHPCompatibility/PHPCompatibility

@live627
Copy link
Contributor

live627 commented Dec 25, 2024

Does anyone know if any search engines such as googlebot accept cookies?

(This question actually is relevant)

@live627
Copy link
Contributor

live627 commented Dec 25, 2024

Got the answer from Gemini or whatever they call it next.

Screenshot 2024-12-25 at 04-51-10 Does anyone know if any search engines such as googlebot send cookies - Google Search
1

@Sesquipedalian
Copy link
Member

IIRC, we can just replace SID with session_id() and be done with it.

@jdarwood007
Copy link
Member

@live627 I wouldn't trust that answer. Google is known to have its bots parse and execute Javascript and mimic user actions to test its analytics and AdSense (checking if ads only show for bots). Some of that would require passing cookies, as the site may otherwise use a cookie to know whether something is from a bot or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants