#21771 [Fbk->Opn]: variable names changing in turkish locale

From: Date: Tue, 21 Jan 2003 12:24:09 +0000
Subject: #21771 [Fbk->Opn]: variable names changing in turkish locale
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-30818@lists.php.net to get a copy of this message
ID: 21771 User updated by: tufan@metu.edu Reported By: tufan@metu.edu -Status: Feedback +Status: Open Bug Type: Variables related Operating System: linux kernel 2.4.18 PHP Version: 4.3.0 New Comment: 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']}"; ?> Previous Comments: ------------------------------------------------------------------------ [2003-01-20 16:03:17] sniper@php.net Can you provide some short example script? And what locale causes this? ------------------------------------------------------------------------ [2003-01-20 06:39:44] tufan@metu.edu 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] tufan@metu.edu 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

« previous php.bugs (#30818) next »