php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22663 Variable $ID contains 3 initially
Submitted: 2003-03-12 13:09 UTC Modified: 2003-03-12 17:04 UTC
From: public at hverdag dot dk Assigned:
Status: Not a bug Package: Variables related
PHP Version: 4.3.1 OS: Windows 2000
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: public at hverdag dot dk
New email:
PHP Version: OS:

 

 [2003-03-12 13:09 UTC] public at hverdag dot dk
Why on earth does the variable $ID contain the value 3 on a totally blank page where neither other script has been processed or session started???!

This is not so big a problem in itself, but if I use $ID as a session variable it even overwrites this value - now, THIS is a problem!

I cannot find any place where it says that one shouldn't use this variable name.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-03-12 14:26 UTC] public at hverdag dot dk
CORRECTION: I was NOT using $ID as a session variable though. But if I do it gives strange and totally off error messages about different places in my script where the script is perfectly correct.
 [2003-03-12 17:04 UTC] sniper@php.net
Set register_globals=Off and this problem goes away.
(it's coming from cookie)

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 13:01:33 2025 UTC