ID:               21771
 Updated by:       [EMAIL PROTECTED]
-Summary:          variable names changing in turkish locale
-Reported By:      [EMAIL PROTECTED]
+Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Feedback
 Bug Type:         Variables related
-Operating System: linux kernel 2.4.18
+Operating System: Windows 2000
 PHP Version:      4.3.0
 New Comment:

strange ... this was fixed for functions constants
but should not affect variables, as these are 
case insensitive (so no conversions take place
while resolving them)
or is there something different going on with
the super-globals?

does this affect $_SESSION only? what if you have
register_globals enabled and try to pass something
like "...script.php?ID=test"? do you have $ID or
$ÝD set in your script then?


Previous Comments:
------------------------------------------------------------------------

[2003-01-21 06:27:16] [EMAIL PROTECTED]

by the way, it's turkish locale
tr_TR
iso8859-9

------------------------------------------------------------------------

[2003-01-21 06:24:08] [EMAIL PROTECTED]

no code works. even the example in the php session documentation...
:)

<?php
session_start();
// Use $HTTP_SESSION_VARS with PHP 4.0.6 or less
if (!isset($_SESSION['count'])) {
    $_SESSION['count'] = 0;
} else {
    $_SESSION['count']++;
}
echo "Count {$_SESSION['count']}";
?>

------------------------------------------------------------------------

[2003-01-20 16:03:17] [EMAIL PROTECTED]

Can you provide some short example script?
And what locale causes this?


------------------------------------------------------------------------

[2003-01-20 06:39:44] [EMAIL PROTECTED]

Oops... This may not be related to php. It may be resulting from the
turkish locale system itself. Let me investigate...

------------------------------------------------------------------------

[2003-01-20 06:24:33] [EMAIL PROTECTED]

I thought this bug was submitted for an earlier version of php (maybe
4.1.2 or so), but it seems to be not corrected.

The main problem is, the lowercase of "I" in Turkish is not "i". it is
an "i" without a dot on top of it: "ý".

Something in php affects all variables including the letter "I". So
$_SESSION, SID, or PHPSESSID doesn't work.

I think some code in php first changes all variables names to lowercase
(and for turkish locale, incorrectly lowercases I to i), and then
changes all variable names to uppercase (and correctly uppercases i to
Ý).

So, $_SESSION becomes $_SESSÝON, and since php couldn't find a variable
named $_SESSION, it regenerates a new PHPSESSID.

The correct uppercase - lowercase of this letter is:

I - ý
Ý - i

A workaround for this is making sure apache server starts in en_US
locale.

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=21771&edit=1

Reply via email to